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 156 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
167 | 167 |
168 // Sets the display's resolution. | 168 // Sets the display's resolution. |
169 void SetDisplayResolution(int64 display_id, const gfx::Size& resolution); | 169 void SetDisplayResolution(int64 display_id, const gfx::Size& resolution); |
170 | 170 |
171 // Register per display properties. |overscan_insets| is NULL if | 171 // Register per display properties. |overscan_insets| is NULL if |
172 // the display has no custom overscan insets. | 172 // the display has no custom overscan insets. |
173 void RegisterDisplayProperty(int64 display_id, | 173 void RegisterDisplayProperty(int64 display_id, |
174 gfx::Display::Rotation rotation, | 174 gfx::Display::Rotation rotation, |
175 float ui_scale, | 175 float ui_scale, |
176 const gfx::Insets* overscan_insets, | 176 const gfx::Insets* overscan_insets, |
177 const gfx::Size& resolution_in_pixels); | 177 const gfx::Size& resolution_in_pixels, |
| 178 float refresh_rate); |
178 | 179 |
179 // Returns the display's selected resolution. | 180 // Returns the display's selected mode. |
180 bool GetSelectedResolutionForDisplayId(int64 display_id, | 181 bool GetSelectedModeForDisplayId(int64 display_id, |
181 gfx::Size* resolution_out) const; | 182 DisplayMode* mode_out) const; |
182 | 183 |
183 // Tells if the virtual resolution feature is enabled. | 184 // Tells if the virtual resolution feature is enabled. |
184 bool IsDisplayUIScalingEnabled() const; | 185 bool IsDisplayUIScalingEnabled() const; |
185 | 186 |
186 // Returns the current overscan insets for the specified |display_id|. | 187 // Returns the current overscan insets for the specified |display_id|. |
187 // Returns an empty insets (0, 0, 0, 0) if no insets are specified for | 188 // Returns an empty insets (0, 0, 0, 0) if no insets are specified for |
188 // the display. | 189 // the display. |
189 gfx::Insets GetOverscanInsets(int64 display_id) const; | 190 gfx::Insets GetOverscanInsets(int64 display_id) const; |
190 | 191 |
191 // Called when display configuration has changed. The new display | 192 // Called when display configuration has changed. The new display |
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
333 // List of current active displays. | 334 // List of current active displays. |
334 DisplayList displays_; | 335 DisplayList displays_; |
335 | 336 |
336 int num_connected_displays_; | 337 int num_connected_displays_; |
337 | 338 |
338 bool force_bounds_changed_; | 339 bool force_bounds_changed_; |
339 | 340 |
340 // The mapping from the display ID to its internal data. | 341 // The mapping from the display ID to its internal data. |
341 std::map<int64, DisplayInfo> display_info_; | 342 std::map<int64, DisplayInfo> display_info_; |
342 | 343 |
343 // Selected resolutions in pixels for displays. Key is the displays' ID. | 344 // Selected display modes for displays. Key is the displays' ID. |
344 std::map<int64, gfx::Size> resolutions_; | 345 std::map<int64, DisplayMode> display_modes_; |
345 | 346 |
346 // When set to true, the host window's resize event updates | 347 // When set to true, the host window's resize event updates |
347 // the display's size. This is set to true when running on | 348 // the display's size. This is set to true when running on |
348 // desktop environment (for debugging) so that resizing the host | 349 // desktop environment (for debugging) so that resizing the host |
349 // window will update the display properly. This is set to false | 350 // window will update the display properly. This is set to false |
350 // on device as well as during the unit tests. | 351 // on device as well as during the unit tests. |
351 bool change_display_upon_host_resize_; | 352 bool change_display_upon_host_resize_; |
352 | 353 |
353 SecondDisplayMode second_display_mode_; | 354 SecondDisplayMode second_display_mode_; |
354 int64 mirrored_display_id_; | 355 int64 mirrored_display_id_; |
355 gfx::Display non_desktop_display_; | 356 gfx::Display non_desktop_display_; |
356 | 357 |
357 DISALLOW_COPY_AND_ASSIGN(DisplayManager); | 358 DISALLOW_COPY_AND_ASSIGN(DisplayManager); |
358 }; | 359 }; |
359 | 360 |
360 } // namespace internal | 361 } // namespace internal |
361 } // namespace ash | 362 } // namespace ash |
362 | 363 |
363 #endif // ASH_DISPLAY_DISPLAY_MANAGER_H_ | 364 #endif // ASH_DISPLAY_DISPLAY_MANAGER_H_ |
OLD | NEW |