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

Unified Diff: chrome/browser/extensions/tab_helper.cc

Issue 1159623014: Revert of Encapsulate CSS selector declarative content condition tracking (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@stars-declarative-content-range-for
Patch Set: Created 5 years, 6 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 | « chrome/browser/extensions/tab_helper.h ('k') | chrome/chrome_browser_extensions.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/extensions/tab_helper.cc
diff --git a/chrome/browser/extensions/tab_helper.cc b/chrome/browser/extensions/tab_helper.cc
index 0052793c67107ac93bb63d3623da390b703f2f4a..e3c8c445b4538040338e0298e249db3e094ea483 100644
--- a/chrome/browser/extensions/tab_helper.cc
+++ b/chrome/browser/extensions/tab_helper.cc
@@ -263,6 +263,8 @@
IPC_MESSAGE_HANDLER(ExtensionHostMsg_Request, OnRequest)
IPC_MESSAGE_HANDLER(ExtensionHostMsg_ContentScriptsExecuting,
OnContentScriptsExecuting)
+ IPC_MESSAGE_HANDLER(ExtensionHostMsg_OnWatchedPageChange,
+ OnWatchedPageChange)
IPC_MESSAGE_UNHANDLED(handled = false)
IPC_END_MESSAGE_MAP()
return handled;
@@ -430,6 +432,15 @@
OnScriptsExecuted(web_contents(), executing_scripts_map, on_url));
}
+void TabHelper::OnWatchedPageChange(
+ const std::vector<std::string>& css_selectors) {
+ if (ExtensionSystem::Get(profile_)->extension_service() &&
+ RulesRegistryService::Get(profile_)) {
+ RulesRegistryService::Get(profile_)->content_rules_registry()->Apply(
+ web_contents(), css_selectors);
+ }
+}
+
void TabHelper::OnDetailedConsoleMessageAdded(
const base::string16& message,
const base::string16& source,
« no previous file with comments | « chrome/browser/extensions/tab_helper.h ('k') | chrome/chrome_browser_extensions.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698