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

Side by Side Diff: ash/accelerators/accelerator_controller.h

Issue 14587007: Unify and change logout/sleep/lock shortcuts (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: exit warning 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef ASH_ACCELERATORS_ACCELERATOR_CONTROLLER_H_ 5 #ifndef ASH_ACCELERATORS_ACCELERATOR_CONTROLLER_H_
6 #define ASH_ACCELERATORS_ACCELERATOR_CONTROLLER_H_ 6 #define ASH_ACCELERATORS_ACCELERATOR_CONTROLLER_H_
7 7
8 #include <map> 8 #include <map>
9 #include <set> 9 #include <set>
10 10
11 #include "ash/ash_export.h" 11 #include "ash/ash_export.h"
12 #include "base/basictypes.h" 12 #include "base/basictypes.h"
13 #include "base/compiler_specific.h" 13 #include "base/compiler_specific.h"
14 #include "base/gtest_prod_util.h" 14 #include "base/gtest_prod_util.h"
15 #include "base/memory/scoped_ptr.h" 15 #include "base/memory/scoped_ptr.h"
16 #include "ui/base/accelerators/accelerator.h" 16 #include "ui/base/accelerators/accelerator.h"
17 17
18 namespace ui { 18 namespace ui {
19 class AcceleratorManager; 19 class AcceleratorManager;
20 } 20 }
21 21
22 namespace ash { 22 namespace ash {
23 23
24 struct AcceleratorData; 24 struct AcceleratorData;
25 class BrightnessControlDelegate; 25 class BrightnessControlDelegate;
26 class ExitWarningHandler;
26 class ImeControlDelegate; 27 class ImeControlDelegate;
27 class KeyboardBrightnessControlDelegate; 28 class KeyboardBrightnessControlDelegate;
28 class ScreenshotDelegate; 29 class ScreenshotDelegate;
29 class VolumeControlDelegate; 30 class VolumeControlDelegate;
30 31
31 // Stores information about accelerator context, eg. previous accelerator 32 // Stores information about accelerator context, eg. previous accelerator
32 // or if the current accelerator is repeated or not. 33 // or if the current accelerator is repeated or not.
33 class ASH_EXPORT AcceleratorControllerContext { 34 class ASH_EXPORT AcceleratorControllerContext {
34 public: 35 public:
35 AcceleratorControllerContext(); 36 AcceleratorControllerContext();
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
127 128
128 void SetKeyboardBrightnessControlDelegate( 129 void SetKeyboardBrightnessControlDelegate(
129 scoped_ptr<KeyboardBrightnessControlDelegate> 130 scoped_ptr<KeyboardBrightnessControlDelegate>
130 keyboard_brightness_control_delegate); 131 keyboard_brightness_control_delegate);
131 132
132 scoped_ptr<ui::AcceleratorManager> accelerator_manager_; 133 scoped_ptr<ui::AcceleratorManager> accelerator_manager_;
133 134
134 // TODO(derat): BrightnessControlDelegate is also used by the system tray; 135 // TODO(derat): BrightnessControlDelegate is also used by the system tray;
135 // move it outside of this class. 136 // move it outside of this class.
136 scoped_ptr<BrightnessControlDelegate> brightness_control_delegate_; 137 scoped_ptr<BrightnessControlDelegate> brightness_control_delegate_;
138 scoped_ptr<ExitWarningHandler> exit_warning_handler_;
137 scoped_ptr<ImeControlDelegate> ime_control_delegate_; 139 scoped_ptr<ImeControlDelegate> ime_control_delegate_;
138 scoped_ptr<KeyboardBrightnessControlDelegate> 140 scoped_ptr<KeyboardBrightnessControlDelegate>
139 keyboard_brightness_control_delegate_; 141 keyboard_brightness_control_delegate_;
140 scoped_ptr<ScreenshotDelegate> screenshot_delegate_; 142 scoped_ptr<ScreenshotDelegate> screenshot_delegate_;
141 143
142 // Contextual information, eg. if the current accelerator is repeated. 144 // Contextual information, eg. if the current accelerator is repeated.
143 AcceleratorControllerContext context_; 145 AcceleratorControllerContext context_;
144 146
145 // A map from accelerators to the AcceleratorAction values, which are used in 147 // A map from accelerators to the AcceleratorAction values, which are used in
146 // the implementation. 148 // the implementation.
(...skipping 11 matching lines...) Expand all
158 std::set<int> nonrepeatable_actions_; 160 std::set<int> nonrepeatable_actions_;
159 // Actions allowed in app mode. 161 // Actions allowed in app mode.
160 std::set<int> actions_allowed_in_app_mode_; 162 std::set<int> actions_allowed_in_app_mode_;
161 163
162 DISALLOW_COPY_AND_ASSIGN(AcceleratorController); 164 DISALLOW_COPY_AND_ASSIGN(AcceleratorController);
163 }; 165 };
164 166
165 } // namespace ash 167 } // namespace ash
166 168
167 #endif // ASH_ACCELERATORS_ACCELERATOR_CONTROLLER_H_ 169 #endif // ASH_ACCELERATORS_ACCELERATOR_CONTROLLER_H_
OLDNEW
« no previous file with comments | « no previous file | ash/accelerators/accelerator_controller.cc » ('j') | ash/accelerators/accelerator_controller.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698