Chromium Code Reviews| Index: ash/accelerators/accelerator_controller.h |
| diff --git a/ash/accelerators/accelerator_controller.h b/ash/accelerators/accelerator_controller.h |
| index 9a7c579ac99df650045820ec1379b232fe3ebe41..cbb1896e33d69f0a20b79cc4f25b2eb342c29b55 100644 |
| --- a/ash/accelerators/accelerator_controller.h |
| +++ b/ash/accelerators/accelerator_controller.h |
| @@ -15,6 +15,7 @@ |
| #include "base/gtest_prod_util.h" |
| #include "base/memory/scoped_ptr.h" |
| #include "ui/base/accelerators/accelerator.h" |
| +#include "ui/base/accelerators/accelerator_history.h" |
| namespace ui { |
| class AcceleratorManager; |
| @@ -35,7 +36,7 @@ class VolumeControlDelegate; |
| // also implements several handlers as an accelerator target. |
| class ASH_EXPORT AcceleratorController : public ui::AcceleratorTarget { |
| public: |
| - AcceleratorController(); |
| + AcceleratorController(ui::AcceleratorHistory* accelerator_history); |
| ~AcceleratorController() override; |
| // A list of possible ways in which an accelerator should be restricted before |
| @@ -117,8 +118,8 @@ class ASH_EXPORT AcceleratorController : public ui::AcceleratorTarget { |
| return &exit_warning_handler_; |
| } |
| - const ui::Accelerator& previous_accelerator_for_test() const { |
| - return previous_accelerator_; |
| + ui::AcceleratorHistory* accelerator_history_for_test() { |
| + return accelerator_history_; |
| } |
| private: |
| @@ -144,6 +145,8 @@ class ASH_EXPORT AcceleratorController : public ui::AcceleratorTarget { |
| scoped_ptr<ui::AcceleratorManager> accelerator_manager_; |
| + ui::AcceleratorHistory* accelerator_history_; |
|
Jun Mukai
2014/11/18 17:33:44
It's better to be owned by this class (or let acce
afakhry
2014/11/18 19:23:51
Done.
|
| + |
| // TODO(derat): BrightnessControlDelegate is also used by the system tray; |
| // move it outside of this class. |
| scoped_ptr<BrightnessControlDelegate> brightness_control_delegate_; |
| @@ -152,10 +155,6 @@ class ASH_EXPORT AcceleratorController : public ui::AcceleratorTarget { |
| keyboard_brightness_control_delegate_; |
| scoped_ptr<ScreenshotDelegate> screenshot_delegate_; |
| - // Remember previous accelerator as some accelerator needs to be fired |
| - // with a specific sequence. |
| - ui::Accelerator previous_accelerator_; |
| - |
| // Handles the exit accelerator which requires a double press to exit and |
| // shows a popup with an explanation. |
| ExitWarningHandler exit_warning_handler_; |