| Index: chrome/browser/extensions/extension_tab_helper.cc
|
| diff --git a/chrome/browser/extensions/extension_tab_helper.cc b/chrome/browser/extensions/extension_tab_helper.cc
|
| index 0a57770c44da05ef4db3aacd65f4c858b0b47e14..2e4682fa3750dea663e4b29f6969e49fb2efe081 100644
|
| --- a/chrome/browser/extensions/extension_tab_helper.cc
|
| +++ b/chrome/browser/extensions/extension_tab_helper.cc
|
| @@ -30,11 +30,12 @@
|
| #include "content/public/browser/web_contents.h"
|
| #include "ui/gfx/image/image.h"
|
|
|
| +using content::RenderViewHost;
|
| using content::WebContents;
|
| using extensions::Extension;
|
| +using extensions::PageActionController;
|
| using extensions::ScriptBadgeController;
|
| using extensions::ScriptExecutorImpl;
|
| -using extensions::PageActionController;
|
|
|
| namespace {
|
|
|
| @@ -48,7 +49,8 @@ ExtensionTabHelper::ExtensionTabHelper(TabContents* tab_contents)
|
| extension_app_(NULL),
|
| ALLOW_THIS_IN_INITIALIZER_LIST(
|
| extension_function_dispatcher_(tab_contents->profile(), this)),
|
| - tab_contents_(tab_contents) {
|
| + tab_contents_(tab_contents),
|
| + active_tab_permission_manager_(tab_contents) {
|
| if (extensions::switch_utils::IsActionBoxEnabled()) {
|
| script_badge_controller_ = new ScriptBadgeController(tab_contents);
|
| } else {
|
| @@ -75,6 +77,14 @@ void ExtensionTabHelper::GetApplicationInfo(int32 page_id) {
|
| Send(new ExtensionMsg_GetApplicationInfo(routing_id(), page_id));
|
| }
|
|
|
| +int ExtensionTabHelper::tab_id() const {
|
| + return tab_contents_->restore_tab_helper()->session_id().id();
|
| +}
|
| +
|
| +int ExtensionTabHelper::window_id() const {
|
| + return tab_contents_->restore_tab_helper()->window_id().id();
|
| +}
|
| +
|
| void ExtensionTabHelper::SetExtensionApp(const Extension* extension) {
|
| DCHECK(!extension || extension->GetFullLaunchURL().is_valid());
|
| extension_app_ = extension;
|
| @@ -121,6 +131,11 @@ extensions::LocationBarController*
|
| return location_bar_controller_.get();
|
| }
|
|
|
| +void ExtensionTabHelper::RenderViewCreated(RenderViewHost* render_view_host) {
|
| + render_view_host->Send(
|
| + new ExtensionMsg_SetTabId(render_view_host->GetRoutingID(), tab_id()));
|
| +}
|
| +
|
| void ExtensionTabHelper::DidNavigateMainFrame(
|
| const content::LoadCommittedDetails& details,
|
| const content::FrameNavigateParams& params) {
|
|
|