| 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 24 matching lines...) Expand all Loading... |
| 35 // Overridden from aura::EventFilter: | 35 // Overridden from aura::EventFilter: |
| 36 virtual bool PreHandleKeyEvent(aura::Window* target, | 36 virtual bool PreHandleKeyEvent(aura::Window* target, |
| 37 ui::KeyEvent* event) OVERRIDE; | 37 ui::KeyEvent* event) OVERRIDE; |
| 38 virtual bool PreHandleMouseEvent(aura::Window* target, | 38 virtual bool PreHandleMouseEvent(aura::Window* target, |
| 39 ui::MouseEvent* event) OVERRIDE; | 39 ui::MouseEvent* event) OVERRIDE; |
| 40 virtual ui::TouchStatus PreHandleTouchEvent( | 40 virtual ui::TouchStatus PreHandleTouchEvent( |
| 41 aura::Window* target, | 41 aura::Window* target, |
| 42 ui::TouchEvent* event) OVERRIDE; | 42 ui::TouchEvent* event) OVERRIDE; |
| 43 virtual ui::GestureStatus PreHandleGestureEvent( | 43 virtual ui::GestureStatus PreHandleGestureEvent( |
| 44 aura::Window* target, | 44 aura::Window* target, |
| 45 ui::GestureEventImpl* event) OVERRIDE; | 45 ui::GestureEvent* event) OVERRIDE; |
| 46 private: | 46 private: |
| 47 DISALLOW_COPY_AND_ASSIGN(WindowCycleEventFilter); | 47 DISALLOW_COPY_AND_ASSIGN(WindowCycleEventFilter); |
| 48 }; | 48 }; |
| 49 | 49 |
| 50 // Watch for all keyboard events by filtering the root window. | 50 // Watch for all keyboard events by filtering the root window. |
| 51 WindowCycleEventFilter::WindowCycleEventFilter() { | 51 WindowCycleEventFilter::WindowCycleEventFilter() { |
| 52 } | 52 } |
| 53 | 53 |
| 54 WindowCycleEventFilter::~WindowCycleEventFilter() { | 54 WindowCycleEventFilter::~WindowCycleEventFilter() { |
| 55 } | 55 } |
| (...skipping 17 matching lines...) Expand all Loading... |
| 73 } | 73 } |
| 74 | 74 |
| 75 ui::TouchStatus WindowCycleEventFilter::PreHandleTouchEvent( | 75 ui::TouchStatus WindowCycleEventFilter::PreHandleTouchEvent( |
| 76 aura::Window* target, | 76 aura::Window* target, |
| 77 ui::TouchEvent* event) { | 77 ui::TouchEvent* event) { |
| 78 return ui::TOUCH_STATUS_UNKNOWN; // Not handled. | 78 return ui::TOUCH_STATUS_UNKNOWN; // Not handled. |
| 79 } | 79 } |
| 80 | 80 |
| 81 ui::GestureStatus WindowCycleEventFilter::PreHandleGestureEvent( | 81 ui::GestureStatus WindowCycleEventFilter::PreHandleGestureEvent( |
| 82 aura::Window* target, | 82 aura::Window* target, |
| 83 ui::GestureEventImpl* event) { | 83 ui::GestureEvent* event) { |
| 84 return ui::GESTURE_STATUS_UNKNOWN; // Not handled. | 84 return ui::GESTURE_STATUS_UNKNOWN; // Not handled. |
| 85 } | 85 } |
| 86 | 86 |
| 87 } // namespace | 87 } // namespace |
| 88 | 88 |
| 89 ////////////////////////////////////////////////////////////////////////////// | 89 ////////////////////////////////////////////////////////////////////////////// |
| 90 // WindowCycleController, public: | 90 // WindowCycleController, public: |
| 91 | 91 |
| 92 WindowCycleController::WindowCycleController( | 92 WindowCycleController::WindowCycleController( |
| 93 internal::ActivationController* activation_controller) | 93 internal::ActivationController* activation_controller) |
| (...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 265 | 265 |
| 266 void WindowCycleController::OnWillRemoveWindow(aura::Window* window) { | 266 void WindowCycleController::OnWillRemoveWindow(aura::Window* window) { |
| 267 mru_windows_.remove(window); | 267 mru_windows_.remove(window); |
| 268 } | 268 } |
| 269 | 269 |
| 270 void WindowCycleController::OnWindowDestroying(aura::Window* window) { | 270 void WindowCycleController::OnWindowDestroying(aura::Window* window) { |
| 271 window->RemoveObserver(this); | 271 window->RemoveObserver(this); |
| 272 } | 272 } |
| 273 | 273 |
| 274 } // namespace ash | 274 } // namespace ash |
| OLD | NEW |