| Index: chrome/browser/ui/cocoa/location_bar/page_action_decoration.mm
|
| diff --git a/chrome/browser/ui/cocoa/location_bar/page_action_decoration.mm b/chrome/browser/ui/cocoa/location_bar/page_action_decoration.mm
|
| index a64bbcf27158f063617b8ef8ec4f4182736c9de6..d054edb25652b437079b1e71a82fd4680e1afcf8 100644
|
| --- a/chrome/browser/ui/cocoa/location_bar/page_action_decoration.mm
|
| +++ b/chrome/browser/ui/cocoa/location_bar/page_action_decoration.mm
|
| @@ -55,7 +55,7 @@ PageActionDecoration::PageActionDecoration(
|
| preview_enabled_(false),
|
| ALLOW_THIS_IN_INITIALIZER_LIST(scoped_icon_animation_observer_(
|
| page_action->GetIconAnimation(
|
| - SessionID::IdForTab(owner->GetTabContents()->web_contents())),
|
| + SessionID::IdForTab(owner->GetWebContents())),
|
| this)) {
|
| const Extension* extension = browser->profile()->GetExtensionService()->
|
| GetExtensionById(page_action->extension_id(), false);
|
| @@ -115,15 +115,15 @@ bool PageActionDecoration::OnMousePressed(NSRect frame) {
|
| }
|
|
|
| bool PageActionDecoration::ActivatePageAction(NSRect frame) {
|
| - TabContents* tab_contents = owner_->GetTabContents();
|
| - if (!tab_contents) {
|
| + WebContents* web_contents = owner_->GetWebContents();
|
| + if (!web_contents) {
|
| // We don't want other code to try and handle this click. Returning true
|
| // prevents this by indicating that we handled it.
|
| return true;
|
| }
|
|
|
| LocationBarController* controller =
|
| - extensions::TabHelper::FromWebContents(tab_contents->web_contents())->
|
| + extensions::TabHelper::FromWebContents(web_contents)->
|
| location_bar_controller();
|
|
|
| // 1 is left click.
|
| @@ -153,9 +153,9 @@ bool PageActionDecoration::ActivatePageAction(NSRect frame) {
|
|
|
| void PageActionDecoration::OnIconUpdated() {
|
| // If we have no owner, that means this class is still being constructed.
|
| - TabContents* tab_contents = owner_ ? owner_->GetTabContents() : NULL;
|
| - if (tab_contents) {
|
| - UpdateVisibility(tab_contents->web_contents(), current_url_);
|
| + WebContents* web_contents = owner_ ? owner_->GetWebContents() : NULL;
|
| + if (web_contents) {
|
| + UpdateVisibility(web_contents, current_url_);
|
| owner_->RedrawDecoration(this);
|
| }
|
| }
|
|
|