| 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_DISPLAY_MANAGER_DISPLAY_LAYOUT_BUILDER_H_ | 5 #ifndef UI_DISPLAY_MANAGER_DISPLAY_LAYOUT_BUILDER_H_ |
| 6 #define UI_DISPLAY_MANAGER_DISPLAY_LAYOUT_BUILDER_H_ | 6 #define UI_DISPLAY_MANAGER_DISPLAY_LAYOUT_BUILDER_H_ |
| 7 | 7 |
| 8 #include <memory> |
| 9 |
| 8 #include "base/macros.h" | 10 #include "base/macros.h" |
| 9 #include "base/memory/scoped_ptr.h" | |
| 10 #include "ui/display/display_export.h" | 11 #include "ui/display/display_export.h" |
| 11 #include "ui/display/manager/display_layout.h" | 12 #include "ui/display/manager/display_layout.h" |
| 12 | 13 |
| 13 namespace display { | 14 namespace display { |
| 14 | 15 |
| 15 class DisplayLayout; | 16 class DisplayLayout; |
| 16 | 17 |
| 17 // A utility class to create a DisplayLayout instance. | 18 // A utility class to create a DisplayLayout instance. |
| 18 class DISPLAY_EXPORT DisplayLayoutBuilder final { | 19 class DISPLAY_EXPORT DisplayLayoutBuilder final { |
| 19 public: | 20 public: |
| (...skipping 17 matching lines...) Expand all Loading... |
| 37 DisplayPlacement::Position position, | 38 DisplayPlacement::Position position, |
| 38 int offset); | 39 int offset); |
| 39 | 40 |
| 40 // Sets the display placement for the secondary display. | 41 // Sets the display placement for the secondary display. |
| 41 DisplayLayoutBuilder& SetSecondaryPlacement( | 42 DisplayLayoutBuilder& SetSecondaryPlacement( |
| 42 int64_t secondary_id, | 43 int64_t secondary_id, |
| 43 DisplayPlacement::Position position, | 44 DisplayPlacement::Position position, |
| 44 int offset); | 45 int offset); |
| 45 | 46 |
| 46 // Returns the DisplayLayout. After this call, the builder becomes invalid. | 47 // Returns the DisplayLayout. After this call, the builder becomes invalid. |
| 47 scoped_ptr<DisplayLayout> Build(); | 48 std::unique_ptr<DisplayLayout> Build(); |
| 48 | 49 |
| 49 private: | 50 private: |
| 50 scoped_ptr<DisplayLayout> layout_; | 51 std::unique_ptr<DisplayLayout> layout_; |
| 51 | 52 |
| 52 DISALLOW_COPY_AND_ASSIGN(DisplayLayoutBuilder); | 53 DISALLOW_COPY_AND_ASSIGN(DisplayLayoutBuilder); |
| 53 }; | 54 }; |
| 54 | 55 |
| 55 } // namespace display | 56 } // namespace display |
| 56 | 57 |
| 57 #endif // UI_DISPLAY_MANAGER_DISPLAY_LAYOUT_BUILDER_H_ | 58 #endif // UI_DISPLAY_MANAGER_DISPLAY_LAYOUT_BUILDER_H_ |
| OLD | NEW |