| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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_STORE_H_ | 5 #ifndef UI_DISPLAY_MANAGER_DISPLAY_LAYOUT_STORE_H_ |
| 6 #define ASH_DISPLAY_DISPLAY_LAYOUT_STORE_H_ | 6 #define UI_DISPLAY_MANAGER_DISPLAY_LAYOUT_STORE_H_ |
| 7 | 7 |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <map> | 10 #include <map> |
| 11 #include <memory> | 11 #include <memory> |
| 12 | 12 |
| 13 #include "ash/ash_export.h" | |
| 14 #include "base/macros.h" | 13 #include "base/macros.h" |
| 14 #include "ui/display/display.h" |
| 15 #include "ui/display/display_export.h" |
| 15 #include "ui/display/manager/display_layout.h" | 16 #include "ui/display/manager/display_layout.h" |
| 16 | 17 |
| 17 namespace ash { | 18 namespace display { |
| 18 | 19 |
| 19 class ASH_EXPORT DisplayLayoutStore { | 20 class DISPLAY_EXPORT DisplayLayoutStore { |
| 20 public: | 21 public: |
| 21 DisplayLayoutStore(); | 22 DisplayLayoutStore(); |
| 22 ~DisplayLayoutStore(); | 23 ~DisplayLayoutStore(); |
| 23 | 24 |
| 24 void SetDefaultDisplayPlacement(const display::DisplayPlacement& placement); | 25 void SetDefaultDisplayPlacement(const display::DisplayPlacement& placement); |
| 25 | 26 |
| 26 // Registeres the display layout info for the specified display(s). | 27 // Registers the display layout info for the specified display(s). |
| 27 void RegisterLayoutForDisplayIdList( | 28 void RegisterLayoutForDisplayIdList( |
| 28 const display::DisplayIdList& list, | 29 const display::DisplayIdList& list, |
| 29 std::unique_ptr<display::DisplayLayout> layout); | 30 std::unique_ptr<display::DisplayLayout> layout); |
| 30 | 31 |
| 31 // If no layout is registered, it creatas new layout using | 32 // If no layout is registered, it creatas new layout using |
| 32 // |default_display_layout_|. | 33 // |default_display_layout_|. |
| 33 const display::DisplayLayout& GetRegisteredDisplayLayout( | 34 const display::DisplayLayout& GetRegisteredDisplayLayout( |
| 34 const display::DisplayIdList& list); | 35 const display::DisplayIdList& list); |
| 35 | 36 |
| 36 // Update the multi display state in the display layout for | 37 // Update the multi display state in the display layout for |
| (...skipping 11 matching lines...) Expand all Loading... |
| 48 // The default display placement. | 49 // The default display placement. |
| 49 display::DisplayPlacement default_display_placement_; | 50 display::DisplayPlacement default_display_placement_; |
| 50 | 51 |
| 51 // Display layout per list of devices. | 52 // Display layout per list of devices. |
| 52 std::map<display::DisplayIdList, std::unique_ptr<display::DisplayLayout>> | 53 std::map<display::DisplayIdList, std::unique_ptr<display::DisplayLayout>> |
| 53 layouts_; | 54 layouts_; |
| 54 | 55 |
| 55 DISALLOW_COPY_AND_ASSIGN(DisplayLayoutStore); | 56 DISALLOW_COPY_AND_ASSIGN(DisplayLayoutStore); |
| 56 }; | 57 }; |
| 57 | 58 |
| 58 } // namespace ash | 59 } // namespace display |
| 59 | 60 |
| 60 #endif // ASH_DISPLAY_DISPLAY_LAYOUT_STORE_H_ | 61 #endif // UI_DISPLAY_MANAGER_DISPLAY_LAYOUT_STORE_H_ |
| OLD | NEW |