| 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 | 7 |
| 8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
| 9 #include "base/compiler_specific.h" | 9 #include "base/compiler_specific.h" |
| 10 #include "ui/base/ui_export.h" | 10 #include "ui/base/ui_export.h" |
| (...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 94 // Returns the display's bounds in pixel coordinates. | 94 // Returns the display's bounds in pixel coordinates. |
| 95 const Rect& bounds_in_pixel() const { return bounds_in_pixel_; } | 95 const Rect& bounds_in_pixel() const { return bounds_in_pixel_; } |
| 96 #endif | 96 #endif |
| 97 | 97 |
| 98 // Returns a string representation of the display; | 98 // Returns a string representation of the display; |
| 99 std::string ToString() const; | 99 std::string ToString() const; |
| 100 | 100 |
| 101 // True if the display contains valid display id. | 101 // True if the display contains valid display id. |
| 102 bool is_valid() const { return id_ != kInvalidDisplayID; } | 102 bool is_valid() const { return id_ != kInvalidDisplayID; } |
| 103 | 103 |
| 104 // True if the display corresponds to internal panel. |
| 105 bool IsInternal() const; |
| 106 |
| 107 // Gets/Sets an id of display corresponding to internal panel. |
| 108 static int64 InternalDisplayId(); |
| 109 static void SetInternalDisplayId(int64 internal_display_id); |
| 110 |
| 104 static const int64 kInvalidDisplayID; | 111 static const int64 kInvalidDisplayID; |
| 105 | 112 |
| 106 private: | 113 private: |
| 107 int64 id_; | 114 int64 id_; |
| 108 Rect bounds_; | 115 Rect bounds_; |
| 109 Rect work_area_; | 116 Rect work_area_; |
| 110 #if defined(USE_AURA) | 117 #if defined(USE_AURA) |
| 111 Rect bounds_in_pixel_; | 118 Rect bounds_in_pixel_; |
| 112 #endif | 119 #endif |
| 113 float device_scale_factor_; | 120 float device_scale_factor_; |
| 114 }; | 121 }; |
| 115 | 122 |
| 116 } // namespace gfx | 123 } // namespace gfx |
| 117 | 124 |
| 118 #endif // UI_GFX_DISPLAY_H_ | 125 #endif // UI_GFX_DISPLAY_H_ |
| OLD | NEW |