| 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 UI_DISPLAY_TEST_MANAGER_TEST_API_H_ | 5 #ifndef UI_DISPLAY_TEST_DISPLAY_MANAGER_TEST_API_H_ |
| 6 #define UI_DISPLAY_TEST_MANAGER_TEST_API_H_ | 6 #define UI_DISPLAY_TEST_DISPLAY_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/display_export.h" |
| 16 #include "ui/display/manager/display_layout.h" | 16 #include "ui/display/manager/display_layout.h" |
| (...skipping 25 matching lines...) Expand all Loading... |
| 42 int64_t SetFirstDisplayAsInternalDisplay(); | 42 int64_t SetFirstDisplayAsInternalDisplay(); |
| 43 | 43 |
| 44 // Don't update the display when the root window's size was changed. | 44 // Don't update the display when the root window's size was changed. |
| 45 void DisableChangeDisplayUponHostResize(); | 45 void DisableChangeDisplayUponHostResize(); |
| 46 | 46 |
| 47 // Sets the available color profiles for |display_id|. | 47 // Sets the available color profiles for |display_id|. |
| 48 void SetAvailableColorProfiles( | 48 void SetAvailableColorProfiles( |
| 49 int64_t display_id, | 49 int64_t display_id, |
| 50 const std::vector<ui::ColorCalibrationProfile>& profiles); | 50 const std::vector<ui::ColorCalibrationProfile>& profiles); |
| 51 | 51 |
| 52 // Gets the internal display::ManagedDisplayInfo for a specific display id. | 52 // Gets the internal ManagedDisplayInfo for a specific display id. |
| 53 const display::ManagedDisplayInfo& GetInternalManagedDisplayInfo( | 53 const ManagedDisplayInfo& GetInternalManagedDisplayInfo(int64_t display_id); |
| 54 int64_t display_id); | |
| 55 | 54 |
| 56 // Sets the UI scale for the |display_id|. Returns false if the | 55 // Sets the UI scale for the |display_id|. Returns false if the |
| 57 // display_id is not an internal display. | 56 // display_id is not an internal display. |
| 58 bool SetDisplayUIScale(int64_t display_id, float scale); | 57 bool SetDisplayUIScale(int64_t display_id, float scale); |
| 59 | 58 |
| 60 private: | 59 private: |
| 61 friend class ScopedSetInternalDisplayId; | 60 friend class ScopedSetInternalDisplayId; |
| 62 // Sets the display id for internal display and | 61 // Sets the display id for internal display and |
| 63 // update the display mode list if necessary. | 62 // update the display mode list if necessary. |
| 64 void SetInternalDisplayId(int64_t id); | 63 void SetInternalDisplayId(int64_t id); |
| (...skipping 24 matching lines...) Expand all Loading... |
| 89 // Sets the display mode that matches the |resolution| for |display_id|. | 88 // Sets the display mode that matches the |resolution| for |display_id|. |
| 90 DISPLAY_EXPORT bool SetDisplayResolution(DisplayManager* display_manager, | 89 DISPLAY_EXPORT bool SetDisplayResolution(DisplayManager* display_manager, |
| 91 int64_t display_id, | 90 int64_t display_id, |
| 92 const gfx::Size& resolution); | 91 const gfx::Size& resolution); |
| 93 | 92 |
| 94 // Creates the dislpay layout from position and offset for the current | 93 // Creates the dislpay layout from position and offset for the current |
| 95 // display list. If you simply want to create a new layout that is | 94 // display list. If you simply want to create a new layout that is |
| 96 // independent of current displays, use DisplayLayoutBuilder or simply | 95 // independent of current displays, use DisplayLayoutBuilder or simply |
| 97 // create a new DisplayLayout and set display id fields (primary, ids | 96 // create a new DisplayLayout and set display id fields (primary, ids |
| 98 // in placement) manually. | 97 // in placement) manually. |
| 99 DISPLAY_EXPORT std::unique_ptr<display::DisplayLayout> CreateDisplayLayout( | 98 DISPLAY_EXPORT std::unique_ptr<DisplayLayout> CreateDisplayLayout( |
| 100 DisplayManager* display_manager, | 99 DisplayManager* display_manager, |
| 101 display::DisplayPlacement::Position position, | 100 DisplayPlacement::Position position, |
| 102 int offset); | 101 int offset); |
| 103 | 102 |
| 104 // Creates the DisplayIdList from ints. | 103 // Creates the DisplayIdList from ints. |
| 105 DISPLAY_EXPORT display::DisplayIdList CreateDisplayIdList2(int64_t id1, | 104 DISPLAY_EXPORT DisplayIdList CreateDisplayIdList2(int64_t id1, int64_t id2); |
| 106 int64_t id2); | 105 DISPLAY_EXPORT DisplayIdList CreateDisplayIdListN(size_t count, ...); |
| 107 DISPLAY_EXPORT display::DisplayIdList CreateDisplayIdListN(size_t count, ...); | |
| 108 | 106 |
| 109 } // namespace test | 107 } // namespace test |
| 110 } // namespace display | 108 } // namespace display |
| 111 | 109 |
| 112 #endif // UI_DISPLAY_TEST_MANAGER_TEST_API_H_ | 110 #endif // UI_DISPLAY_TEST_DISPLAY_MANAGER_TEST_API_H_ |
| OLD | NEW |