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

Side by Side Diff: ash/display/display_layout_builder.h

Issue 1838833002: Move DisplayLayout and DisplayLayoutBuilder From ash To ui/display (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@screenwinmove
Patch Set: Fix comment 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/display/display_layout.cc ('k') | ash/display/display_layout_builder.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef ASH_DISPLAY_DISPLAY_LAYOUT_BUILDER_H_
6 #define ASH_DISPLAY_DISPLAY_LAYOUT_BUILDER_H_
7
8 #include "ash/display/display_layout.h"
9 #include "base/macros.h"
10 #include "base/memory/scoped_ptr.h"
11
12 namespace ash {
13
14 class DisplayLayout;
15
16 // A utility class to create a DisplayLayout instance.
17 class ASH_EXPORT DisplayLayoutBuilder final {
18 public:
19 // Creates a builder that uses a copy of the |layout| as a source.
20 explicit DisplayLayoutBuilder(const DisplayLayout& layout);
21
22 // Ccreates a builder with the primary display id.
23 explicit DisplayLayoutBuilder(int64_t primary_id);
24
25 ~DisplayLayoutBuilder();
26
27 DisplayLayoutBuilder& SetDefaultUnified(bool default_unified);
28
29 DisplayLayoutBuilder& SetMirrored(bool mirrored);
30
31 DisplayLayoutBuilder& ClearPlacements();
32
33 // Adds a display placement.
34 DisplayLayoutBuilder& AddDisplayPlacement(int64_t display_id,
35 int64_t parent_id,
36 DisplayPlacement::Position position,
37 int offset);
38
39 // Sets the display placement for the secondary display.
40 DisplayLayoutBuilder& SetSecondaryPlacement(
41 int64_t secondary_id,
42 DisplayPlacement::Position position,
43 int offset);
44
45 // Returns the DisplayLayout. After this call, the builder becomes invalid.
46 scoped_ptr<DisplayLayout> Build();
47
48 private:
49 scoped_ptr<DisplayLayout> layout_;
50
51 DISALLOW_COPY_AND_ASSIGN(DisplayLayoutBuilder);
52 };
53
54 } // namespace ash
55
56 #endif // ASH_DISPLAY_DISPLAY_LAYOUT_BUILDER_H_
OLDNEW
« no previous file with comments | « ash/display/display_layout.cc ('k') | ash/display/display_layout_builder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698