| OLD | NEW |
| 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/display_layout_builder.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 | 8 |
| 9 namespace display { | 9 namespace display { |
| 10 | 10 |
| 11 DisplayLayoutBuilder::DisplayLayoutBuilder(const DisplayLayout& layout) | 11 DisplayLayoutBuilder::DisplayLayoutBuilder(const DisplayLayout& layout) |
| 12 : layout_(layout.Copy()) {} | 12 : layout_(layout.Copy()) {} |
| 13 | 13 |
| 14 DisplayLayoutBuilder::DisplayLayoutBuilder(int64_t primary_id) | 14 DisplayLayoutBuilder::DisplayLayoutBuilder(int64_t primary_id) |
| 15 : layout_(new DisplayLayout) { | 15 : layout_(new DisplayLayout) { |
| (...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 65 | 65 |
| 66 std::unique_ptr<DisplayLayout> DisplayLayoutBuilder::Build() { | 66 std::unique_ptr<DisplayLayout> DisplayLayoutBuilder::Build() { |
| 67 std::sort(layout_->placement_list.begin(), layout_->placement_list.end(), | 67 std::sort(layout_->placement_list.begin(), layout_->placement_list.end(), |
| 68 [](const DisplayPlacement& a, const DisplayPlacement& b) { | 68 [](const DisplayPlacement& a, const DisplayPlacement& b) { |
| 69 return a.display_id < b.display_id; | 69 return a.display_id < b.display_id; |
| 70 }); | 70 }); |
| 71 return std::move(layout_); | 71 return std::move(layout_); |
| 72 } | 72 } |
| 73 | 73 |
| 74 } // namespace display | 74 } // namespace display |
| OLD | NEW |