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

Side by Side Diff: ui/display/manager/display_layout_builder.cc

Issue 1868363002: Replace scoped_ptr with std::unique_ptr in //ui (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@scopedptrcc
Patch Set: scopedptrui: rebase-make_scoped_ptr 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
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 "ui/display/manager/display_layout_builder.h" 5 #include "ui/display/manager/display_layout_builder.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 namespace display { 9 namespace display {
10 10
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
50 50
51 DisplayLayoutBuilder& DisplayLayoutBuilder::SetSecondaryPlacement( 51 DisplayLayoutBuilder& DisplayLayoutBuilder::SetSecondaryPlacement(
52 int64_t secondary_id, 52 int64_t secondary_id,
53 DisplayPlacement::Position position, 53 DisplayPlacement::Position position,
54 int offset) { 54 int offset) {
55 layout_->placement_list.clear(); 55 layout_->placement_list.clear();
56 AddDisplayPlacement(secondary_id, layout_->primary_id, position, offset); 56 AddDisplayPlacement(secondary_id, layout_->primary_id, position, offset);
57 return *this; 57 return *this;
58 } 58 }
59 59
60 scoped_ptr<DisplayLayout> DisplayLayoutBuilder::Build() { 60 std::unique_ptr<DisplayLayout> DisplayLayoutBuilder::Build() {
61 std::sort(layout_->placement_list.begin(), layout_->placement_list.end(), 61 std::sort(layout_->placement_list.begin(), layout_->placement_list.end(),
62 [](const DisplayPlacement& a, const DisplayPlacement& b) { 62 [](const DisplayPlacement& a, const DisplayPlacement& b) {
63 return a.display_id < b.display_id; 63 return a.display_id < b.display_id;
64 }); 64 });
65 return std::move(layout_); 65 return std::move(layout_);
66 } 66 }
67 67
68 } // namespace display 68 } // namespace display
OLDNEW
« no previous file with comments | « ui/display/manager/display_layout_builder.h ('k') | ui/display/manager/display_layout_builder_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698