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_WM_WINDOW_MODALITY_CONTROLLER_H_ | 5 #ifndef ASH_WM_WINDOW_MODALITY_CONTROLLER_H_ |
6 #define ASH_WM_WINDOW_MODALITY_CONTROLLER_H_ | 6 #define ASH_WM_WINDOW_MODALITY_CONTROLLER_H_ |
7 | 7 |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "ash/ash_export.h" | 10 #include "ash/ash_export.h" |
(...skipping 24 matching lines...) Expand all Loading... |
35 public aura::WindowObserver { | 35 public aura::WindowObserver { |
36 public: | 36 public: |
37 WindowModalityController(); | 37 WindowModalityController(); |
38 virtual ~WindowModalityController(); | 38 virtual ~WindowModalityController(); |
39 | 39 |
40 // Overridden from aura::EventFilter: | 40 // Overridden from aura::EventFilter: |
41 virtual bool PreHandleKeyEvent(aura::Window* target, | 41 virtual bool PreHandleKeyEvent(aura::Window* target, |
42 ui::KeyEvent* event) OVERRIDE; | 42 ui::KeyEvent* event) OVERRIDE; |
43 virtual bool PreHandleMouseEvent(aura::Window* target, | 43 virtual bool PreHandleMouseEvent(aura::Window* target, |
44 ui::MouseEvent* event) OVERRIDE; | 44 ui::MouseEvent* event) OVERRIDE; |
45 virtual ui::TouchStatus PreHandleTouchEvent( | 45 virtual ui::EventResult PreHandleTouchEvent( |
46 aura::Window* target, | 46 aura::Window* target, |
47 ui::TouchEvent* event) OVERRIDE; | 47 ui::TouchEvent* event) OVERRIDE; |
48 virtual ui::EventResult PreHandleGestureEvent( | 48 virtual ui::EventResult PreHandleGestureEvent( |
49 aura::Window* target, | 49 aura::Window* target, |
50 ui::GestureEvent* event) OVERRIDE; | 50 ui::GestureEvent* event) OVERRIDE; |
51 | 51 |
52 // Overridden from aura::EnvObserver: | 52 // Overridden from aura::EnvObserver: |
53 virtual void OnWindowInitialized(aura::Window* window) OVERRIDE; | 53 virtual void OnWindowInitialized(aura::Window* window) OVERRIDE; |
54 | 54 |
55 // Overridden from aura::WindowObserver: | 55 // Overridden from aura::WindowObserver: |
56 virtual void OnWindowVisibilityChanged(aura::Window* window, | 56 virtual void OnWindowVisibilityChanged(aura::Window* window, |
57 bool visible) OVERRIDE; | 57 bool visible) OVERRIDE; |
58 virtual void OnWindowDestroyed(aura::Window* window) OVERRIDE; | 58 virtual void OnWindowDestroyed(aura::Window* window) OVERRIDE; |
59 | 59 |
60 private: | 60 private: |
61 // Processes a mouse/touch event, and returns true if the event should be | 61 // Processes a mouse/touch event, and returns true if the event should be |
62 // consumed. | 62 // consumed. |
63 bool ProcessLocatedEvent(aura::Window* target, | 63 bool ProcessLocatedEvent(aura::Window* target, |
64 ui::LocatedEvent* event); | 64 ui::LocatedEvent* event); |
65 | 65 |
66 std::vector<aura::Window*> windows_; | 66 std::vector<aura::Window*> windows_; |
67 | 67 |
68 DISALLOW_COPY_AND_ASSIGN(WindowModalityController); | 68 DISALLOW_COPY_AND_ASSIGN(WindowModalityController); |
69 }; | 69 }; |
70 | 70 |
71 } // namespace internal | 71 } // namespace internal |
72 } // namespace ash | 72 } // namespace ash |
73 | 73 |
74 #endif // ASH_WM_WINDOW_MODALITY_CONTROLLER_H_ | 74 #endif // ASH_WM_WINDOW_MODALITY_CONTROLLER_H_ |
OLD | NEW |