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