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

Unified Diff: ui/views/controls/button/custom_button.h

Issue 1544803004: Fix accelerator handling for in-menu buttons in the app menu. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years 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
« no previous file with comments | « chrome/browser/ui/views/toolbar/app_menu.cc ('k') | ui/views/controls/button/custom_button.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/controls/button/custom_button.h
diff --git a/ui/views/controls/button/custom_button.h b/ui/views/controls/button/custom_button.h
index 2f3508f453fb2536847deacccf41e29e8d288dba..5f6ffbd43ad61d3c39d3d7ea6211e28cf63a3a54 100644
--- a/ui/views/controls/button/custom_button.h
+++ b/ui/views/controls/button/custom_button.h
@@ -120,6 +120,11 @@ class VIEWS_EXPORT CustomButton : public Button,
// we simply return IsTriggerableEvent(event).
virtual bool ShouldEnterPushedState(const ui::Event& event);
+ // If true, handles accelerator events when the widget associated with this
+ // button is inactive. In-menu buttons in the hamburger menu such as zoom and
msw 2015/12/23 04:06:25 "Menu widgets are inactive, but buttons therein (e
meacer 2015/12/24 21:40:02 Done.
+ // cut/copy/paste are inactive, but they should still handle accelerators.
+ virtual bool ShouldHandleAcceleratorWhenInactive();
+
// Returns true if the button should enter hovered state; that is, if the
// mouse is over the button, and no other window has capture (which would
// prevent the button from receiving MouseExited events and updating its
« no previous file with comments | « chrome/browser/ui/views/toolbar/app_menu.cc ('k') | ui/views/controls/button/custom_button.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698