| Index: chrome/renderer/extensions/dispatcher.cc
|
| diff --git a/chrome/renderer/extensions/dispatcher.cc b/chrome/renderer/extensions/dispatcher.cc
|
| index 5f787b28bcf3343d41295771af57e820c84250aa..896022c0e348673621a95dca79ada316ae3b5648 100644
|
| --- a/chrome/renderer/extensions/dispatcher.cc
|
| +++ b/chrome/renderer/extensions/dispatcher.cc
|
| @@ -396,7 +396,7 @@ void CallModuleMethod(const std::string& module_name,
|
| } // namespace
|
|
|
| Dispatcher::Dispatcher()
|
| - : content_watcher_(new ContentWatcher(this)),
|
| + : content_watcher_(new ContentWatcher()),
|
| is_webkit_initialized_(false),
|
| webrequest_adblock_(false),
|
| webrequest_adblock_plus_(false),
|
| @@ -829,9 +829,6 @@ void Dispatcher::RegisterNativeHandlers(ModuleSystem* module_system,
|
| module_system->RegisterNativeHandler("setIcon",
|
| scoped_ptr<NativeHandler>(
|
| new SetIconNatives(this, request_sender_.get(), context)));
|
| - module_system->RegisterNativeHandler(
|
| - "contentWatcherNative",
|
| - content_watcher_->MakeNatives(context));
|
| module_system->RegisterNativeHandler("activityLogger",
|
| scoped_ptr<NativeHandler>(new APIActivityLogger(this, context)));
|
| module_system->RegisterNativeHandler("renderViewObserverNatives",
|
| @@ -898,7 +895,6 @@ void Dispatcher::RegisterNativeHandlers(ModuleSystem* module_system,
|
|
|
| void Dispatcher::PopulateSourceMap() {
|
| // Libraries.
|
| - source_map_.RegisterSource("contentWatcher", IDR_CONTENT_WATCHER_JS);
|
| source_map_.RegisterSource("entryIdManager", IDR_ENTRY_ID_MANAGER);
|
| source_map_.RegisterSource(kEventBindings, IDR_EVENT_BINDINGS_JS);
|
| source_map_.RegisterSource("imageUtil", IDR_IMAGE_UTIL_JS);
|
| @@ -1218,6 +1214,15 @@ void Dispatcher::DidCreateDocumentElement(WebKit::WebFrame* frame) {
|
| content_watcher_->DidCreateDocumentElement(frame);
|
| }
|
|
|
| +void Dispatcher::DidMatchCSS(
|
| + WebKit::WebFrame* frame,
|
| + const WebKit::WebVector<WebKit::WebString>& newlyMatchingSelectors,
|
| + const WebKit::WebVector<WebKit::WebString>& stoppedMatchingSelectors) {
|
| + content_watcher_->DidMatchCSS(
|
| + frame, newlyMatchingSelectors, stoppedMatchingSelectors);
|
| +}
|
| +
|
| +
|
| void Dispatcher::OnActivateExtension(const std::string& extension_id) {
|
| const Extension* extension = extensions_.GetByID(extension_id);
|
| if (!extension) {
|
|
|