| 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 #ifndef UI_GFX_DISPLAY_LAYOUT_BUILDER_H_ | 5 #ifndef UI_GFX_DISPLAY_LAYOUT_BUILDER_H_ |
| 6 #define UI_GFX_DISPLAY_LAYOUT_BUILDER_H_ | 6 #define UI_GFX_DISPLAY_LAYOUT_BUILDER_H_ |
| 7 | 7 |
| 8 #include "base/macros.h" | 8 #include "base/macros.h" |
| 9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
| 10 #include "ui/gfx/display_layout.h" | 10 #include "ui/gfx/display_layout.h" |
| (...skipping 19 matching lines...) Expand all Loading... |
| 30 DisplayLayoutBuilder& SetMirrored(bool mirrored); | 30 DisplayLayoutBuilder& SetMirrored(bool mirrored); |
| 31 | 31 |
| 32 DisplayLayoutBuilder& ClearPlacements(); | 32 DisplayLayoutBuilder& ClearPlacements(); |
| 33 | 33 |
| 34 // Adds a display placement. | 34 // Adds a display placement. |
| 35 DisplayLayoutBuilder& AddDisplayPlacement(int64_t display_id, | 35 DisplayLayoutBuilder& AddDisplayPlacement(int64_t display_id, |
| 36 int64_t parent_id, | 36 int64_t parent_id, |
| 37 DisplayPlacement::Position position, | 37 DisplayPlacement::Position position, |
| 38 int offset); | 38 int offset); |
| 39 | 39 |
| 40 // Adds a display placement. |
| 41 DisplayLayoutBuilder& AddDisplayPlacement( |
| 42 const DisplayPlacement& placement); |
| 43 |
| 40 // Sets the display placement for the secondary display. | 44 // Sets the display placement for the secondary display. |
| 41 DisplayLayoutBuilder& SetSecondaryPlacement( | 45 DisplayLayoutBuilder& SetSecondaryPlacement( |
| 42 int64_t secondary_id, | 46 int64_t secondary_id, |
| 43 DisplayPlacement::Position position, | 47 DisplayPlacement::Position position, |
| 44 int offset); | 48 int offset); |
| 45 | 49 |
| 46 // Returns the DisplayLayout. After this call, the builder becomes invalid. | 50 // Returns the DisplayLayout. After this call, the builder becomes invalid. |
| 47 scoped_ptr<DisplayLayout> Build(); | 51 scoped_ptr<DisplayLayout> Build(); |
| 48 | 52 |
| 49 private: | 53 private: |
| 50 scoped_ptr<DisplayLayout> layout_; | 54 scoped_ptr<DisplayLayout> layout_; |
| 51 | 55 |
| 52 DISALLOW_COPY_AND_ASSIGN(DisplayLayoutBuilder); | 56 DISALLOW_COPY_AND_ASSIGN(DisplayLayoutBuilder); |
| 53 }; | 57 }; |
| 54 | 58 |
| 55 } // namespace ash | 59 } // namespace ash |
| 56 | 60 |
| 57 #endif // ASH_DISPLAY_DISPLAY_LAYOUT_BUILDER_H_ | 61 #endif // ASH_DISPLAY_DISPLAY_LAYOUT_BUILDER_H_ |
| OLD | NEW |