Index: chrome/browser/ui/views/location_bar/page_action_image_view.cc |
diff --git a/chrome/browser/ui/views/location_bar/page_action_image_view.cc b/chrome/browser/ui/views/location_bar/page_action_image_view.cc |
index ed0f8f60e19a7747998ab787dcf11dfb774fcaae..eb484cee99ce835c91ef15f8258df52449626a71 100644 |
--- a/chrome/browser/ui/views/location_bar/page_action_image_view.cc |
+++ b/chrome/browser/ui/views/location_bar/page_action_image_view.cc |
@@ -34,9 +34,8 @@ PageActionImageView::PageActionImageView(LocationBarView* owner, |
current_tab_id_(-1), |
preview_enabled_(false), |
popup_(NULL) { |
- const Extension* extension = owner_->browser()->profile()-> |
- GetExtensionService()->GetExtensionById(page_action->extension_id(), |
- false); |
+ const Extension* extension = owner_->profile()->GetExtensionService()-> |
+ GetExtensionById(page_action->extension_id(), false); |
DCHECK(extension); |
// Load all the icons declared in the manifest. This is the contents of the |
@@ -55,7 +54,7 @@ PageActionImageView::PageActionImageView(LocationBarView* owner, |
registrar_.Add(this, chrome::NOTIFICATION_EXTENSION_UNLOADED, |
content::Source<Profile>( |
- owner_->browser()->profile()->GetOriginalProfile())); |
+ owner_->profile()->GetOriginalProfile())); |
set_accessibility_focusable(true); |
@@ -105,13 +104,13 @@ void PageActionImageView::ExecuteAction(int button, |
popup_ = ExtensionPopup::ShowPopup( |
page_action_->GetPopupUrl(current_tab_id_), |
- owner_->browser(), |
+ owner_->FindBrowser(), |
this, |
arrow_location, |
inspect_with_devtools); |
popup_->GetWidget()->AddObserver(this); |
} else { |
- Profile* profile = owner_->browser()->profile(); |
+ Profile* profile = owner_->profile(); |
ExtensionService* service = profile->GetExtensionService(); |
service->browser_event_router()->PageActionExecuted( |
profile, page_action_->extension_id(), page_action_->id(), |
@@ -159,14 +158,14 @@ bool PageActionImageView::OnKeyPressed(const views::KeyEvent& event) { |
void PageActionImageView::ShowContextMenu(const gfx::Point& p, |
bool is_mouse_gesture) { |
- const Extension* extension = owner_->browser()->profile()-> |
+ const Extension* extension = owner_->profile()-> |
GetExtensionService()->GetExtensionById(page_action()->extension_id(), |
false); |
if (!extension->ShowConfigureContextMenus()) |
return; |
scoped_refptr<ExtensionContextMenuModel> context_menu_model( |
- new ExtensionContextMenuModel(extension, owner_->browser(), this)); |
+ new ExtensionContextMenuModel(extension, owner_->FindBrowser(), this)); |
views::MenuModelAdapter menu_model_adapter(context_menu_model.get()); |
menu_runner_.reset(new views::MenuRunner(menu_model_adapter.CreateMenu())); |
gfx::Point screen_loc; |