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

Unified Diff: chrome/browser/extensions/api/declarative_content/content_rules_registry.cc

Issue 344433003: Prepare declarativeContent API for new script injection feature. Added Javascript types and functio… (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Greatly simplified: Got rid of WatchedPagesRecipient and new event types Created 6 years, 5 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
Index: chrome/browser/extensions/api/declarative_content/content_rules_registry.cc
diff --git a/chrome/browser/extensions/api/declarative_content/content_rules_registry.cc b/chrome/browser/extensions/api/declarative_content/content_rules_registry.cc
index 7b379c1a67f2eeade2c708a517bd25de1713f5a7..203b984846a1eada9f775195d5b394b9b376f9dd 100644
--- a/chrome/browser/extensions/api/declarative_content/content_rules_registry.cc
+++ b/chrome/browser/extensions/api/declarative_content/content_rules_registry.cc
@@ -24,9 +24,10 @@ using url_matcher::URLMatcherConditionSet;
namespace extensions {
ContentRulesRegistry::ContentRulesRegistry(Profile* profile,
+ const std::string& event_name,
RulesCacheDelegate* cache_delegate)
: RulesRegistry(profile,
- declarative_content_constants::kOnPageChanged,
+ event_name,
content::BrowserThread::UI,
cache_delegate,
WebViewKey(0, 0)) {
@@ -300,7 +301,8 @@ void ContentRulesRegistry::UpdateConditionCache() {
void ContentRulesRegistry::InstructRenderProcess(
content::RenderProcessHost* process) {
- process->Send(new ExtensionMsg_WatchPages(watched_css_selectors_));
+ process->Send(
+ new ExtensionMsg_WatchPages(event_name(), watched_css_selectors_));
}
bool ContentRulesRegistry::IsEmpty() const {

Powered by Google App Engine
This is Rietveld 408576698