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

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

Issue 1867223004: Convert //ash from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: address comments Created 4 years, 8 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/wm/overview/window_selector.h ('k') | ash/wm/overview/window_selector_controller.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 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 <utility> 10 #include <utility>
(...skipping 263 matching lines...) Expand 10 before | Expand all | Expand 10 after
274 container->AddObserver(this); 274 container->AddObserver(this);
275 observed_windows_.insert(container); 275 observed_windows_.insert(container);
276 } 276 }
277 277
278 // Hide the callout widgets for panels. It is safe to call this for 278 // Hide the callout widgets for panels. It is safe to call this for
279 // root windows that don't contain any panel windows. 279 // root windows that don't contain any panel windows.
280 static_cast<PanelLayoutManager*>( 280 static_cast<PanelLayoutManager*>(
281 Shell::GetContainer(*iter, kShellWindowId_PanelContainer) 281 Shell::GetContainer(*iter, kShellWindowId_PanelContainer)
282 ->layout_manager())->SetShowCalloutWidgets(false); 282 ->layout_manager())->SetShowCalloutWidgets(false);
283 283
284 scoped_ptr<WindowGrid> grid(new WindowGrid(*iter, windows, this)); 284 std::unique_ptr<WindowGrid> grid(new WindowGrid(*iter, windows, this));
285 if (grid->empty()) 285 if (grid->empty())
286 continue; 286 continue;
287 num_items_ += grid->size(); 287 num_items_ += grid->size();
288 grid_list_.push_back(std::move(grid)); 288 grid_list_.push_back(std::move(grid));
289 } 289 }
290 290
291 { 291 {
292 // The calls to WindowGrid::PrepareForOverview() and CreateTextFilter(...) 292 // The calls to WindowGrid::PrepareForOverview() and CreateTextFilter(...)
293 // requires some LayoutManagers (ie PanelLayoutManager) to perform layouts 293 // requires some LayoutManagers (ie PanelLayoutManager) to perform layouts
294 // so that windows are correctly visible and properly animated in overview 294 // so that windows are correctly visible and properly animated in overview
(...skipping 340 matching lines...) Expand 10 before | Expand all | Expand 10 after
635 for (size_t i = 0; 635 for (size_t i = 0;
636 i <= grid_list_.size() && 636 i <= grid_list_.size() &&
637 grid_list_[selected_grid_index_]->Move(direction, animate); i++) { 637 grid_list_[selected_grid_index_]->Move(direction, animate); i++) {
638 selected_grid_index_ = 638 selected_grid_index_ =
639 (selected_grid_index_ + display_direction + grid_list_.size()) % 639 (selected_grid_index_ + display_direction + grid_list_.size()) %
640 grid_list_.size(); 640 grid_list_.size();
641 } 641 }
642 } 642 }
643 643
644 } // namespace ash 644 } // namespace ash
OLDNEW
« no previous file with comments | « ash/wm/overview/window_selector.h ('k') | ash/wm/overview/window_selector_controller.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698