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 is_internal() const; | |
oshima
2013/02/12 17:38:51
IsInternal()
ynovikov
2013/02/12 21:17:47
Done.
| |
106 | |
107 // Gets/Sets an id of display corresponding to internal panel. | |
108 static int64 internal_display_id(); | |
109 static void set_internal_display_id(int64 internal_display_id); | |
oshima
2013/02/12 17:38:51
same for these
ynovikov
2013/02/12 21:17:47
Done.
| |
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_; |
121 static int64 internal_display_id_; | |
oshima
2013/02/12 17:38:51
move this to anonymous namespace in .cc file.
ynovikov
2013/02/12 21:17:47
Done.
| |
114 }; | 122 }; |
115 | 123 |
116 } // namespace gfx | 124 } // namespace gfx |
117 | 125 |
118 #endif // UI_GFX_DISPLAY_H_ | 126 #endif // UI_GFX_DISPLAY_H_ |
OLD | NEW |