Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(353)

Side by Side Diff: ash/wm/overview/window_grid.cc

Issue 1138253002: Add user action for changing the active window in Ash overview mode (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: tests added Created 5 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « ash/metrics/user_metrics_recorder.cc ('k') | ash/wm/overview/window_selector.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « ash/metrics/user_metrics_recorder.cc ('k') | ash/wm/overview/window_selector.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698