| 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_GFX_DISPLAY_H_ | 5 #ifndef UI_GFX_DISPLAY_H_ |
| 6 #define UI_GFX_DISPLAY_H_ | 6 #define UI_GFX_DISPLAY_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include "base/basictypes.h" | 9 #include "base/basictypes.h" |
| 10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
| 11 #include "ui/base/ui_export.h" | 11 #include "ui/base/ui_export.h" |
| 12 #include "ui/gfx/rect.h" | 12 #include "ui/gfx/rect.h" |
| 13 | 13 |
| 14 namespace gfx { | 14 namespace gfx { |
| 15 | 15 |
| 16 // Note: The screen and display currently uses pixel coordinate | 16 // Note: The screen and display currently uses pixel coordinate |
| 17 // system. For platforms that support DIP (density independent pixel), | 17 // system. For platforms that support DIP (density independent pixel), |
| 18 // |bounds()| and |work_area| will return values in DIP coordinate | 18 // |bounds()| and |work_area| will return values in DIP coordinate |
| 19 // system, not in backing pixels. | 19 // system, not in backing pixels. |
| 20 class UI_EXPORT Display { | 20 class UI_EXPORT Display { |
| 21 public: | 21 public: |
| 22 // Returns the default value for the device scale factor, which is | 22 // Returns the forced device scale factor, which is given by |
| 23 // given by "--default-device-scale-factor". | 23 // "--force-device-scale-factor". |
| 24 static float GetDefaultDeviceScaleFactor(); | 24 static float GetForcedDeviceScaleFactor(); |
| 25 | 25 |
| 26 // Creates a display with invalid id(-1) as default. | 26 // Creates a display with invalid id(-1) as default. |
| 27 Display(); | 27 Display(); |
| 28 explicit Display(int id); | 28 explicit Display(int id); |
| 29 Display(int id, const Rect& bounds); | 29 Display(int id, const Rect& bounds); |
| 30 ~Display(); | 30 ~Display(); |
| 31 | 31 |
| 32 // Sets/Gets unique identifier associated with the display. | 32 // Sets/Gets unique identifier associated with the display. |
| 33 int id() const { return id_; } | 33 int id() const { return id_; } |
| 34 void set_id(int id) { id_ = id; } | 34 void set_id(int id) { id_ = id; } |
| (...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 91 Rect work_area_; | 91 Rect work_area_; |
| 92 #if defined(USE_AURA) | 92 #if defined(USE_AURA) |
| 93 Rect bounds_in_pixel_; | 93 Rect bounds_in_pixel_; |
| 94 #endif | 94 #endif |
| 95 float device_scale_factor_; | 95 float device_scale_factor_; |
| 96 }; | 96 }; |
| 97 | 97 |
| 98 } // namespace gfx | 98 } // namespace gfx |
| 99 | 99 |
| 100 #endif // UI_GFX_DISPLAY_H_ | 100 #endif // UI_GFX_DISPLAY_H_ |
| OLD | NEW |