OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 #include "athena/input/public/accelerator_manager.h" | 5 #include "athena/input/public/accelerator_manager.h" |
6 | 6 |
7 #include "base/macros.h" | 7 #include "base/macros.h" |
8 | 8 |
9 namespace aura { | 9 namespace aura { |
10 class Window; | 10 class Window; |
11 } | 11 } |
12 | 12 |
13 namespace athena { | 13 namespace athena { |
14 | 14 |
15 // Handles screen related accelerators. | 15 // Handles screen related accelerators. |
16 class ScreenAcceleratorHandler : public AcceleratorHandler { | 16 class ScreenAcceleratorHandler : public AcceleratorHandler { |
17 public: | 17 public: |
18 explicit ScreenAcceleratorHandler(aura::Window* root_window); | 18 explicit ScreenAcceleratorHandler(aura::Window* root_window); |
19 | 19 |
20 private: | 20 private: |
21 virtual ~ScreenAcceleratorHandler(); | 21 virtual ~ScreenAcceleratorHandler(); |
22 | 22 |
23 // AcceleratorHandler: | 23 // AcceleratorHandler: |
24 virtual bool IsCommandEnabled(int command_id) const OVERRIDE; | 24 virtual bool IsCommandEnabled(int command_id) const override; |
25 virtual bool OnAcceleratorFired(int command_id, | 25 virtual bool OnAcceleratorFired(int command_id, |
26 const ui::Accelerator& accelerator) OVERRIDE; | 26 const ui::Accelerator& accelerator) override; |
27 | 27 |
28 aura::Window* root_window_; | 28 aura::Window* root_window_; |
29 | 29 |
30 DISALLOW_COPY_AND_ASSIGN(ScreenAcceleratorHandler); | 30 DISALLOW_COPY_AND_ASSIGN(ScreenAcceleratorHandler); |
31 }; | 31 }; |
32 | 32 |
33 } // namespace athena | 33 } // namespace athena |
OLD | NEW |