| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_grid.h" | 5 #include "ash/wm/overview/window_grid.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <functional> | 8 #include <functional> |
| 9 #include <set> | 9 #include <set> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 130 : root_window_(root_window), | 130 : root_window_(root_window), |
| 131 window_selector_(window_selector) { | 131 window_selector_(window_selector) { |
| 132 | 132 |
| 133 for (aura::Window::Windows::const_iterator iter = windows.begin(); | 133 for (aura::Window::Windows::const_iterator iter = windows.begin(); |
| 134 iter != windows.end(); ++iter) { | 134 iter != windows.end(); ++iter) { |
| 135 if ((*iter)->GetRootWindow() != root_window) | 135 if ((*iter)->GetRootWindow() != root_window) |
| 136 continue; | 136 continue; |
| 137 (*iter)->AddObserver(this); | 137 (*iter)->AddObserver(this); |
| 138 observed_windows_.insert(*iter); | 138 observed_windows_.insert(*iter); |
| 139 | 139 |
| 140 window_list_.push_back(new WindowSelectorItem(*iter)); | 140 window_list_.push_back(new WindowSelectorItem(*iter, window_selector_)); |
| 141 } | 141 } |
| 142 } | 142 } |
| 143 | 143 |
| 144 WindowGrid::~WindowGrid() { | 144 WindowGrid::~WindowGrid() { |
| 145 for (std::set<aura::Window*>::iterator iter = observed_windows_.begin(); | 145 for (std::set<aura::Window*>::iterator iter = observed_windows_.begin(); |
| 146 iter != observed_windows_.end(); iter++) { | 146 iter != observed_windows_.end(); iter++) { |
| 147 (*iter)->RemoveObserver(this); | 147 (*iter)->RemoveObserver(this); |
| 148 } | 148 } |
| 149 } | 149 } |
| 150 | 150 |
| (...skipping 292 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 443 ui::LayerAnimator::IMMEDIATELY_ANIMATE_TO_NEW_TARGET); | 443 ui::LayerAnimator::IMMEDIATELY_ANIMATE_TO_NEW_TARGET); |
| 444 selection_widget_->SetBounds(SelectedWindow()->target_bounds()); | 444 selection_widget_->SetBounds(SelectedWindow()->target_bounds()); |
| 445 selection_widget_->SetOpacity(255); | 445 selection_widget_->SetOpacity(255); |
| 446 return; | 446 return; |
| 447 } | 447 } |
| 448 selection_widget_->SetBounds(SelectedWindow()->target_bounds()); | 448 selection_widget_->SetBounds(SelectedWindow()->target_bounds()); |
| 449 selection_widget_->SetOpacity(255); | 449 selection_widget_->SetOpacity(255); |
| 450 } | 450 } |
| 451 | 451 |
| 452 } // namespace ash | 452 } // namespace ash |
| OLD | NEW |