| 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 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <map> | 9 #include <map> |
| 10 | 10 |
| (...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 69 void SetVolumeControlDelegate( | 69 void SetVolumeControlDelegate( |
| 70 scoped_ptr<VolumeControlDelegate> volume_control_delegate); | 70 scoped_ptr<VolumeControlDelegate> volume_control_delegate); |
| 71 | 71 |
| 72 BrightnessControlDelegate* brightness_control_delegate() const { | 72 BrightnessControlDelegate* brightness_control_delegate() const { |
| 73 return brightness_control_delegate_.get(); | 73 return brightness_control_delegate_.get(); |
| 74 } | 74 } |
| 75 | 75 |
| 76 private: | 76 private: |
| 77 // Initialize the accelerators this class handles as a target. | 77 // Initialize the accelerators this class handles as a target. |
| 78 void Init(); | 78 void Init(); |
| 79 void SwitchToWindow(const unsigned int window); |
| 79 | 80 |
| 80 scoped_ptr<ui::AcceleratorManager> accelerator_manager_; | 81 scoped_ptr<ui::AcceleratorManager> accelerator_manager_; |
| 81 | 82 |
| 82 scoped_ptr<BrightnessControlDelegate> brightness_control_delegate_; | 83 scoped_ptr<BrightnessControlDelegate> brightness_control_delegate_; |
| 83 scoped_ptr<CapsLockDelegate> caps_lock_delegate_; | 84 scoped_ptr<CapsLockDelegate> caps_lock_delegate_; |
| 84 scoped_ptr<ImeControlDelegate> ime_control_delegate_; | 85 scoped_ptr<ImeControlDelegate> ime_control_delegate_; |
| 85 scoped_ptr<ScreenshotDelegate> screenshot_delegate_; | 86 scoped_ptr<ScreenshotDelegate> screenshot_delegate_; |
| 86 scoped_ptr<VolumeControlDelegate> volume_control_delegate_; | 87 scoped_ptr<VolumeControlDelegate> volume_control_delegate_; |
| 87 | 88 |
| 88 // A map from accelerators to the AcceleratorAction values, which are used in | 89 // A map from accelerators to the AcceleratorAction values, which are used in |
| 89 // the implementation. | 90 // the implementation. |
| 90 std::map<ui::Accelerator, int> accelerators_; | 91 std::map<ui::Accelerator, int> accelerators_; |
| 91 | 92 |
| 92 DISALLOW_COPY_AND_ASSIGN(AcceleratorController); | 93 DISALLOW_COPY_AND_ASSIGN(AcceleratorController); |
| 93 }; | 94 }; |
| 94 | 95 |
| 95 } // namespace ash | 96 } // namespace ash |
| 96 | 97 |
| 97 #endif // ASH_ACCELERATORS_ACCELERATOR_CONTROLLER_H_ | 98 #endif // ASH_ACCELERATORS_ACCELERATOR_CONTROLLER_H_ |
| OLD | NEW |