OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #import "chrome/browser/ui/cocoa/extensions/extension_action_platform_delegate_c
ocoa.h" | 5 #import "chrome/browser/ui/cocoa/extensions/extension_action_platform_delegate_c
ocoa.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 #include <utility> | 8 #include <utility> |
9 | 9 |
10 #include "base/logging.h" | 10 #include "base/logging.h" |
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
69 | 69 |
70 void ExtensionActionPlatformDelegateCocoa::ShowPopup( | 70 void ExtensionActionPlatformDelegateCocoa::ShowPopup( |
71 scoped_ptr<extensions::ExtensionViewHost> host, | 71 scoped_ptr<extensions::ExtensionViewHost> host, |
72 bool grant_tab_permissions, | 72 bool grant_tab_permissions, |
73 ExtensionActionViewController::PopupShowAction show_action) { | 73 ExtensionActionViewController::PopupShowAction show_action) { |
74 BOOL devMode = | 74 BOOL devMode = |
75 show_action == ExtensionActionViewController::SHOW_POPUP_AND_INSPECT; | 75 show_action == ExtensionActionViewController::SHOW_POPUP_AND_INSPECT; |
76 [ExtensionPopupController host:host.Pass() | 76 [ExtensionPopupController host:host.Pass() |
77 inBrowser:controller_->browser() | 77 inBrowser:controller_->browser() |
78 anchoredAt:GetPopupPoint() | 78 anchoredAt:GetPopupPoint() |
79 arrowLocation:info_bubble::kTopRight | 79 arrowLocation:views::BubbleBorder::TOP_RIGHT |
80 devMode:devMode]; | 80 devMode:devMode]; |
81 } | 81 } |
82 | 82 |
83 void ExtensionActionPlatformDelegateCocoa::CloseOverflowMenu() { | 83 void ExtensionActionPlatformDelegateCocoa::CloseOverflowMenu() { |
84 // If this was triggered by an action overflowed to the wrench menu, then | 84 // If this was triggered by an action overflowed to the wrench menu, then |
85 // the wrench menu will be open. Close it before opening the popup. | 85 // the wrench menu will be open. Close it before opening the popup. |
86 WrenchMenuController* wrenchMenuController = | 86 WrenchMenuController* wrenchMenuController = |
87 [[[BrowserWindowController | 87 [[[BrowserWindowController |
88 browserWindowControllerForWindow: | 88 browserWindowControllerForWindow: |
89 controller_->browser()->window()->GetNativeWindow()] | 89 controller_->browser()->window()->GetNativeWindow()] |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
131 controller_->IsEnabled( | 131 controller_->IsEnabled( |
132 controller_->view_delegate()->GetCurrentWebContents())) { | 132 controller_->view_delegate()->GetCurrentWebContents())) { |
133 controller_->ExecuteAction(true); | 133 controller_->ExecuteAction(true); |
134 } | 134 } |
135 break; | 135 break; |
136 } | 136 } |
137 default: | 137 default: |
138 NOTREACHED() << L"Unexpected notification"; | 138 NOTREACHED() << L"Unexpected notification"; |
139 } | 139 } |
140 } | 140 } |
OLD | NEW |