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

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

Issue 1149133003: Substituting pattern ScopedVector push_back(ptr.release()) with push_back(ptr.Pass()) in src/ash/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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 | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 #include <functional> 8 #include <functional>
9 #include <set> 9 #include <set>
10 #include <vector> 10 #include <vector>
(...skipping 259 matching lines...) Expand 10 before | Expand all | Expand 10 after
270 // Hide the callout widgets for panels. It is safe to call this for 270 // Hide the callout widgets for panels. It is safe to call this for
271 // root windows that don't contain any panel windows. 271 // root windows that don't contain any panel windows.
272 static_cast<PanelLayoutManager*>( 272 static_cast<PanelLayoutManager*>(
273 Shell::GetContainer(*iter, kShellWindowId_PanelContainer) 273 Shell::GetContainer(*iter, kShellWindowId_PanelContainer)
274 ->layout_manager())->SetShowCalloutWidgets(false); 274 ->layout_manager())->SetShowCalloutWidgets(false);
275 275
276 scoped_ptr<WindowGrid> grid(new WindowGrid(*iter, windows, this)); 276 scoped_ptr<WindowGrid> grid(new WindowGrid(*iter, windows, this));
277 if (grid->empty()) 277 if (grid->empty())
278 continue; 278 continue;
279 num_items_ += grid->size(); 279 num_items_ += grid->size();
280 grid_list_.push_back(grid.release()); 280 grid_list_.push_back(grid.Pass());
281 } 281 }
282 282
283 { 283 {
284 // The calls to WindowGrid::PrepareForOverview() and CreateTextFilter(...) 284 // The calls to WindowGrid::PrepareForOverview() and CreateTextFilter(...)
285 // requires some LayoutManagers (ie PanelLayoutManager) to perform layouts 285 // requires some LayoutManagers (ie PanelLayoutManager) to perform layouts
286 // so that windows are correctly visible and properly animated in overview 286 // so that windows are correctly visible and properly animated in overview
287 // mode. Otherwise these layouts should be suppressed during overview mode 287 // mode. Otherwise these layouts should be suppressed during overview mode
288 // so they don't conflict with overview mode animations. The 288 // so they don't conflict with overview mode animations. The
289 // |restoring_minimized_windows_| flag enables the PanelLayoutManager to 289 // |restoring_minimized_windows_| flag enables the PanelLayoutManager to
290 // make this decision. 290 // make this decision.
(...skipping 298 matching lines...) Expand 10 before | Expand all | Expand 10 after
589 for (size_t i = 0; 589 for (size_t i = 0;
590 i <= grid_list_.size() && 590 i <= grid_list_.size() &&
591 grid_list_[selected_grid_index_]->Move(direction, animate); i++) { 591 grid_list_[selected_grid_index_]->Move(direction, animate); i++) {
592 // TODO(flackr): If there are more than two monitors, move between grids 592 // TODO(flackr): If there are more than two monitors, move between grids
593 // in the requested direction. 593 // in the requested direction.
594 selected_grid_index_ = (selected_grid_index_ + 1) % grid_list_.size(); 594 selected_grid_index_ = (selected_grid_index_ + 1) % grid_list_.size();
595 } 595 }
596 } 596 }
597 597
598 } // namespace ash 598 } // namespace ash
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698