Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(5474)

Unified Diff: chrome/browser/extensions/api/declarative/rules_registry_service.h

Issue 11547033: Implement declarativeContent API. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Sync Created 7 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/browser/extensions/api/declarative/rules_registry_service.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/extensions/api/declarative/rules_registry_service.h
diff --git a/chrome/browser/extensions/api/declarative/rules_registry_service.h b/chrome/browser/extensions/api/declarative/rules_registry_service.h
index db0485b2f8262bfc1c7c1b2753ec48811dfba90b..1910d1650b41ccc90603ce133636c4c5f6cfcdb8 100644
--- a/chrome/browser/extensions/api/declarative/rules_registry_service.h
+++ b/chrome/browser/extensions/api/declarative/rules_registry_service.h
@@ -21,6 +21,7 @@ class NotificationSource;
}
namespace extensions {
+class ContentRulesRegistry;
class RulesRegistry;
class RulesRegistryStorageDelegate;
}
@@ -50,6 +51,11 @@ class RulesRegistryService : public content::NotificationObserver {
scoped_refptr<RulesRegistry> GetRulesRegistry(
const std::string& event_name) const;
+ // Accessors for each type of rules registry.
+ ContentRulesRegistry* content_rules_registry() const {
+ return content_rules_registry_;
+ }
+
// For testing.
void SimulateExtensionUnloaded(const std::string& extension_id);
private:
@@ -72,6 +78,10 @@ class RulesRegistryService : public content::NotificationObserver {
// keep track of them so we can tell them to do cleanup on shutdown.
std::vector<RulesRegistryStorageDelegate*> delegates_;
+ // Weak pointer into rule_registries_ to make it easier to handle content rule
+ // conditions.
+ ContentRulesRegistry* content_rules_registry_;
+
content::NotificationRegistrar registrar_;
Profile* profile_;
« no previous file with comments | « no previous file | chrome/browser/extensions/api/declarative/rules_registry_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698