| Index: chrome/browser/ui/views/location_bar/page_action_image_view.cc
|
| ===================================================================
|
| --- chrome/browser/ui/views/location_bar/page_action_image_view.cc (revision 127082)
|
| +++ chrome/browser/ui/views/location_bar/page_action_image_view.cc (working copy)
|
| @@ -27,17 +27,16 @@
|
| using content::WebContents;
|
|
|
| PageActionImageView::PageActionImageView(LocationBarView* owner,
|
| - ExtensionAction* page_action,
|
| - Browser* browser)
|
| + ExtensionAction* page_action)
|
| : owner_(owner),
|
| page_action_(page_action),
|
| - browser_(browser),
|
| ALLOW_THIS_IN_INITIALIZER_LIST(tracker_(this)),
|
| current_tab_id_(-1),
|
| preview_enabled_(false),
|
| popup_(NULL) {
|
| - const Extension* extension = owner_->profile()->GetExtensionService()->
|
| - GetExtensionById(page_action->extension_id(), false);
|
| + const Extension* extension = owner_->browser()->profile()->
|
| + GetExtensionService()->GetExtensionById(page_action->extension_id(),
|
| + false);
|
| DCHECK(extension);
|
|
|
| // Load all the icons declared in the manifest. This is the contents of the
|
| @@ -56,7 +55,7 @@
|
|
|
| registrar_.Add(this, chrome::NOTIFICATION_EXTENSION_UNLOADED,
|
| content::Source<Profile>(
|
| - owner_->profile()->GetOriginalProfile()));
|
| + owner_->browser()->profile()->GetOriginalProfile()));
|
|
|
| set_accessibility_focusable(true);
|
|
|
| @@ -106,13 +105,13 @@
|
|
|
| popup_ = ExtensionPopup::ShowPopup(
|
| page_action_->GetPopupUrl(current_tab_id_),
|
| - browser_,
|
| + owner_->browser(),
|
| this,
|
| arrow_location,
|
| inspect_with_devtools);
|
| popup_->GetWidget()->AddObserver(this);
|
| } else {
|
| - Profile* profile = owner_->profile();
|
| + Profile* profile = owner_->browser()->profile();
|
| ExtensionService* service = profile->GetExtensionService();
|
| service->browser_event_router()->PageActionExecuted(
|
| profile, page_action_->extension_id(), page_action_->id(),
|
| @@ -160,13 +159,14 @@
|
|
|
| void PageActionImageView::ShowContextMenu(const gfx::Point& p,
|
| bool is_mouse_gesture) {
|
| - const Extension* extension = owner_->profile()->GetExtensionService()->
|
| - GetExtensionById(page_action()->extension_id(), false);
|
| + const Extension* extension = owner_->browser()->profile()->
|
| + GetExtensionService()->GetExtensionById(page_action()->extension_id(),
|
| + false);
|
| if (!extension->ShowConfigureContextMenus())
|
| return;
|
|
|
| scoped_refptr<ExtensionContextMenuModel> context_menu_model(
|
| - new ExtensionContextMenuModel(extension, browser_, this));
|
| + new ExtensionContextMenuModel(extension, owner_->browser(), this));
|
| views::MenuModelAdapter menu_model_adapter(context_menu_model.get());
|
| menu_runner_.reset(new views::MenuRunner(menu_model_adapter.CreateMenu()));
|
| gfx::Point screen_loc;
|
|
|