diff options
author | avi@chromium.org <avi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-09-10 16:16:40 +0000 |
---|---|---|
committer | avi@chromium.org <avi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-09-10 16:16:40 +0000 |
commit | 9567f9cc4114c1f004aa57a5cb166f07e9c86693 (patch) | |
tree | 7473450b0322cf354b21ef8061f426efaceaeb87 /chrome/browser/extensions/api/extension_action | |
parent | bed56af283f2f3426cb6c9549518393032cebd84 (diff) | |
download | chromium_src-9567f9cc4114c1f004aa57a5cb166f07e9c86693.zip chromium_src-9567f9cc4114c1f004aa57a5cb166f07e9c86693.tar.gz chromium_src-9567f9cc4114c1f004aa57a5cb166f07e9c86693.tar.bz2 |
Switch Extensions::TabHelper to use WebContents, WebContentsUserData.
BUG=107201
TEST=no visible change
TBR=ben@chromium.org
Review URL: https://chromiumcodereview.appspot.com/10917026
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@155743 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/extensions/api/extension_action')
3 files changed, 8 insertions, 5 deletions
diff --git a/chrome/browser/extensions/api/extension_action/extension_actions_api.cc b/chrome/browser/extensions/api/extension_action/extension_actions_api.cc index 7b4cd1f..3fb1c97 100644 --- a/chrome/browser/extensions/api/extension_action/extension_actions_api.cc +++ b/chrome/browser/extensions/api/extension_action/extension_actions_api.cc @@ -341,7 +341,8 @@ void ExtensionActionFunction::NotifyBrowserActionChange() { } void ExtensionActionFunction::NotifyLocationBarChange() { - contents_->extension_tab_helper()->location_bar_controller()->NotifyChange(); + extensions::TabHelper::FromWebContents(contents_->web_contents())-> + location_bar_controller()->NotifyChange(); } // static @@ -390,7 +391,7 @@ bool ExtensionActionFunction::SetVisible(bool visible) { extensions::TabHelper& ExtensionActionFunction::tab_helper() const { CHECK(contents_); - return *contents_->extension_tab_helper(); + return *extensions::TabHelper::FromWebContents(contents_->web_contents()); } bool ExtensionActionShowFunction::RunExtensionAction() { diff --git a/chrome/browser/extensions/api/extension_action/extension_page_actions_api.cc b/chrome/browser/extensions/api/extension_action/extension_page_actions_api.cc index eff7b16..55cba75 100644 --- a/chrome/browser/extensions/api/extension_action/extension_page_actions_api.cc +++ b/chrome/browser/extensions/api/extension_action/extension_page_actions_api.cc @@ -99,7 +99,8 @@ bool PageActionsFunction::SetPageActionEnabled(bool enable) { tab_id, enable ? ExtensionAction::ACTIVE : ExtensionAction::INVISIBLE); page_action->SetTitle(tab_id, title); page_action->SetIconIndex(tab_id, icon_id); - contents->extension_tab_helper()->location_bar_controller()->NotifyChange(); + extensions::TabHelper::FromWebContents(contents->web_contents())-> + location_bar_controller()->NotifyChange(); return true; } diff --git a/chrome/browser/extensions/api/extension_action/script_badge_apitest.cc b/chrome/browser/extensions/api/extension_action/script_badge_apitest.cc index 8e9a3c1..ca0f1f1 100644 --- a/chrome/browser/extensions/api/extension_action/script_badge_apitest.cc +++ b/chrome/browser/extensions/api/extension_action/script_badge_apitest.cc @@ -38,8 +38,9 @@ IN_PROC_BROWSER_TEST_F(ScriptBadgeApiTest, Basics) { ExtensionAction* script_badge = extension->script_badge(); ASSERT_TRUE(script_badge); const extensions::LocationBarController* location_bar_controller = - chrome::GetActiveTabContents(browser())->extension_tab_helper()-> - location_bar_controller(); + extensions::TabHelper::FromWebContents( + chrome::GetActiveWebContents(browser()))-> + location_bar_controller(); const int tab_id = SessionID::IdForTab( chrome::GetActiveTabContents(browser())); |