Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(142)

Unified Diff: chrome/browser/ui/cocoa/extensions/extension_action_platform_delegate_cocoa.mm

Issue 1105713002: [Extension Toolbar] Slide out overflowed actions for popups (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Latest master Created 5 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/cocoa/extensions/extension_action_platform_delegate_cocoa.mm
diff --git a/chrome/browser/ui/cocoa/extensions/extension_action_platform_delegate_cocoa.mm b/chrome/browser/ui/cocoa/extensions/extension_action_platform_delegate_cocoa.mm
index cf76fda1d4614587505314057f64a03c60e99eb4..c96449e491e0ae39fc852f6d6439892372791ca9 100644
--- a/chrome/browser/ui/cocoa/extensions/extension_action_platform_delegate_cocoa.mm
+++ b/chrome/browser/ui/cocoa/extensions/extension_action_platform_delegate_cocoa.mm
@@ -75,11 +75,20 @@ void ExtensionActionPlatformDelegateCocoa::OnDelegateSet() {
content::Source<Profile>(controller_->browser()->profile()));
}
-extensions::ExtensionViewHost*
-ExtensionActionPlatformDelegateCocoa::ShowPopupWithUrl(
- ExtensionActionViewController::PopupShowAction show_action,
- const GURL& popup_url,
- bool grant_tab_permissions) {
+void ExtensionActionPlatformDelegateCocoa::ShowPopup(
+ scoped_ptr<extensions::ExtensionViewHost> host,
+ bool grant_tab_permissions,
+ ExtensionActionViewController::PopupShowAction show_action) {
+ BOOL devMode =
+ show_action == ExtensionActionViewController::SHOW_POPUP_AND_INSPECT;
+ [ExtensionPopupController host:host.Pass()
+ inBrowser:controller_->browser()
+ anchoredAt:GetPopupPoint()
+ arrowLocation:info_bubble::kTopRight
+ devMode:devMode];
+}
+
+void ExtensionActionPlatformDelegateCocoa::CloseOverflowMenu() {
// If this was triggered by an action overflowed to the wrench menu, then
// the wrench menu will be open. Close it before opening the popup.
WrenchMenuController* wrenchMenuController =
@@ -89,16 +98,6 @@ ExtensionActionPlatformDelegateCocoa::ShowPopupWithUrl(
toolbarController] wrenchMenuController];
if ([wrenchMenuController isMenuOpen])
[wrenchMenuController cancel];
-
- BOOL devMode =
- show_action == ExtensionActionViewController::SHOW_POPUP_AND_INSPECT;
- ExtensionPopupController* popupController =
- [ExtensionPopupController showURL:popup_url
- inBrowser:controller_->browser()
- anchoredAt:GetPopupPoint()
- arrowLocation:info_bubble::kTopRight
- devMode:devMode];
- return [popupController extensionViewHost];
}
NSPoint ExtensionActionPlatformDelegateCocoa::GetPopupPoint() const {

Powered by Google App Engine
This is Rietveld 408576698