OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/overview/window_selector.h" | 5 #include "ash/wm/overview/window_selector.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 | 8 |
9 #include "ash/ash_switches.h" | 9 #include "ash/ash_switches.h" |
10 #include "ash/root_window_controller.h" | 10 #include "ash/root_window_controller.h" |
11 #include "ash/shell.h" | 11 #include "ash/shell.h" |
12 #include "ash/switchable_windows.h" | 12 #include "ash/switchable_windows.h" |
13 #include "ash/wm/overview/window_overview.h" | 13 #include "ash/wm/overview/window_overview.h" |
14 #include "ash/wm/overview/window_selector_delegate.h" | 14 #include "ash/wm/overview/window_selector_delegate.h" |
15 #include "ash/wm/overview/window_selector_panels.h" | 15 #include "ash/wm/overview/window_selector_panels.h" |
16 #include "ash/wm/overview/window_selector_window.h" | 16 #include "ash/wm/overview/window_selector_window.h" |
17 #include "ash/wm/window_state.h" | 17 #include "ash/wm/window_state.h" |
18 #include "base/auto_reset.h" | 18 #include "base/auto_reset.h" |
19 #include "base/command_line.h" | 19 #include "base/command_line.h" |
20 #include "base/metrics/histogram.h" | 20 #include "base/metrics/histogram.h" |
21 #include "base/strings/string_number_conversions.h" | 21 #include "base/strings/string_number_conversions.h" |
22 #include "ui/aura/client/activation_client.h" | 22 #include "ui/aura/client/activation_client.h" |
23 #include "ui/aura/client/focus_client.h" | 23 #include "ui/aura/client/focus_client.h" |
24 #include "ui/aura/window.h" | 24 #include "ui/aura/window.h" |
25 #include "ui/aura/window_event_dispatcher.h" | 25 #include "ui/aura/window_event_dispatcher.h" |
26 #include "ui/aura/window_observer.h" | 26 #include "ui/aura/window_observer.h" |
27 #include "ui/events/event.h" | 27 #include "ui/events/event.h" |
28 #include "ui/events/event_handler.h" | 28 #include "ui/events/event_handler.h" |
29 #include "ui/views/corewm/window_util.h" | 29 #include "ui/wm/core/window_util.h" |
30 | 30 |
31 namespace ash { | 31 namespace ash { |
32 | 32 |
33 namespace { | 33 namespace { |
34 | 34 |
35 // A comparator for locating a given selectable window. | 35 // A comparator for locating a given selectable window. |
36 struct WindowSelectorItemComparator | 36 struct WindowSelectorItemComparator |
37 : public std::unary_function<WindowSelectorItem*, bool> { | 37 : public std::unary_function<WindowSelectorItem*, bool> { |
38 explicit WindowSelectorItemComparator(const aura::Window* window) | 38 explicit WindowSelectorItemComparator(const aura::Window* window) |
39 : window_(window) { | 39 : window_(window) { |
(...skipping 429 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
469 // If the window is in the observed_windows_ list it needs to continue to be | 469 // If the window is in the observed_windows_ list it needs to continue to be |
470 // observed. | 470 // observed. |
471 if (observed_windows_.find(restore_focus_window_) == | 471 if (observed_windows_.find(restore_focus_window_) == |
472 observed_windows_.end()) { | 472 observed_windows_.end()) { |
473 restore_focus_window_->RemoveObserver(this); | 473 restore_focus_window_->RemoveObserver(this); |
474 } | 474 } |
475 restore_focus_window_ = NULL; | 475 restore_focus_window_ = NULL; |
476 } | 476 } |
477 | 477 |
478 } // namespace ash | 478 } // namespace ash |
OLD | NEW |