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_panels.h" | 5 #include "ash/wm/overview/window_selector_panels.h" |
6 | 6 |
7 #include "ash/shell.h" | 7 #include "ash/shell.h" |
8 #include "ash/shell_window_ids.h" | 8 #include "ash/shell_window_ids.h" |
9 #include "ash/wm/overview/scoped_transform_overview_window.h" | 9 #include "ash/wm/overview/scoped_transform_overview_window.h" |
10 #include "ash/wm/panels/panel_layout_manager.h" | 10 #include "ash/wm/panels/panel_layout_manager.h" |
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
82 } | 82 } |
83 | 83 |
84 } // namespace | 84 } // namespace |
85 | 85 |
86 WindowSelectorPanels::WindowSelectorPanels() { | 86 WindowSelectorPanels::WindowSelectorPanels() { |
87 } | 87 } |
88 | 88 |
89 WindowSelectorPanels::~WindowSelectorPanels() { | 89 WindowSelectorPanels::~WindowSelectorPanels() { |
90 } | 90 } |
91 | 91 |
| 92 base::string16 WindowSelectorPanels::GetLabelName() { |
| 93 return SelectionWindow()->title(); |
| 94 } |
| 95 |
92 void WindowSelectorPanels::AddWindow(aura::Window* window) { | 96 void WindowSelectorPanels::AddWindow(aura::Window* window) { |
93 transform_windows_.push_back(new ScopedTransformPanelWindow(window)); | 97 transform_windows_.push_back(new ScopedTransformPanelWindow(window)); |
94 } | 98 } |
95 | 99 |
96 aura::Window* WindowSelectorPanels::GetRootWindow() { | 100 aura::Window* WindowSelectorPanels::GetRootWindow() { |
97 return transform_windows_.front()->window()->GetRootWindow(); | 101 return transform_windows_.front()->window()->GetRootWindow(); |
98 } | 102 } |
99 | 103 |
100 bool WindowSelectorPanels::HasSelectableWindow(const aura::Window* window) { | 104 bool WindowSelectorPanels::HasSelectableWindow(const aura::Window* window) { |
101 for (WindowList::const_iterator iter = transform_windows_.begin(); | 105 for (WindowList::const_iterator iter = transform_windows_.begin(); |
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
171 transform.Translate(bounding_rect.x() - bounds.x(), | 175 transform.Translate(bounding_rect.x() - bounds.x(), |
172 bounding_rect.y() - bounds.y()); | 176 bounding_rect.y() - bounds.y()); |
173 transform.PreconcatTransform(bounding_transform); | 177 transform.PreconcatTransform(bounding_transform); |
174 transform.Translate(bounds.x() - bounding_rect.x(), | 178 transform.Translate(bounds.x() - bounding_rect.x(), |
175 bounds.y() - bounding_rect.y()); | 179 bounds.y() - bounding_rect.y()); |
176 (*iter)->SetTransform(root_window, transform, animate); | 180 (*iter)->SetTransform(root_window, transform, animate); |
177 } | 181 } |
178 } | 182 } |
179 | 183 |
180 } // namespace ash | 184 } // namespace ash |
OLD | NEW |