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" |
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
68 void SetSize(const gfx::Size& size_in_pixel); | 68 void SetSize(const gfx::Size& size_in_pixel); |
69 | 69 |
70 // Computes and updates the display's work are using | 70 // Computes and updates the display's work are using |
71 // |work_area_insets| and the bounds. | 71 // |work_area_insets| and the bounds. |
72 void UpdateWorkAreaFromInsets(const gfx::Insets& work_area_insets); | 72 void UpdateWorkAreaFromInsets(const gfx::Insets& work_area_insets); |
73 | 73 |
74 // Returns the display's size in pixel coordinates. | 74 // Returns the display's size in pixel coordinates. |
75 gfx::Size GetSizeInPixel() const; | 75 gfx::Size GetSizeInPixel() const; |
76 | 76 |
77 #if defined(USE_AURA) | 77 #if defined(USE_AURA) |
78 // TODO(oshima): |bounds()| on ash is not screen's coordinate and | 78 // TODO(oshima|skuhne): Eliminate the use of bounds_in_pixel in events_x.cc |
79 // this is an workaround for this. This will be removed when ash | 79 // and remove bounds_in_pixel from gfx::Display. |
80 // has true multi display support. crbug.com/119268. | |
81 // Returns the display's bounds in pixel coordinates. | 80 // Returns the display's bounds in pixel coordinates. |
82 const Rect& bounds_in_pixel() const { return bounds_in_pixel_; } | 81 const Rect& bounds_in_pixel() const { return bounds_in_pixel_; } |
83 #endif | 82 #endif |
84 | 83 |
85 // Returns a string representation of the display; | 84 // Returns a string representation of the display; |
86 std::string ToString() const; | 85 std::string ToString() const; |
87 | 86 |
88 private: | 87 private: |
89 int id_; | 88 int id_; |
90 Rect bounds_; | 89 Rect bounds_; |
91 Rect work_area_; | 90 Rect work_area_; |
92 #if defined(USE_AURA) | 91 #if defined(USE_AURA) |
93 Rect bounds_in_pixel_; | 92 Rect bounds_in_pixel_; |
94 #endif | 93 #endif |
95 float device_scale_factor_; | 94 float device_scale_factor_; |
96 }; | 95 }; |
97 | 96 |
98 } // namespace gfx | 97 } // namespace gfx |
99 | 98 |
100 #endif // UI_GFX_DISPLAY_H_ | 99 #endif // UI_GFX_DISPLAY_H_ |
OLD | NEW |