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

Side by Side Diff: ash/display/display_layout_store.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_builder_unittest.cc ('k') | ash/display/display_layout_store.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 ASH_DISPLAY_DISPLAY_LAYOUT_STORE_H_
6 #define ASH_DISPLAY_DISPLAY_LAYOUT_STORE_H_ 6 #define ASH_DISPLAY_DISPLAY_LAYOUT_STORE_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <map> 10 #include <map>
11 11
12 #include "ash/ash_export.h" 12 #include "ash/ash_export.h"
13 #include "ash/display/display_layout.h"
14 #include "base/macros.h" 13 #include "base/macros.h"
15 #include "base/memory/scoped_ptr.h" 14 #include "base/memory/scoped_ptr.h"
15 #include "ui/display/manager/display_layout.h"
16 16
17 namespace ash { 17 namespace ash {
18 18
19 class ASH_EXPORT DisplayLayoutStore { 19 class ASH_EXPORT DisplayLayoutStore {
20 public: 20 public:
21 DisplayLayoutStore(); 21 DisplayLayoutStore();
22 ~DisplayLayoutStore(); 22 ~DisplayLayoutStore();
23 23
24 void SetDefaultDisplayPlacement(const DisplayPlacement& placement); 24 void SetDefaultDisplayPlacement(const display::DisplayPlacement& placement);
25 25
26 // Registeres the display layout info for the specified display(s). 26 // Registeres the display layout info for the specified display(s).
27 void RegisterLayoutForDisplayIdList(const DisplayIdList& list, 27 void RegisterLayoutForDisplayIdList(
28 scoped_ptr<DisplayLayout> layout); 28 const display::DisplayIdList& list,
29 scoped_ptr<display::DisplayLayout> layout);
29 30
30 // If no layout is registered, it creatas new layout using 31 // If no layout is registered, it creatas new layout using
31 // |default_display_layout_|. 32 // |default_display_layout_|.
32 const DisplayLayout& GetRegisteredDisplayLayout(const DisplayIdList& list); 33 const display::DisplayLayout& GetRegisteredDisplayLayout(
34 const display::DisplayIdList& list);
33 35
34 // Update the multi display state in the display layout for 36 // Update the multi display state in the display layout for
35 // |display_list|. This creates new display layout if no layout is 37 // |display_list|. This creates new display layout if no layout is
36 // registered for |display_list|. 38 // registered for |display_list|.
37 void UpdateMultiDisplayState(const DisplayIdList& display_list, 39 void UpdateMultiDisplayState(const display::DisplayIdList& display_list,
38 bool mirrored, 40 bool mirrored,
39 bool default_unified); 41 bool default_unified);
40 42
41 private: 43 private:
42 // Creates new layout for display list from |default_display_layout_|. 44 // Creates new layout for display list from |default_display_layout_|.
43 DisplayLayout* CreateDefaultDisplayLayout(const DisplayIdList& display_list); 45 display::DisplayLayout* CreateDefaultDisplayLayout(
46 const display::DisplayIdList& display_list);
44 47
45 // The default display placement. 48 // The default display placement.
46 DisplayPlacement default_display_placement_; 49 display::DisplayPlacement default_display_placement_;
47 50
48 // Display layout per list of devices. 51 // Display layout per list of devices.
49 std::map<DisplayIdList, scoped_ptr<DisplayLayout>> layouts_; 52 std::map<display::DisplayIdList, scoped_ptr<display::DisplayLayout>> layouts_;
50 53
51 DISALLOW_COPY_AND_ASSIGN(DisplayLayoutStore); 54 DISALLOW_COPY_AND_ASSIGN(DisplayLayoutStore);
52 }; 55 };
53 56
54 } // namespace ash 57 } // namespace ash
55 58
56 #endif // ASH_DISPLAY_DISPLAY_LAYOUT_STORE_H_ 59 #endif // ASH_DISPLAY_DISPLAY_LAYOUT_STORE_H_
OLDNEW
« no previous file with comments | « ash/display/display_layout_builder_unittest.cc ('k') | ash/display/display_layout_store.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698