Chromium Code Reviews| Index: chrome/browser/extensions/tab_helper.cc |
| diff --git a/chrome/browser/extensions/tab_helper.cc b/chrome/browser/extensions/tab_helper.cc |
| index fda6175796dd255c2253775a8135e00c18a55138..a98d01a5c2a9d546f57ec95236e490d846ef4242 100644 |
| --- a/chrome/browser/extensions/tab_helper.cc |
| +++ b/chrome/browser/extensions/tab_helper.cc |
| @@ -9,6 +9,7 @@ |
| #include "base/strings/string_util.h" |
| #include "base/strings/utf_string_conversions.h" |
| #include "chrome/browser/chrome_notification_types.h" |
| +#include "chrome/browser/extensions/active_script_controller.h" |
| #include "chrome/browser/extensions/activity_log/activity_log.h" |
| #include "chrome/browser/extensions/api/declarative/rules_registry_service.h" |
| #include "chrome/browser/extensions/api/declarative_content/content_rules_registry.h" |
| @@ -20,7 +21,7 @@ |
| #include "chrome/browser/extensions/extension_service.h" |
| #include "chrome/browser/extensions/extension_tab_util.h" |
| #include "chrome/browser/extensions/image_loader.h" |
| -#include "chrome/browser/extensions/page_action_controller.h" |
| +#include "chrome/browser/extensions/location_bar_controller.h" |
| #include "chrome/browser/extensions/script_executor.h" |
| #include "chrome/browser/extensions/webstore_inline_installer.h" |
| #include "chrome/browser/extensions/webstore_inline_installer_factory.h" |
| @@ -103,7 +104,7 @@ TabHelper::TabHelper(content::WebContents* web_contents) |
| pending_web_app_action_(NONE), |
| script_executor_(new ScriptExecutor(web_contents, |
| &script_execution_observers_)), |
| - location_bar_controller_(new PageActionController(web_contents)), |
| + location_bar_controller_(new LocationBarController(web_contents)), |
| image_loader_ptr_factory_(this), |
| webstore_inline_installer_factory_(new WebstoreInlineInstallerFactory()) { |
| // The ActiveTabPermissionManager requires a session ID; ensure this |
| @@ -307,6 +308,8 @@ bool TabHelper::OnMessageReceived(const IPC::Message& message) { |
| IPC_MESSAGE_HANDLER(ExtensionHostMsg_Request, OnRequest) |
| IPC_MESSAGE_HANDLER(ExtensionHostMsg_ContentScriptsExecuting, |
| OnContentScriptsExecuting) |
| + IPC_MESSAGE_HANDLER(ExtensionHostMsg_NotifyExtensionScriptExecution, |
| + OnNotifyExtensionScriptExecution) |
| IPC_MESSAGE_HANDLER(ExtensionHostMsg_OnWatchedPageChange, |
| OnWatchedPageChange) |
| IPC_MESSAGE_HANDLER(ChromeViewHostMsg_DetailedConsoleMessageAdded, |
| @@ -445,6 +448,15 @@ void TabHelper::OnContentScriptsExecuting( |
| on_url)); |
| } |
| +void TabHelper::OnNotifyExtensionScriptExecution( |
| + const std::string& extension_id, |
| + int page_id) { |
| + if (Extension::IdIsValid(extension_id)) { |
| + location_bar_controller()->active_script_controller() |
|
not at google - send to devlin
2014/05/08 20:47:09
Can you make ActiveScriptController a WebContentsO
Devlin
2014/05/08 23:01:00
It makes me sad that now ActiveScriptController in
|
| + ->NotifyScriptExecuting(extension_id, page_id); |
| + } |
| +} |
| + |
| void TabHelper::OnWatchedPageChange( |
| const std::vector<std::string>& css_selectors) { |
| #if defined(ENABLE_EXTENSIONS) |