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_FILTER_H_ | 5 #ifndef ASH_ACCELERATORS_ACCELERATOR_FILTER_H_ |
6 #define ASH_ACCELERATORS_ACCELERATOR_FILTER_H_ | 6 #define ASH_ACCELERATORS_ACCELERATOR_FILTER_H_ |
7 | 7 |
8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
9 #include "base/compiler_specific.h" | 9 #include "base/compiler_specific.h" |
10 #include "ui/aura/event_filter.h" | 10 #include "ui/aura/event_filter.h" |
11 #include "ash/ash_export.h" | 11 #include "ash/ash_export.h" |
12 | 12 |
13 namespace ash { | 13 namespace ash { |
14 namespace internal { | 14 namespace internal { |
15 | 15 |
16 // AcceleratorFilter filters key events for AcceleratorControler handling global | 16 // AcceleratorFilter filters key events for AcceleratorControler handling global |
17 // keyboard accelerators. | 17 // keyboard accelerators. |
18 class ASH_EXPORT AcceleratorFilter : public aura::EventFilter { | 18 class ASH_EXPORT AcceleratorFilter : public aura::EventFilter { |
19 public: | 19 public: |
20 AcceleratorFilter(); | 20 AcceleratorFilter(); |
21 virtual ~AcceleratorFilter(); | 21 virtual ~AcceleratorFilter(); |
22 | 22 |
23 // Overridden from aura::EventFilter: | 23 // Overridden from aura::EventFilter: |
24 virtual bool PreHandleKeyEvent(aura::Window* target, | 24 virtual bool PreHandleKeyEvent(aura::Window* target, |
25 ui::KeyEvent* event) OVERRIDE; | 25 ui::KeyEvent* event) OVERRIDE; |
26 virtual bool PreHandleMouseEvent(aura::Window* target, | 26 virtual bool PreHandleMouseEvent(aura::Window* target, |
27 ui::MouseEvent* event) OVERRIDE; | 27 ui::MouseEvent* event) OVERRIDE; |
28 virtual ui::TouchStatus PreHandleTouchEvent( | 28 virtual ui::EventResult PreHandleTouchEvent( |
29 aura::Window* target, | 29 aura::Window* target, |
30 ui::TouchEvent* event) OVERRIDE; | 30 ui::TouchEvent* event) OVERRIDE; |
31 virtual ui::EventResult PreHandleGestureEvent( | 31 virtual ui::EventResult PreHandleGestureEvent( |
32 aura::Window* target, | 32 aura::Window* target, |
33 ui::GestureEvent* event) OVERRIDE; | 33 ui::GestureEvent* event) OVERRIDE; |
34 | 34 |
35 private: | 35 private: |
36 DISALLOW_COPY_AND_ASSIGN(AcceleratorFilter); | 36 DISALLOW_COPY_AND_ASSIGN(AcceleratorFilter); |
37 }; | 37 }; |
38 | 38 |
39 } // namespace internal | 39 } // namespace internal |
40 } // namespace ash | 40 } // namespace ash |
41 | 41 |
42 #endif // ASH_ACCELERATORS_ACCELERATOR_FILTER_H_ | 42 #endif // ASH_ACCELERATORS_ACCELERATOR_FILTER_H_ |
OLD | NEW |