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

Unified Diff: chrome/browser/ui/views/extensions/extension_action_view_controller.cc

Issue 561023002: Use the wrench menu as a reference view for overflowed extension actions' popups (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 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/views/extensions/extension_action_view_controller.cc
diff --git a/chrome/browser/ui/views/extensions/extension_action_view_controller.cc b/chrome/browser/ui/views/extensions/extension_action_view_controller.cc
index 9256bd0b36e9279b8869b19bab76eacc64f30f97..23305920cb86ca636f18f9f6d3b464f8eaa14703 100644
--- a/chrome/browser/ui/views/extensions/extension_action_view_controller.cc
+++ b/chrome/browser/ui/views/extensions/extension_action_view_controller.cc
@@ -244,6 +244,11 @@ void ExtensionActionViewController::DoShowContextMenu(
bool ExtensionActionViewController::ShowPopupWithUrl(
ExtensionPopup::ShowAction show_action, const GURL& popup_url) {
+ ExtensionActionViewController* preferred_controller =
+ delegate_->GetPreferredPopupViewController();
+ if (preferred_controller != this)
Peter Kasting 2014/09/11 20:23:12 Can we just make callers call this method on the c
Devlin 2014/09/11 20:53:42 I think that's actually more complicated overall.
Peter Kasting 2014/09/11 20:57:37 I'm only suggesting hoisting this to ExecuteAction
Devlin 2014/09/11 21:04:07 Ah, misunderstood. Yes, that's fine - done. (Onl
+ return preferred_controller->ShowPopupWithUrl(show_action, popup_url);
+
// If we're already showing the popup for this browser action, just hide it
// and return.
bool already_showing = popup_ != NULL;

Powered by Google App Engine
This is Rietveld 408576698