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

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

Issue 1784533003: [Extensions UI Cocoa] Make disabled actions respond to the keyboard (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Linux compile fix Created 4 years, 9 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/extensions/extension_action_view_controller.cc
diff --git a/chrome/browser/ui/extensions/extension_action_view_controller.cc b/chrome/browser/ui/extensions/extension_action_view_controller.cc
index ee58e3b0b9cdff30eb1cdf16db1684642155b500..06a8ec02c0007ef70458a8b32cf1249e6f649073 100644
--- a/chrome/browser/ui/extensions/extension_action_view_controller.cc
+++ b/chrome/browser/ui/extensions/extension_action_view_controller.cc
@@ -184,6 +184,15 @@ void ExtensionActionViewController::OnContextMenuClosed() {
}
bool ExtensionActionViewController::ExecuteAction(bool by_user) {
+ if (!ExtensionIsValid())
+ return false;
+
+ if (!IsEnabled(view_delegate_->GetCurrentWebContents())) {
+ if (DisabledClickOpensMenu())
+ GetPreferredPopupViewController()->platform_delegate_->ShowContextMenu();
+ return false;
+ }
+
return ExecuteAction(SHOW_POPUP, by_user);
}

Powered by Google App Engine
This is Rietveld 408576698