forked from mirrors/gecko-dev
This patch implements the nsIClickRule that represents the rule that instructs the banner auto-clicking to handle the cookie banner. We also implement the nsICookieBannerService.getClickRuleForDoamin() that allows fetching the clicking rule from the service for the given domain. Differential Revision: https://phabricator.services.mozilla.com/D154805
32 lines
853 B
C++
32 lines
853 B
C++
/* This Source Code Form is subject to the terms of the Mozilla Public
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
|
|
|
#ifndef mozilla_nsclickrule_h__
|
|
#define mozilla_nsclickrule_h__
|
|
|
|
#include "nsIClickRule.h"
|
|
#include "nsString.h"
|
|
|
|
namespace mozilla {
|
|
|
|
class nsClickRule final : public nsIClickRule {
|
|
NS_DECL_ISUPPORTS
|
|
NS_DECL_NSICLICKRULE
|
|
|
|
explicit nsClickRule(const nsACString& aPresence, const nsACString& aHide,
|
|
const nsACString& aOptOut, const nsACString& aOptIn)
|
|
: mPresence(aPresence), mHide(aHide), mOptOut(aOptOut), mOptIn(aOptIn) {}
|
|
|
|
private:
|
|
~nsClickRule() = default;
|
|
|
|
nsCString mPresence;
|
|
nsCString mHide;
|
|
nsCString mOptOut;
|
|
nsCString mOptIn;
|
|
};
|
|
|
|
} // namespace mozilla
|
|
|
|
#endif // mozilla_nsclickrule_h__
|