| 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 ASH_DISPLAY_DISPLAY_LAYOUT_BUILDER_H_ | 5 #ifndef UI_DISPLAY_MANAGER_DISPLAY_LAYOUT_BUILDER_H_ |
| 6 #define ASH_DISPLAY_DISPLAY_LAYOUT_BUILDER_H_ | 6 #define UI_DISPLAY_MANAGER_DISPLAY_LAYOUT_BUILDER_H_ |
| 7 | 7 |
| 8 #include "ash/display/display_layout.h" | |
| 9 #include "base/macros.h" | 8 #include "base/macros.h" |
| 10 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
| 10 #include "ui/display/display_export.h" |
| 11 #include "ui/display/manager/display_layout.h" |
| 11 | 12 |
| 12 namespace ash { | 13 namespace display { |
| 13 | 14 |
| 14 class DisplayLayout; | 15 class DisplayLayout; |
| 15 | 16 |
| 16 // A utility class to create a DisplayLayout instance. | 17 // A utility class to create a DisplayLayout instance. |
| 17 class ASH_EXPORT DisplayLayoutBuilder final { | 18 class DISPLAY_EXPORT DisplayLayoutBuilder final { |
| 18 public: | 19 public: |
| 19 // Creates a builder that uses a copy of the |layout| as a source. | 20 // Creates a builder that uses a copy of the |layout| as a source. |
| 20 explicit DisplayLayoutBuilder(const DisplayLayout& layout); | 21 explicit DisplayLayoutBuilder(const DisplayLayout& layout); |
| 21 | 22 |
| 22 // Ccreates a builder with the primary display id. | 23 // Creates a builder with the primary display id. |
| 23 explicit DisplayLayoutBuilder(int64_t primary_id); | 24 explicit DisplayLayoutBuilder(int64_t primary_id); |
| 24 | 25 |
| 25 ~DisplayLayoutBuilder(); | 26 ~DisplayLayoutBuilder(); |
| 26 | 27 |
| 27 DisplayLayoutBuilder& SetDefaultUnified(bool default_unified); | 28 DisplayLayoutBuilder& SetDefaultUnified(bool default_unified); |
| 28 | 29 |
| 29 DisplayLayoutBuilder& SetMirrored(bool mirrored); | 30 DisplayLayoutBuilder& SetMirrored(bool mirrored); |
| 30 | 31 |
| 31 DisplayLayoutBuilder& ClearPlacements(); | 32 DisplayLayoutBuilder& ClearPlacements(); |
| 32 | 33 |
| (...skipping 11 matching lines...) Expand all Loading... |
| 44 | 45 |
| 45 // Returns the DisplayLayout. After this call, the builder becomes invalid. | 46 // Returns the DisplayLayout. After this call, the builder becomes invalid. |
| 46 scoped_ptr<DisplayLayout> Build(); | 47 scoped_ptr<DisplayLayout> Build(); |
| 47 | 48 |
| 48 private: | 49 private: |
| 49 scoped_ptr<DisplayLayout> layout_; | 50 scoped_ptr<DisplayLayout> layout_; |
| 50 | 51 |
| 51 DISALLOW_COPY_AND_ASSIGN(DisplayLayoutBuilder); | 52 DISALLOW_COPY_AND_ASSIGN(DisplayLayoutBuilder); |
| 52 }; | 53 }; |
| 53 | 54 |
| 54 } // namespace ash | 55 } // namespace display |
| 55 | 56 |
| 56 #endif // ASH_DISPLAY_DISPLAY_LAYOUT_BUILDER_H_ | 57 #endif // UI_DISPLAY_MANAGER_DISPLAY_LAYOUT_BUILDER_H_ |
| OLD | NEW |