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

Unified Diff: ash/accelerators/accelerator_table.cc

Issue 10907084: ash: Prevent power button events from reaching apps. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 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_table.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/accelerators/accelerator_table.cc
diff --git a/ash/accelerators/accelerator_table.cc b/ash/accelerators/accelerator_table.cc
index b9980832ea23f468cf1185636daf318b9d1b833d..7b4d0360c7611c19a82a33b4c49c6eb0e1ecc4b9 100644
--- a/ash/accelerators/accelerator_table.cc
+++ b/ash/accelerators/accelerator_table.cc
@@ -46,6 +46,8 @@ const AcceleratorData kAcceleratorData[] = {
{ true, ui::VKEY_KBD_BRIGHTNESS_UP, ui::EF_NONE, KEYBOARD_BRIGHTNESS_UP },
{ true, ui::VKEY_F4, ui::EF_CONTROL_DOWN, CYCLE_DISPLAY_MODE },
{ true, ui::VKEY_L, ui::EF_SHIFT_DOWN | ui::EF_CONTROL_DOWN, LOCK_SCREEN },
+ { true, ui::VKEY_POWER, ui::EF_NONE, POWER_PRESSED },
+ { false, ui::VKEY_POWER, ui::EF_NONE, POWER_RELEASED },
#if !defined(NDEBUG)
// Extra shortcut for debug build to activate lock screen on linux desktop.
{ true, ui::VKEY_L, ui::EF_ALT_DOWN, LOCK_SCREEN },
@@ -185,7 +187,9 @@ const AcceleratorAction kReservedActions[] = {
MAGNIFY_SCREEN_ZOOM_IN, // Control+F7
VOLUME_MUTE, // F8
VOLUME_DOWN, // F9
- VOLUME_UP // F10
+ VOLUME_UP, // F10
+ POWER_PRESSED,
+ POWER_RELEASED,
// TODO(yusukes): Handle F1, F2, F3, and F4 without modifiers in BrowserView.
#endif
};
« no previous file with comments | « ash/accelerators/accelerator_table.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698