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/session_state_delegate.h" | 9 #include "ash/session_state_delegate.h" |
10 #include "ash/shell.h" | 10 #include "ash/shell.h" |
11 #include "ash/shell_window_ids.h" | 11 #include "ash/shell_window_ids.h" |
12 #include "ash/wm/mru_window_tracker.h" | 12 #include "ash/wm/mru_window_tracker.h" |
13 #include "ash/wm/window_cycle_list.h" | 13 #include "ash/wm/window_cycle_list.h" |
14 #include "ash/wm/window_util.h" | 14 #include "ash/wm/window_util.h" |
15 #include "ash/wm/workspace_controller.h" | 15 #include "ash/wm/workspace_controller.h" |
16 #include "ui/aura/root_window.h" | 16 #include "ui/aura/window_event_dispatcher.h" |
17 #include "ui/events/event.h" | 17 #include "ui/events/event.h" |
18 #include "ui/events/event_handler.h" | 18 #include "ui/events/event_handler.h" |
19 | 19 |
20 namespace ash { | 20 namespace ash { |
21 | 21 |
22 namespace { | 22 namespace { |
23 | 23 |
24 // Filter to watch for the termination of a keyboard gesture to cycle through | 24 // Filter to watch for the termination of a keyboard gesture to cycle through |
25 // multiple windows. | 25 // multiple windows. |
26 class WindowCycleEventFilter : public ui::EventHandler { | 26 class WindowCycleEventFilter : public ui::EventHandler { |
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
130 event_handler_.reset(); | 130 event_handler_.reset(); |
131 } | 131 } |
132 } | 132 } |
133 | 133 |
134 void WindowCycleController::InstallEventFilter() { | 134 void WindowCycleController::InstallEventFilter() { |
135 event_handler_.reset(new WindowCycleEventFilter()); | 135 event_handler_.reset(new WindowCycleEventFilter()); |
136 Shell::GetInstance()->AddPreTargetHandler(event_handler_.get()); | 136 Shell::GetInstance()->AddPreTargetHandler(event_handler_.get()); |
137 } | 137 } |
138 | 138 |
139 } // namespace ash | 139 } // namespace ash |
OLD | NEW |