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

Unified Diff: chrome/renderer/extensions/dispatcher.cc

Issue 12326052: Using the new webkit CSS change notification instead of a mutation observer. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 10 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/renderer/extensions/dispatcher.h ('k') | chrome/renderer/extensions/extension_helper.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/renderer/extensions/dispatcher.cc
diff --git a/chrome/renderer/extensions/dispatcher.cc b/chrome/renderer/extensions/dispatcher.cc
index dcd161f2882601b4a22f1d81bddf5703b8b32d0c..879a129bda07a2c321df2f051462accd0a0fb59b 100644
--- a/chrome/renderer/extensions/dispatcher.cc
+++ b/chrome/renderer/extensions/dispatcher.cc
@@ -319,7 +319,10 @@ static v8::Handle<v8::Object> GetOrCreateChrome(
} // namespace
Dispatcher::Dispatcher()
- : content_watcher_(new ContentWatcher(this)),
+ : content_watcher_(new ContentWatcher(this)), // TODO(jyasskin):
+ // Move this to
+ // ExtensionHelper
+ // if possible.
is_webkit_initialized_(false),
webrequest_adblock_(false),
webrequest_adblock_plus_(false),
@@ -574,8 +577,6 @@ void Dispatcher::RegisterNativeHandlers(ModuleSystem* module_system,
module_system->RegisterNativeHandler("setIcon",
scoped_ptr<NativeHandler>(
new SetIconNatives(this, request_sender_.get())));
- module_system->RegisterNativeHandler("contentWatcherNative",
- content_watcher_->MakeNatives());
// Natives used by multiple APIs.
module_system->RegisterNativeHandler("file_system_natives",
@@ -889,6 +890,15 @@ void Dispatcher::DidCreateDocumentElement(WebKit::WebFrame* frame) {
content_watcher_->DidCreateDocumentElement(frame);
}
+void Dispatcher::CssMatches(
+ WebKit::WebFrame* frame,
+ const WebKit::WebVector<WebKit::WebString>& newlyMatchingSelectors,
+ const WebKit::WebVector<WebKit::WebString>& stoppedMatchingSelectors) {
+ content_watcher_->CssMatches(frame, newlyMatchingSelectors,
+ stoppedMatchingSelectors);
+}
+
+
void Dispatcher::OnActivateExtension(const std::string& extension_id) {
active_extension_ids_.insert(extension_id);
const Extension* extension = extensions_.GetByID(extension_id);
« no previous file with comments | « chrome/renderer/extensions/dispatcher.h ('k') | chrome/renderer/extensions/extension_helper.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698