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 UI_WM_CORE_ACCELERATOR_FILTER_H_ | 5 #ifndef UI_WM_CORE_ACCELERATOR_FILTER_H_ |
6 #define UI_WM_CORE_ACCELERATOR_FILTER_H_ | 6 #define UI_WM_CORE_ACCELERATOR_FILTER_H_ |
7 | 7 |
8 #include "base/macros.h" | 8 #include "base/macros.h" |
9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
10 #include "ui/events/event_handler.h" | 10 #include "ui/events/event_handler.h" |
(...skipping 10 matching lines...) Expand all Loading... |
21 // AcceleratorFilter filters key events for AcceleratorControler handling global | 21 // AcceleratorFilter filters key events for AcceleratorControler handling global |
22 // keyboard accelerators. | 22 // keyboard accelerators. |
23 class WM_EXPORT AcceleratorFilter : public ui::EventHandler { | 23 class WM_EXPORT AcceleratorFilter : public ui::EventHandler { |
24 public: | 24 public: |
25 // AcceleratorFilter doesn't own |accelerator_history|, it's owned by | 25 // AcceleratorFilter doesn't own |accelerator_history|, it's owned by |
26 // AcceleratorController. | 26 // AcceleratorController. |
27 AcceleratorFilter(scoped_ptr<AcceleratorDelegate> delegate, | 27 AcceleratorFilter(scoped_ptr<AcceleratorDelegate> delegate, |
28 ui::AcceleratorHistory* accelerator_history); | 28 ui::AcceleratorHistory* accelerator_history); |
29 ~AcceleratorFilter() override; | 29 ~AcceleratorFilter() override; |
30 | 30 |
31 // ui::EventHandler: | 31 // Overridden from ui::EventHandler: |
32 void OnKeyEvent(ui::KeyEvent* event) override; | 32 void OnKeyEvent(ui::KeyEvent* event) override; |
33 void OnMouseEvent(ui::MouseEvent* event) override; | |
34 | 33 |
35 private: | 34 private: |
36 scoped_ptr<AcceleratorDelegate> delegate_; | 35 scoped_ptr<AcceleratorDelegate> delegate_; |
37 ui::AcceleratorHistory* accelerator_history_; | 36 ui::AcceleratorHistory* accelerator_history_; |
38 | 37 |
39 DISALLOW_COPY_AND_ASSIGN(AcceleratorFilter); | 38 DISALLOW_COPY_AND_ASSIGN(AcceleratorFilter); |
40 }; | 39 }; |
41 | 40 |
42 } // namespace wm | 41 } // namespace wm |
43 | 42 |
44 #endif // UI_WM_CORE_ACCELERATOR_FILTER_H_ | 43 #endif // UI_WM_CORE_ACCELERATOR_FILTER_H_ |
OLD | NEW |