// Copyright 2012 The Chromium Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #ifndef CHROME_BROWSER_EXTENSIONS_API_DECLARATIVE_CONTENT_CHROME_CONTENT_RULES_REGISTRY_H_ #define CHROME_BROWSER_EXTENSIONS_API_DECLARATIVE_CONTENT_CHROME_CONTENT_RULES_REGISTRY_H_ #include <stddef.h> #include <map> #include <memory> #include <set> #include <string> #include <utility> #include <vector> #include "base/functional/callback.h" #include "base/memory/raw_ptr.h" #include "chrome/browser/extensions/api/declarative_content/content_action.h" #include "chrome/browser/extensions/api/declarative_content/content_condition.h" #include "chrome/browser/extensions/api/declarative_content/content_predicate_evaluator.h" #include "extensions/browser/api/declarative_content/content_rules_registry.h" #include "extensions/common/extension_id.h" namespace content { class BrowserContext; class WebContents; } namespace extensions { class Extension; // The ChromeContentRulesRegistry is responsible for managing // the internal representation of rules for the Declarative Content API. // // Here is the high level overview of this functionality: // // api::events::Rule consists of conditions and actions, these are // represented as a ContentRule with ContentConditions and ContentActions. // // A note on incognito support: separate instances of ChromeContentRulesRegistry // are created for incognito and non-incognito contexts. The incognito instance, // however, is only responsible for applying rules registered by the incognito // side of split-mode extensions to incognito tabs. The non-incognito instance // handles incognito tabs for spanning-mode extensions, plus all non-incognito // tabs. class ChromeContentRulesRegistry : public ContentRulesRegistry, public ContentPredicateEvaluator::Delegate { … }; } // namespace extensions #endif // CHROME_BROWSER_EXTENSIONS_API_DECLARATIVE_CONTENT_CHROME_CONTENT_RULES_REGISTRY_H_