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" |
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
66 bool operator()(WindowSelectorItem* window) const { | 66 bool operator()(WindowSelectorItem* window) const { |
67 return window->TargetedWindow(target) != NULL; | 67 return window->TargetedWindow(target) != NULL; |
68 } | 68 } |
69 | 69 |
70 const aura::Window* target; | 70 const aura::Window* target; |
71 }; | 71 }; |
72 | 72 |
73 // A comparator for locating a selector item for a given root. | 73 // A comparator for locating a selector item for a given root. |
74 struct WindowSelectorItemForRoot | 74 struct WindowSelectorItemForRoot |
75 : public std::unary_function<WindowSelectorItem*, bool> { | 75 : public std::unary_function<WindowSelectorItem*, bool> { |
76 explicit WindowSelectorItemForRoot(const aura::RootWindow* root) | 76 explicit WindowSelectorItemForRoot(const aura::Window* root) |
77 : root_window(root) { | 77 : root_window(root) { |
78 } | 78 } |
79 | 79 |
80 bool operator()(WindowSelectorItem* item) const { | 80 bool operator()(WindowSelectorItem* item) const { |
81 return item->GetRootWindow() == root_window; | 81 return item->GetRootWindow() == root_window; |
82 } | 82 } |
83 | 83 |
84 const aura::RootWindow* root_window; | 84 const aura::Window* root_window; |
85 }; | 85 }; |
86 | 86 |
87 // Filter to watch for the termination of a keyboard gesture to cycle through | 87 // Filter to watch for the termination of a keyboard gesture to cycle through |
88 // multiple windows. | 88 // multiple windows. |
89 class WindowSelectorEventFilter : public ui::EventHandler { | 89 class WindowSelectorEventFilter : public ui::EventHandler { |
90 public: | 90 public: |
91 WindowSelectorEventFilter(WindowSelector* selector); | 91 WindowSelectorEventFilter(WindowSelector* selector); |
92 virtual ~WindowSelectorEventFilter(); | 92 virtual ~WindowSelectorEventFilter(); |
93 | 93 |
94 // Overridden from ui::EventHandler: | 94 // Overridden from ui::EventHandler: |
(...skipping 394 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
489 // If the window is in the observed_windows_ list it needs to continue to be | 489 // If the window is in the observed_windows_ list it needs to continue to be |
490 // observed. | 490 // observed. |
491 if (observed_windows_.find(restore_focus_window_) == | 491 if (observed_windows_.find(restore_focus_window_) == |
492 observed_windows_.end()) { | 492 observed_windows_.end()) { |
493 restore_focus_window_->RemoveObserver(this); | 493 restore_focus_window_->RemoveObserver(this); |
494 } | 494 } |
495 restore_focus_window_ = NULL; | 495 restore_focus_window_ = NULL; |
496 } | 496 } |
497 | 497 |
498 } // namespace ash | 498 } // namespace ash |
OLD | NEW |