| OLD | NEW |
| 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/accelerators/exit_warning_handler.h" |
| 11 #include "ash/ash_export.h" | 12 #include "ash/ash_export.h" |
| 12 #include "base/basictypes.h" | 13 #include "base/basictypes.h" |
| 13 #include "base/compiler_specific.h" | 14 #include "base/compiler_specific.h" |
| 14 #include "base/gtest_prod_util.h" | 15 #include "base/gtest_prod_util.h" |
| 15 #include "base/memory/scoped_ptr.h" | 16 #include "base/memory/scoped_ptr.h" |
| 16 #include "ui/base/accelerators/accelerator.h" | 17 #include "ui/base/accelerators/accelerator.h" |
| 17 | 18 |
| 18 namespace ui { | 19 namespace ui { |
| 19 class AcceleratorManager; | 20 class AcceleratorManager; |
| 20 } | 21 } |
| 21 | 22 |
| 22 namespace ash { | 23 namespace ash { |
| 23 | 24 |
| 24 struct AcceleratorData; | 25 struct AcceleratorData; |
| 25 class BrightnessControlDelegate; | 26 class BrightnessControlDelegate; |
| 27 class ExitWarningHandler; |
| 26 class ImeControlDelegate; | 28 class ImeControlDelegate; |
| 27 class KeyboardBrightnessControlDelegate; | 29 class KeyboardBrightnessControlDelegate; |
| 28 class ScreenshotDelegate; | 30 class ScreenshotDelegate; |
| 29 class VolumeControlDelegate; | 31 class VolumeControlDelegate; |
| 30 | 32 |
| 31 // Stores information about accelerator context, eg. previous accelerator | 33 // Stores information about accelerator context, eg. previous accelerator |
| 32 // or if the current accelerator is repeated or not. | 34 // or if the current accelerator is repeated or not. |
| 33 class ASH_EXPORT AcceleratorControllerContext { | 35 class ASH_EXPORT AcceleratorControllerContext { |
| 34 public: | 36 public: |
| 35 AcceleratorControllerContext(); | 37 AcceleratorControllerContext(); |
| (...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 127 | 129 |
| 128 void SetKeyboardBrightnessControlDelegate( | 130 void SetKeyboardBrightnessControlDelegate( |
| 129 scoped_ptr<KeyboardBrightnessControlDelegate> | 131 scoped_ptr<KeyboardBrightnessControlDelegate> |
| 130 keyboard_brightness_control_delegate); | 132 keyboard_brightness_control_delegate); |
| 131 | 133 |
| 132 scoped_ptr<ui::AcceleratorManager> accelerator_manager_; | 134 scoped_ptr<ui::AcceleratorManager> accelerator_manager_; |
| 133 | 135 |
| 134 // TODO(derat): BrightnessControlDelegate is also used by the system tray; | 136 // TODO(derat): BrightnessControlDelegate is also used by the system tray; |
| 135 // move it outside of this class. | 137 // move it outside of this class. |
| 136 scoped_ptr<BrightnessControlDelegate> brightness_control_delegate_; | 138 scoped_ptr<BrightnessControlDelegate> brightness_control_delegate_; |
| 139 ExitWarningHandler exit_warning_handler_; |
| 137 scoped_ptr<ImeControlDelegate> ime_control_delegate_; | 140 scoped_ptr<ImeControlDelegate> ime_control_delegate_; |
| 138 scoped_ptr<KeyboardBrightnessControlDelegate> | 141 scoped_ptr<KeyboardBrightnessControlDelegate> |
| 139 keyboard_brightness_control_delegate_; | 142 keyboard_brightness_control_delegate_; |
| 140 scoped_ptr<ScreenshotDelegate> screenshot_delegate_; | 143 scoped_ptr<ScreenshotDelegate> screenshot_delegate_; |
| 141 | 144 |
| 142 // Contextual information, eg. if the current accelerator is repeated. | 145 // Contextual information, eg. if the current accelerator is repeated. |
| 143 AcceleratorControllerContext context_; | 146 AcceleratorControllerContext context_; |
| 144 | 147 |
| 145 // A map from accelerators to the AcceleratorAction values, which are used in | 148 // A map from accelerators to the AcceleratorAction values, which are used in |
| 146 // the implementation. | 149 // the implementation. |
| (...skipping 11 matching lines...) Expand all Loading... |
| 158 std::set<int> nonrepeatable_actions_; | 161 std::set<int> nonrepeatable_actions_; |
| 159 // Actions allowed in app mode. | 162 // Actions allowed in app mode. |
| 160 std::set<int> actions_allowed_in_app_mode_; | 163 std::set<int> actions_allowed_in_app_mode_; |
| 161 | 164 |
| 162 DISALLOW_COPY_AND_ASSIGN(AcceleratorController); | 165 DISALLOW_COPY_AND_ASSIGN(AcceleratorController); |
| 163 }; | 166 }; |
| 164 | 167 |
| 165 } // namespace ash | 168 } // namespace ash |
| 166 | 169 |
| 167 #endif // ASH_ACCELERATORS_ACCELERATOR_CONTROLLER_H_ | 170 #endif // ASH_ACCELERATORS_ACCELERATOR_CONTROLLER_H_ |
| OLD | NEW |