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 #include "ash/wm/window_cycle_controller.h" | 5 #include "ash/wm/window_cycle_controller.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 | 8 |
9 #include "ash/shell_delegate.h" | 9 #include "ash/shell_delegate.h" |
10 #include "ash/shell_window_ids.h" | 10 #include "ash/shell_window_ids.h" |
(...skipping 20 matching lines...) Expand all Loading... |
31 class WindowCycleEventFilter : public aura::EventFilter { | 31 class WindowCycleEventFilter : public aura::EventFilter { |
32 public: | 32 public: |
33 WindowCycleEventFilter(); | 33 WindowCycleEventFilter(); |
34 virtual ~WindowCycleEventFilter(); | 34 virtual ~WindowCycleEventFilter(); |
35 | 35 |
36 // Overridden from aura::EventFilter: | 36 // Overridden from aura::EventFilter: |
37 virtual bool PreHandleKeyEvent(aura::Window* target, | 37 virtual bool PreHandleKeyEvent(aura::Window* target, |
38 ui::KeyEvent* event) OVERRIDE; | 38 ui::KeyEvent* event) OVERRIDE; |
39 virtual bool PreHandleMouseEvent(aura::Window* target, | 39 virtual bool PreHandleMouseEvent(aura::Window* target, |
40 ui::MouseEvent* event) OVERRIDE; | 40 ui::MouseEvent* event) OVERRIDE; |
41 virtual ui::TouchStatus PreHandleTouchEvent( | 41 virtual ui::EventResult PreHandleTouchEvent( |
42 aura::Window* target, | 42 aura::Window* target, |
43 ui::TouchEvent* event) OVERRIDE; | 43 ui::TouchEvent* event) OVERRIDE; |
44 virtual ui::EventResult PreHandleGestureEvent( | 44 virtual ui::EventResult PreHandleGestureEvent( |
45 aura::Window* target, | 45 aura::Window* target, |
46 ui::GestureEvent* event) OVERRIDE; | 46 ui::GestureEvent* event) OVERRIDE; |
47 private: | 47 private: |
48 DISALLOW_COPY_AND_ASSIGN(WindowCycleEventFilter); | 48 DISALLOW_COPY_AND_ASSIGN(WindowCycleEventFilter); |
49 }; | 49 }; |
50 | 50 |
51 // Watch for all keyboard events by filtering the root window. | 51 // Watch for all keyboard events by filtering the root window. |
(...skipping 14 matching lines...) Expand all Loading... |
66 } | 66 } |
67 return false; // Always let the event propagate. | 67 return false; // Always let the event propagate. |
68 } | 68 } |
69 | 69 |
70 bool WindowCycleEventFilter::PreHandleMouseEvent( | 70 bool WindowCycleEventFilter::PreHandleMouseEvent( |
71 aura::Window* target, | 71 aura::Window* target, |
72 ui::MouseEvent* event) { | 72 ui::MouseEvent* event) { |
73 return false; // Not handled. | 73 return false; // Not handled. |
74 } | 74 } |
75 | 75 |
76 ui::TouchStatus WindowCycleEventFilter::PreHandleTouchEvent( | 76 ui::EventResult WindowCycleEventFilter::PreHandleTouchEvent( |
77 aura::Window* target, | 77 aura::Window* target, |
78 ui::TouchEvent* event) { | 78 ui::TouchEvent* event) { |
79 return ui::TOUCH_STATUS_UNKNOWN; // Not handled. | 79 return ui::ER_UNHANDLED; // Not handled. |
80 } | 80 } |
81 | 81 |
82 ui::EventResult WindowCycleEventFilter::PreHandleGestureEvent( | 82 ui::EventResult WindowCycleEventFilter::PreHandleGestureEvent( |
83 aura::Window* target, | 83 aura::Window* target, |
84 ui::GestureEvent* event) { | 84 ui::GestureEvent* event) { |
85 return ui::ER_UNHANDLED; // Not handled. | 85 return ui::ER_UNHANDLED; // Not handled. |
86 } | 86 } |
87 | 87 |
88 // Adds all the children of |window| to |windows|. | 88 // Adds all the children of |window| to |windows|. |
89 void AddAllChildren(aura::Window* window, | 89 void AddAllChildren(aura::Window* window, |
(...skipping 222 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
312 mru_windows_.remove(window); | 312 mru_windows_.remove(window); |
313 if (window->id() == internal::kShellWindowId_WorkspaceContainer) | 313 if (window->id() == internal::kShellWindowId_WorkspaceContainer) |
314 window->RemoveObserver(this); | 314 window->RemoveObserver(this); |
315 } | 315 } |
316 | 316 |
317 void WindowCycleController::OnWindowDestroying(aura::Window* window) { | 317 void WindowCycleController::OnWindowDestroying(aura::Window* window) { |
318 window->RemoveObserver(this); | 318 window->RemoveObserver(this); |
319 } | 319 } |
320 | 320 |
321 } // namespace ash | 321 } // namespace ash |
OLD | NEW |