| 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_DISPLAY_DISPLAY_MANAGER_H_ | 5 #ifndef ASH_DISPLAY_DISPLAY_MANAGER_H_ |
| 6 #define ASH_DISPLAY_DISPLAY_MANAGER_H_ | 6 #define ASH_DISPLAY_DISPLAY_MANAGER_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 75 // recognized as a part of desktop. | 75 // recognized as a part of desktop. |
| 76 enum SecondDisplayMode { | 76 enum SecondDisplayMode { |
| 77 EXTENDED, | 77 EXTENDED, |
| 78 MIRRORING, | 78 MIRRORING, |
| 79 VIRTUAL_KEYBOARD | 79 VIRTUAL_KEYBOARD |
| 80 }; | 80 }; |
| 81 | 81 |
| 82 // Returns the list of possible UI scales for the display. | 82 // Returns the list of possible UI scales for the display. |
| 83 static std::vector<float> GetScalesForDisplay(const DisplayInfo& info); | 83 static std::vector<float> GetScalesForDisplay(const DisplayInfo& info); |
| 84 | 84 |
| 85 // Returns the list of possible device scale factors for the external display. |
| 86 static std::vector<float> GetDeviceScaleFactorsForDisplay( |
| 87 const DisplayInfo& info); |
| 88 |
| 85 // Returns next valid UI scale. | 89 // Returns next valid UI scale. |
| 86 static float GetNextUIScale(const DisplayInfo& info, bool up); | 90 static float GetNextUIScale(const DisplayInfo& info, bool up); |
| 87 | 91 |
| 88 // Updates the bounds of the display given by |secondary_display_id| | 92 // Updates the bounds of the display given by |secondary_display_id| |
| 89 // according to |layout|. | 93 // according to |layout|. |
| 90 static void UpdateDisplayBoundsForLayoutById( | 94 static void UpdateDisplayBoundsForLayoutById( |
| 91 const DisplayLayout& layout, | 95 const DisplayLayout& layout, |
| 92 const gfx::Display& primary_display, | 96 const gfx::Display& primary_display, |
| 93 int64 secondary_display_id); | 97 int64 secondary_display_id); |
| 94 | 98 |
| (...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 160 | 164 |
| 161 // Sets the display's rotation. | 165 // Sets the display's rotation. |
| 162 void SetDisplayRotation(int64 display_id, gfx::Display::Rotation rotation); | 166 void SetDisplayRotation(int64 display_id, gfx::Display::Rotation rotation); |
| 163 | 167 |
| 164 // Sets the display's ui scale. | 168 // Sets the display's ui scale. |
| 165 void SetDisplayUIScale(int64 display_id, float ui_scale); | 169 void SetDisplayUIScale(int64 display_id, float ui_scale); |
| 166 | 170 |
| 167 // Sets the display's resolution. | 171 // Sets the display's resolution. |
| 168 void SetDisplayResolution(int64 display_id, const gfx::Size& resolution); | 172 void SetDisplayResolution(int64 display_id, const gfx::Size& resolution); |
| 169 | 173 |
| 174 // Sets the external display's device scale factor. |
| 175 void SetDisplayDeviceScaleFactor(int64 display_id, float device_scale_factor); |
| 176 |
| 170 // Register per display properties. |overscan_insets| is NULL if | 177 // Register per display properties. |overscan_insets| is NULL if |
| 171 // the display has no custom overscan insets. | 178 // the display has no custom overscan insets. |
| 172 void RegisterDisplayProperty(int64 display_id, | 179 void RegisterDisplayProperty(int64 display_id, |
| 173 gfx::Display::Rotation rotation, | 180 gfx::Display::Rotation rotation, |
| 174 float ui_scale, | 181 float ui_scale, |
| 175 const gfx::Insets* overscan_insets, | 182 const gfx::Insets* overscan_insets, |
| 176 const gfx::Size& resolution_in_pixels, | 183 const gfx::Size& resolution_in_pixels, |
| 177 ui::ColorCalibrationProfile color_profile); | 184 ui::ColorCalibrationProfile color_profile); |
| 178 | 185 |
| 179 // Returns the display's selected mode. | 186 // Returns the display's selected mode. |
| (...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 361 SecondDisplayMode second_display_mode_; | 368 SecondDisplayMode second_display_mode_; |
| 362 int64 mirrored_display_id_; | 369 int64 mirrored_display_id_; |
| 363 gfx::Display non_desktop_display_; | 370 gfx::Display non_desktop_display_; |
| 364 | 371 |
| 365 DISALLOW_COPY_AND_ASSIGN(DisplayManager); | 372 DISALLOW_COPY_AND_ASSIGN(DisplayManager); |
| 366 }; | 373 }; |
| 367 | 374 |
| 368 } // namespace ash | 375 } // namespace ash |
| 369 | 376 |
| 370 #endif // ASH_DISPLAY_DISPLAY_MANAGER_H_ | 377 #endif // ASH_DISPLAY_DISPLAY_MANAGER_H_ |
| OLD | NEW |