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