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 |
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
89 // Performs the specified action. The |accelerator| may provide additional | 89 // Performs the specified action. The |accelerator| may provide additional |
90 // data the action needs. Returns whether an action was performed | 90 // data the action needs. Returns whether an action was performed |
91 // successfully. | 91 // successfully. |
92 bool PerformAction(int action, | 92 bool PerformAction(int action, |
93 const ui::Accelerator& accelerator); | 93 const ui::Accelerator& accelerator); |
94 | 94 |
95 // Returns the restriction for the current context. | 95 // Returns the restriction for the current context. |
96 AcceleratorProcessingRestriction GetCurrentAcceleratorRestriction(); | 96 AcceleratorProcessingRestriction GetCurrentAcceleratorRestriction(); |
97 | 97 |
98 // Overridden from ui::AcceleratorTarget: | 98 // Overridden from ui::AcceleratorTarget: |
99 virtual bool AcceleratorPressed(const ui::Accelerator& accelerator) OVERRIDE; | 99 virtual bool AcceleratorPressed(const ui::Accelerator& accelerator) override; |
100 virtual bool CanHandleAccelerators() const OVERRIDE; | 100 virtual bool CanHandleAccelerators() const override; |
101 | 101 |
102 void SetBrightnessControlDelegate( | 102 void SetBrightnessControlDelegate( |
103 scoped_ptr<BrightnessControlDelegate> brightness_control_delegate); | 103 scoped_ptr<BrightnessControlDelegate> brightness_control_delegate); |
104 void SetImeControlDelegate( | 104 void SetImeControlDelegate( |
105 scoped_ptr<ImeControlDelegate> ime_control_delegate); | 105 scoped_ptr<ImeControlDelegate> ime_control_delegate); |
106 void SetScreenshotDelegate( | 106 void SetScreenshotDelegate( |
107 scoped_ptr<ScreenshotDelegate> screenshot_delegate); | 107 scoped_ptr<ScreenshotDelegate> screenshot_delegate); |
108 BrightnessControlDelegate* brightness_control_delegate() const { | 108 BrightnessControlDelegate* brightness_control_delegate() const { |
109 return brightness_control_delegate_.get(); | 109 return brightness_control_delegate_.get(); |
110 } | 110 } |
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
180 std::set<int> actions_allowed_in_app_mode_; | 180 std::set<int> actions_allowed_in_app_mode_; |
181 // Actions disallowed if there are no windows. | 181 // Actions disallowed if there are no windows. |
182 std::set<int> actions_needing_window_; | 182 std::set<int> actions_needing_window_; |
183 | 183 |
184 DISALLOW_COPY_AND_ASSIGN(AcceleratorController); | 184 DISALLOW_COPY_AND_ASSIGN(AcceleratorController); |
185 }; | 185 }; |
186 | 186 |
187 } // namespace ash | 187 } // namespace ash |
188 | 188 |
189 #endif // ASH_ACCELERATORS_ACCELERATOR_CONTROLLER_H_ | 189 #endif // ASH_ACCELERATORS_ACCELERATOR_CONTROLLER_H_ |
OLD | NEW |