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 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
66 GetNotificationTypeForAction(*controller_->extension_action()), | 66 GetNotificationTypeForAction(*controller_->extension_action()), |
67 content::Source<Profile>(controller_->browser()->profile())); | 67 content::Source<Profile>(controller_->browser()->profile())); |
68 } | 68 } |
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:std::move(host) |
77 inBrowser:controller_->browser() | 77 inBrowser:controller_->browser() |
78 anchoredAt:GetPopupPoint() | 78 anchoredAt:GetPopupPoint() |
79 arrowLocation:info_bubble::kTopRight | 79 arrowLocation:info_bubble::kTopRight |
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 app menu, then the app | 84 // If this was triggered by an action overflowed to the app menu, then the app |
85 // menu will be open. Close it before opening the popup. | 85 // menu will be open. Close it before opening the popup. |
86 AppMenuController* appMenuController = | 86 AppMenuController* appMenuController = |
(...skipping 44 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 |