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 #ifndef ASH_ACCELERATORS_ACCELERATOR_DELEGATE_H_ | 5 #ifndef ASH_ACCELERATORS_ACCELERATOR_DELEGATE_H_ |
6 #define ASH_ACCELERATORS_ACCELERATOR_DELEGATE_H_ | 6 #define ASH_ACCELERATORS_ACCELERATOR_DELEGATE_H_ |
7 | 7 |
8 #include "ash/ash_export.h" | 8 #include "ash/ash_export.h" |
9 #include "base/macros.h" | 9 #include "base/macros.h" |
10 #include "ui/wm/core/accelerator_delegate.h" | 10 #include "ui/wm/core/accelerator_delegate.h" |
11 | 11 |
12 namespace ash { | 12 namespace ash { |
13 | 13 |
14 class ASH_EXPORT AcceleratorDelegate | 14 class ASH_EXPORT AcceleratorDelegate |
15 : NON_EXPORTED_BASE(public wm::AcceleratorDelegate) { | 15 : NON_EXPORTED_BASE(public wm::AcceleratorDelegate) { |
16 public: | 16 public: |
17 AcceleratorDelegate(); | 17 AcceleratorDelegate(); |
18 virtual ~AcceleratorDelegate(); | 18 virtual ~AcceleratorDelegate(); |
19 | 19 |
20 // wm::AcceleratorDelegate: | 20 // wm::AcceleratorDelegate: |
21 virtual void PreProcessAccelerator( | |
22 const ui::Accelerator& accelerator) OVERRIDE; | |
23 virtual bool CanConsumeSystemKeys(const ui::KeyEvent& event) OVERRIDE; | 21 virtual bool CanConsumeSystemKeys(const ui::KeyEvent& event) OVERRIDE; |
24 virtual bool ShouldProcessAcceleratorNow( | 22 virtual bool ShouldProcessAcceleratorNow( |
25 const ui::KeyEvent& key_event, | 23 const ui::KeyEvent& key_event, |
26 const ui::Accelerator& accelerator) OVERRIDE; | 24 const ui::Accelerator& accelerator) OVERRIDE; |
27 virtual bool ProcessAccelerator(const ui::Accelerator& accelerator) OVERRIDE; | 25 virtual bool ProcessAccelerator(const ui::Accelerator& accelerator) OVERRIDE; |
28 | 26 |
29 private: | 27 private: |
30 DISALLOW_COPY_AND_ASSIGN(AcceleratorDelegate); | 28 DISALLOW_COPY_AND_ASSIGN(AcceleratorDelegate); |
31 }; | 29 }; |
32 | 30 |
33 } // namespace ash | 31 } // namespace ash |
34 | 32 |
35 #endif // ASH_ACCELERATORS_ACCELERATOR_DELEGATE_H_ | 33 #endif // ASH_ACCELERATORS_ACCELERATOR_DELEGATE_H_ |
OLD | NEW |