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

Unified Diff: ash/accelerators/accelerator_controller.h

Issue 14771027: Unify and change logout/sleep/lock shortcuts (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: update Created 7 years, 7 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/exit_warning_handler.h » ('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 b1e4bfc20a53cdedd0564e2824a2091de74abc19..61076e6c4e561a6ade07140ed95c7fa3d0fc41ff 100644
--- a/ash/accelerators/accelerator_controller.h
+++ b/ash/accelerators/accelerator_controller.h
@@ -41,6 +41,9 @@ class ASH_EXPORT AcceleratorControllerContext {
// event type of the previous accelerator.
void UpdateContext(const ui::Accelerator& accelerator);
+ const ui::Accelerator& current_accelerator() const {
+ return current_accelerator_;
+ }
const ui::Accelerator& previous_accelerator() const {
return previous_accelerator_;
}
@@ -141,7 +144,6 @@ class ASH_EXPORT AcceleratorController : public ui::AcceleratorTarget {
// TODO(derat): BrightnessControlDelegate is also used by the system tray;
// move it outside of this class.
scoped_ptr<BrightnessControlDelegate> brightness_control_delegate_;
- ExitWarningHandler exit_warning_handler_;
scoped_ptr<ImeControlDelegate> ime_control_delegate_;
scoped_ptr<KeyboardBrightnessControlDelegate>
keyboard_brightness_control_delegate_;
@@ -150,6 +152,10 @@ class ASH_EXPORT AcceleratorController : public ui::AcceleratorTarget {
// Contextual information, eg. if the current accelerator is repeated.
AcceleratorControllerContext context_;
+ // Handles the exit accelerator which requires a long hold to exit and
+ // shows a popup with an explanation.
+ ExitWarningHandler exit_warning_handler_;
+
// A map from accelerators to the AcceleratorAction values, which are used in
// the implementation.
std::map<ui::Accelerator, int> accelerators_;
« no previous file with comments | « no previous file | ash/accelerators/accelerator_controller.cc » ('j') | ash/accelerators/exit_warning_handler.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698