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

Side by Side Diff: ui/display/test/display_manager_test_api.h

Issue 2445583002: Relocate display_manager from ash to ui (Closed)
Patch Set: fix windows build Created 4 years, 1 month 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 | « ui/display/manager/display_manager.cc ('k') | ui/display/test/display_manager_test_api.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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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_TEST_DISPLAY_MANAGER_TEST_API_H_ 5 #ifndef UI_DISPLAY_TEST_MANAGER_TEST_API_H_
6 #define ASH_TEST_DISPLAY_MANAGER_TEST_API_H_ 6 #define UI_DISPLAY_TEST_MANAGER_TEST_API_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <memory> 10 #include <memory>
11 #include <string> 11 #include <string>
12 #include <vector> 12 #include <vector>
13 13
14 #include "base/macros.h" 14 #include "base/macros.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 #include "ui/display/types/display_constants.h" 17 #include "ui/display/types/display_constants.h"
17 18
18 namespace display {
19 class ManagedDisplayInfo;
20 }
21
22 namespace gfx { 19 namespace gfx {
23 class Point; 20 class Point;
24 class Size; 21 class Size;
25 } 22 }
26 23
27 namespace ui { 24 namespace ui {
28 namespace test { 25 namespace test {
29 class EventGenerator; 26 class EventGenerator;
30 } 27 }
31 } 28 }
32 29
33 namespace ash { 30 namespace display {
34 class DisplayManager; 31 class DisplayManager;
32 class ManagedDisplayInfo;
35 33
36 namespace test { 34 namespace test {
37 35
38 class DisplayManagerTestApi { 36 class DISPLAY_EXPORT DisplayManagerTestApi {
39 public: 37 public:
40 explicit DisplayManagerTestApi(DisplayManager* display_manager); 38 explicit DisplayManagerTestApi(DisplayManager* display_manager);
41 virtual ~DisplayManagerTestApi(); 39 virtual ~DisplayManagerTestApi();
42 40
43 // Update the display configuration as given in |display_specs|. The format of 41 // Update the display configuration as given in |display_specs|. The format of
44 // |display_spec| is a list of comma separated spec for each displays. Please 42 // |display_spec| is a list of comma separated spec for each displays. Please
45 // refer to the comment in |ash::DisplayInfo::CreateFromSpec| for the format 43 // refer to the comment in |ash::DisplayInfo::CreateFromSpec| for the format
46 // of the display spec. 44 // of the display spec.
47 void UpdateDisplay(const std::string& display_specs); 45 void UpdateDisplay(const std::string& display_specs);
48 46
(...skipping 21 matching lines...) Expand all
70 friend class ScopedSetInternalDisplayId; 68 friend class ScopedSetInternalDisplayId;
71 // Sets the display id for internal display and 69 // Sets the display id for internal display and
72 // update the display mode list if necessary. 70 // update the display mode list if necessary.
73 void SetInternalDisplayId(int64_t id); 71 void SetInternalDisplayId(int64_t id);
74 72
75 DisplayManager* display_manager_; // not owned 73 DisplayManager* display_manager_; // not owned
76 74
77 DISALLOW_COPY_AND_ASSIGN(DisplayManagerTestApi); 75 DISALLOW_COPY_AND_ASSIGN(DisplayManagerTestApi);
78 }; 76 };
79 77
80 class ScopedDisable125DSFForUIScaling { 78 class DISPLAY_EXPORT ScopedDisable125DSFForUIScaling {
81 public: 79 public:
82 ScopedDisable125DSFForUIScaling(); 80 ScopedDisable125DSFForUIScaling();
83 ~ScopedDisable125DSFForUIScaling(); 81 ~ScopedDisable125DSFForUIScaling();
84 82
85 private: 83 private:
86 DISALLOW_COPY_AND_ASSIGN(ScopedDisable125DSFForUIScaling); 84 DISALLOW_COPY_AND_ASSIGN(ScopedDisable125DSFForUIScaling);
87 }; 85 };
88 86
89 class ScopedSetInternalDisplayId { 87 class DISPLAY_EXPORT ScopedSetInternalDisplayId {
90 public: 88 public:
91 ScopedSetInternalDisplayId(DisplayManager* test_api, int64_t id); 89 ScopedSetInternalDisplayId(DisplayManager* test_api, int64_t id);
92 ~ScopedSetInternalDisplayId(); 90 ~ScopedSetInternalDisplayId();
93 91
94 private: 92 private:
95 DISALLOW_COPY_AND_ASSIGN(ScopedSetInternalDisplayId); 93 DISALLOW_COPY_AND_ASSIGN(ScopedSetInternalDisplayId);
96 }; 94 };
97 95
98 // Sets the display mode that matches the |resolution| for |display_id|. 96 // Sets the display mode that matches the |resolution| for |display_id|.
99 bool SetDisplayResolution(DisplayManager* display_manager, 97 DISPLAY_EXPORT bool SetDisplayResolution(DisplayManager* display_manager,
100 int64_t display_id, 98 int64_t display_id,
101 const gfx::Size& resolution); 99 const gfx::Size& resolution);
102 100
103 // Creates the dislpay layout from position and offset for the current 101 // Creates the dislpay layout from position and offset for the current
104 // display list. If you simply want to create a new layout that is 102 // display list. If you simply want to create a new layout that is
105 // independent of current displays, use DisplayLayoutBuilder or simply 103 // independent of current displays, use DisplayLayoutBuilder or simply
106 // create a new DisplayLayout and set display id fields (primary, ids 104 // create a new DisplayLayout and set display id fields (primary, ids
107 // in placement) manually. 105 // in placement) manually.
108 std::unique_ptr<display::DisplayLayout> CreateDisplayLayout( 106 DISPLAY_EXPORT std::unique_ptr<display::DisplayLayout> CreateDisplayLayout(
109 DisplayManager* display_manager, 107 DisplayManager* display_manager,
110 display::DisplayPlacement::Position position, 108 display::DisplayPlacement::Position position,
111 int offset); 109 int offset);
112 110
113 // Creates the DisplayIdList from ints. 111 // Creates the DisplayIdList from ints.
114 display::DisplayIdList CreateDisplayIdList2(int64_t id1, int64_t id2); 112 DISPLAY_EXPORT display::DisplayIdList CreateDisplayIdList2(int64_t id1,
115 display::DisplayIdList CreateDisplayIdListN(size_t count, ...); 113 int64_t id2);
114 DISPLAY_EXPORT display::DisplayIdList CreateDisplayIdListN(size_t count, ...);
116 115
117 } // namespace test 116 } // namespace test
118 } // namespace ash 117 } // namespace display
119 118
120 #endif // ASH_TEST_DISPLAY_MANAGER_TEST_API_H_ 119 #endif // UI_DISPLAY_TEST_MANAGER_TEST_API_H_
OLDNEW
« no previous file with comments | « ui/display/manager/display_manager.cc ('k') | ui/display/test/display_manager_test_api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698