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

Unified Diff: ui/gfx/display_layout_builder.cc

Issue 1813493002: COMPLETED PREVIEW Migrate to Display Placement (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@gfxmove
Patch Set: Created 4 years, 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/gfx/display_layout_builder.h ('k') | ui/gfx/gfx.gyp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/gfx/display_layout_builder.cc
diff --git a/ui/gfx/display_layout_builder.cc b/ui/gfx/display_layout_builder.cc
index a29fe7c809dd427abcfb02a02f343b3d8868a536..7f7fb7727f6fbce0084b97e6252a94a2ef986399 100644
--- a/ui/gfx/display_layout_builder.cc
+++ b/ui/gfx/display_layout_builder.cc
@@ -37,12 +37,19 @@ DisplayLayoutBuilder& DisplayLayoutBuilder::AddDisplayPlacement(
int64_t parent_display_id,
DisplayPlacement::Position position,
int offset) {
- scoped_ptr<DisplayPlacement> placement(new DisplayPlacement);
- placement->position = position;
- placement->offset = offset;
- placement->display_id = display_id;
- placement->parent_display_id = parent_display_id;
- layout_->placement_list.push_back(std::move(placement));
+ DisplayPlacement placement;
+ placement.position = position;
+ placement.offset = offset;
+ placement.display_id = display_id;
+ placement.parent_display_id = parent_display_id;
+ AddDisplayPlacement(placement);
+ return *this;
+}
+
+DisplayLayoutBuilder& DisplayLayoutBuilder::AddDisplayPlacement(
+ const DisplayPlacement& placement) {
+ layout_->placement_list.push_back(
+ make_scoped_ptr(new DisplayPlacement(placement)));
return *this;
}
« no previous file with comments | « ui/gfx/display_layout_builder.h ('k') | ui/gfx/gfx.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698