| Index: chrome/browser/cocoa/extensions/extension_action_context_menu.mm
|
| diff --git a/chrome/browser/cocoa/extensions/extension_action_context_menu.mm b/chrome/browser/cocoa/extensions/extension_action_context_menu.mm
|
| index 797f517dbe0c98f4ca43a1e3e41e2485ba7a231b..be9553d8b3c1005f088a9aad3c5805d94fa8f7da 100644
|
| --- a/chrome/browser/cocoa/extensions/extension_action_context_menu.mm
|
| +++ b/chrome/browser/cocoa/extensions/extension_action_context_menu.mm
|
| @@ -241,13 +241,18 @@ int CurrentTabId() {
|
| [window->cocoa_controller() toolbarController];
|
| LocationBarViewMac* locationBarView =
|
| [toolbarController locationBarBridge];
|
| - NSPoint popupPoint = locationBarView->GetPageActionBubblePoint(action_);
|
|
|
| - // If there was no matching page action, it was a browser action.
|
| - if (NSEqualPoints(popupPoint, NSZeroPoint)) {
|
| + NSPoint popupPoint = NSZeroPoint;
|
| + if (extension_->page_action() == action_) {
|
| + popupPoint = locationBarView->GetPageActionBubblePoint(action_);
|
| +
|
| + } else if (extension_->browser_action() == action_) {
|
| BrowserActionsController* controller =
|
| [toolbarController browserActionsController];
|
| popupPoint = [controller popupPointForBrowserAction:extension_];
|
| +
|
| + } else {
|
| + NOTREACHED() << "action_ is not a page action or browser action?";
|
| }
|
|
|
| int tabId = CurrentTabId();
|
|
|