Chromium Code Reviews| Index: chrome/browser/extensions/api/declarative_content/content_rules_registry.h |
| diff --git a/chrome/browser/extensions/api/declarative_content/content_rules_registry.h b/chrome/browser/extensions/api/declarative_content/content_rules_registry.h |
| index 9224374a7ee358dcc6e100be0aac06b2723ea685..38636de999de1ffd5f40b0699ce9d642b0805b34 100644 |
| --- a/chrome/browser/extensions/api/declarative_content/content_rules_registry.h |
| +++ b/chrome/browser/extensions/api/declarative_content/content_rules_registry.h |
| @@ -22,6 +22,7 @@ |
| #include "content/public/browser/notification_observer.h" |
| #include "content/public/browser/notification_registrar.h" |
| #include "extensions/browser/info_map.h" |
| +#include "extensions/common/watched_pages_recipient.h" |
| class Profile; |
| class ContentPermissions; |
| @@ -64,7 +65,10 @@ class ContentRulesRegistry : public RulesRegistry, |
| public: |
| // For testing, |ui_part| can be NULL. In that case it constructs the |
| // registry with storage functionality suspended. |
| - ContentRulesRegistry(Profile* profile, RulesCacheDelegate* cache_delegate); |
| + ContentRulesRegistry(Profile* profile, |
| + const std::string& event_name, |
| + const WatchedPagesRecipient watched_pages_recipient, |
|
Jeffrey Yasskin
2014/06/27 22:03:41
Either use const WatchedPagesRecipient& or just Wa
Mark Dittmer
2014/06/30 12:34:02
Done.
|
| + RulesCacheDelegate* cache_delegate); |
| // Applies all content rules given an update (CSS match change or |
| // page navigation, for now) from the renderer. |
| @@ -137,6 +141,8 @@ class ContentRulesRegistry : public RulesRegistry, |
| // All CSS selectors any rule's conditions watch for. |
| std::vector<std::string> watched_css_selectors_; |
| + WatchedPagesRecipient watched_pages_recipient_; |
| + |
| // Manages our notification registrations. |
| content::NotificationRegistrar registrar_; |
| @@ -145,6 +151,9 @@ class ContentRulesRegistry : public RulesRegistry, |
| DISALLOW_COPY_AND_ASSIGN(ContentRulesRegistry); |
| }; |
| +// Map from event_name to registry pointer. |
| +typedef std::map<std::string, ContentRulesRegistry*> ContentRulesRegistryMap; |
|
Jeffrey Yasskin
2014/06/27 22:03:41
Generally avoid typedefs like this, since they mak
Mark Dittmer
2014/06/30 12:34:02
Done. Still use typedef within method in another c
|
| + |
| } // namespace extensions |
| #endif // CHROME_BROWSER_EXTENSIONS_API_DECLARATIVE_CONTENT_CONTENT_RULES_REGISTRY_H_ |