OLD | NEW |
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 ASH_TEST_DISPLAY_MANAGER_TEST_API_H_ |
6 #define ASH_TEST_DISPLAY_MANAGER_TEST_API_H_ | 6 #define ASH_TEST_DISPLAY_MANAGER_TEST_API_H_ |
7 | 7 |
| 8 #include <stdint.h> |
| 9 |
8 #include <string> | 10 #include <string> |
9 #include <vector> | 11 #include <vector> |
10 | 12 |
11 #include "base/basictypes.h" | 13 #include "base/macros.h" |
12 #include "ui/display/types/display_constants.h" | 14 #include "ui/display/types/display_constants.h" |
13 | 15 |
14 namespace gfx { | 16 namespace gfx { |
15 class Point; | 17 class Point; |
16 class Size; | 18 class Size; |
17 } | 19 } |
18 | 20 |
19 namespace ui { | 21 namespace ui { |
20 namespace test { | 22 namespace test { |
21 class EventGenerator; | 23 class EventGenerator; |
(...skipping 16 matching lines...) Expand all Loading... |
38 virtual ~DisplayManagerTestApi(); | 40 virtual ~DisplayManagerTestApi(); |
39 | 41 |
40 // Update the display configuration as given in |display_specs|. The format of | 42 // Update the display configuration as given in |display_specs|. The format of |
41 // |display_spec| is a list of comma separated spec for each displays. Please | 43 // |display_spec| is a list of comma separated spec for each displays. Please |
42 // refer to the comment in |ash::DisplayInfo::CreateFromSpec| for the format | 44 // refer to the comment in |ash::DisplayInfo::CreateFromSpec| for the format |
43 // of the display spec. | 45 // of the display spec. |
44 void UpdateDisplay(const std::string& display_specs); | 46 void UpdateDisplay(const std::string& display_specs); |
45 | 47 |
46 // Set the 1st display as an internal display and returns the display Id for | 48 // Set the 1st display as an internal display and returns the display Id for |
47 // the internal display. | 49 // the internal display. |
48 int64 SetFirstDisplayAsInternalDisplay(); | 50 int64_t SetFirstDisplayAsInternalDisplay(); |
49 | 51 |
50 // Don't update the display when the root window's size was changed. | 52 // Don't update the display when the root window's size was changed. |
51 void DisableChangeDisplayUponHostResize(); | 53 void DisableChangeDisplayUponHostResize(); |
52 | 54 |
53 // Sets the available color profiles for |display_id|. | 55 // Sets the available color profiles for |display_id|. |
54 void SetAvailableColorProfiles( | 56 void SetAvailableColorProfiles( |
55 int64 display_id, | 57 int64_t display_id, |
56 const std::vector<ui::ColorCalibrationProfile>& profiles); | 58 const std::vector<ui::ColorCalibrationProfile>& profiles); |
57 | 59 |
58 private: | 60 private: |
59 friend class ScopedSetInternalDisplayId; | 61 friend class ScopedSetInternalDisplayId; |
60 // Sets the display id for internal display and | 62 // Sets the display id for internal display and |
61 // update the display mode list if necessary. | 63 // update the display mode list if necessary. |
62 void SetInternalDisplayId(int64 id); | 64 void SetInternalDisplayId(int64_t id); |
63 | 65 |
64 DisplayManager* display_manager_; // not owned | 66 DisplayManager* display_manager_; // not owned |
65 | 67 |
66 DISALLOW_COPY_AND_ASSIGN(DisplayManagerTestApi); | 68 DISALLOW_COPY_AND_ASSIGN(DisplayManagerTestApi); |
67 }; | 69 }; |
68 | 70 |
69 class ScopedDisable125DSFForUIScaling { | 71 class ScopedDisable125DSFForUIScaling { |
70 public: | 72 public: |
71 ScopedDisable125DSFForUIScaling(); | 73 ScopedDisable125DSFForUIScaling(); |
72 ~ScopedDisable125DSFForUIScaling(); | 74 ~ScopedDisable125DSFForUIScaling(); |
73 | 75 |
74 private: | 76 private: |
75 DISALLOW_COPY_AND_ASSIGN(ScopedDisable125DSFForUIScaling); | 77 DISALLOW_COPY_AND_ASSIGN(ScopedDisable125DSFForUIScaling); |
76 }; | 78 }; |
77 | 79 |
78 class ScopedSetInternalDisplayId { | 80 class ScopedSetInternalDisplayId { |
79 public: | 81 public: |
80 ScopedSetInternalDisplayId(int64 id); | 82 ScopedSetInternalDisplayId(int64_t id); |
81 ~ScopedSetInternalDisplayId(); | 83 ~ScopedSetInternalDisplayId(); |
82 | 84 |
83 private: | 85 private: |
84 DISALLOW_COPY_AND_ASSIGN(ScopedSetInternalDisplayId); | 86 DISALLOW_COPY_AND_ASSIGN(ScopedSetInternalDisplayId); |
85 }; | 87 }; |
86 | 88 |
87 // Sets the display mode that matches the |resolution| for |display_id|. | 89 // Sets the display mode that matches the |resolution| for |display_id|. |
88 bool SetDisplayResolution(int64 display_id, const gfx::Size& resolution); | 90 bool SetDisplayResolution(int64_t display_id, const gfx::Size& resolution); |
89 | 91 |
90 } // namespace test | 92 } // namespace test |
91 } // namespace ash | 93 } // namespace ash |
92 | 94 |
93 #endif // ASH_TEST_DISPLAY_MANAGER_TEST_API_H_ | 95 #endif // ASH_TEST_DISPLAY_MANAGER_TEST_API_H_ |
OLD | NEW |