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

Unified Diff: ash/accelerators/accelerator_controller.h

Issue 1138523006: Enable keyboard accelerators while a menu is open (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rename the enum values Created 5 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
« no previous file with comments | « no previous file | ash/accelerators/accelerator_controller.cc » ('j') | ash/accelerators/accelerator_table.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/accelerators/accelerator_controller.h
diff --git a/ash/accelerators/accelerator_controller.h b/ash/accelerators/accelerator_controller.h
index a6c0a152d2096d2e274034b8a0288eeb8cc07f89..6aadbc724a14357da1b66cb1c165d54217004bbc 100644
--- a/ash/accelerators/accelerator_controller.h
+++ b/ash/accelerators/accelerator_controller.h
@@ -117,6 +117,13 @@ class ASH_EXPORT AcceleratorController : public ui::AcceleratorTarget {
return &exit_warning_handler_;
}
+ // Checks if the given accelerator can be performed without the need to close
+ // the menu (if one is present), returns false if this is the case, and true
+ // otherwise (the menu should be closed and the accelerator should be reposted
+ // after the menu exits).
pkotwicz 2015/09/10 19:13:00 Nit: I think this would make for a simpler comment
afakhry 2015/09/10 20:57:13 Done.
+ bool ShouldCloseMenuAndRepostAccelerator(
+ const ui::Accelerator& accelerator) const;
+
ui::AcceleratorHistory* accelerator_history() {
return accelerator_history_.get();
}
@@ -203,6 +210,8 @@ class ASH_EXPORT AcceleratorController : public ui::AcceleratorTarget {
std::set<int> actions_allowed_in_app_mode_;
// Actions disallowed if there are no windows.
std::set<int> actions_needing_window_;
+ // Actions that can be performed without closing the menu (if one is present).
+ std::set<int> actions_keeping_menu_open_;
DISALLOW_COPY_AND_ASSIGN(AcceleratorController);
};
« no previous file with comments | « no previous file | ash/accelerators/accelerator_controller.cc » ('j') | ash/accelerators/accelerator_table.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698