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

Unified Diff: ash/accelerators/accelerator_table.h

Issue 582143004: Introduce "Preferred" accelerators (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fixed typo 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
« no previous file with comments | « ash/accelerators/accelerator_delegate.cc ('k') | ash/accelerators/accelerator_table.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/accelerators/accelerator_table.h
diff --git a/ash/accelerators/accelerator_table.h b/ash/accelerators/accelerator_table.h
index b7b60e33ab6fa053d8e6e2ace1ec7e0dc6f30635..68107f698872189c8d2f210e2f5409a0c9b329da 100644
--- a/ash/accelerators/accelerator_table.h
+++ b/ash/accelerators/accelerator_table.h
@@ -12,13 +12,18 @@
namespace ash {
-// There are four classes of accelerators in Ash:
+// There are five classes of accelerators in Ash:
//
// Ash (OS) reserved:
// * Neither packaged apps nor web pages can cancel.
-// * For example, Alt-Tab window cycling.
+// * For example, power button.
// * See kReservedActions below.
//
+// Ash (OS) preferred:
+// * Fullscreen window can consume, but normal window can't.
+// * For example, Alt-Tab window cycling.
+// * See kPreferredActions below.
+//
// Chrome OS system keys:
// * For legacy reasons, v1 apps can process and cancel. Otherwise handled
// directly by Ash.
@@ -136,6 +141,8 @@ enum AcceleratorAction {
OPEN_FILE_MANAGER,
SWITCH_TO_NEXT_USER,
SWITCH_TO_PREVIOUS_USER,
+#else
+ DUMMY_FOR_RESERVED,
#endif
};
@@ -163,6 +170,10 @@ ASH_EXPORT extern const size_t kDebugAcceleratorDataLength;
// Actions that should be handled very early in Ash unless the current target
// window is full-screen.
+ASH_EXPORT extern const AcceleratorAction kPreferredActions[];
+ASH_EXPORT extern const size_t kPreferredActionsLength;
+
+// Actions that are always handled in Ash.
ASH_EXPORT extern const AcceleratorAction kReservedActions[];
ASH_EXPORT extern const size_t kReservedActionsLength;
« no previous file with comments | « ash/accelerators/accelerator_delegate.cc ('k') | ash/accelerators/accelerator_table.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698