| Index: ui/gfx/display.cc
|
| diff --git a/ui/gfx/display.cc b/ui/gfx/display.cc
|
| index 1777e87e5433822f6769e053a6459a0cd18499dd..9461a03e3cdd30fd02d737f93c05ed2457b4449e 100644
|
| --- a/ui/gfx/display.cc
|
| +++ b/ui/gfx/display.cc
|
| @@ -5,6 +5,7 @@
|
| #include "ui/gfx/display.h"
|
|
|
| #include <algorithm>
|
| +#include <vector>
|
|
|
| #include "base/command_line.h"
|
| #include "base/logging.h"
|
| @@ -77,8 +78,7 @@ Display::Display()
|
| : id_(kInvalidDisplayID),
|
| device_scale_factor_(GetForcedDeviceScaleFactor()),
|
| rotation_(ROTATE_0),
|
| - touch_support_(TOUCH_SUPPORT_UNKNOWN) {
|
| -}
|
| + touch_support_(TOUCH_SUPPORT_UNKNOWN) {}
|
|
|
| Display::Display(int64_t id)
|
| : id_(id),
|
| @@ -195,6 +195,19 @@ bool Display::IsInternal() const {
|
| return is_valid() && (id_ == internal_display_id_);
|
| }
|
|
|
| +bool Display::IsPhysicalSizeAvailable() const {
|
| + return physical_size_mm_.width() != 0 && physical_size_mm_.height() != 0;
|
| +}
|
| +
|
| +gfx::Size Display::GetPhysicalSizeMm() const {
|
| + DCHECK(IsPhysicalSizeAvailable());
|
| + return physical_size_mm_;
|
| +}
|
| +
|
| +void Display::SetPhysicalSizeMm(gfx::Size physical_size) {
|
| + physical_size_mm_ = physical_size;
|
| +}
|
| +
|
| // static
|
| int64_t Display::InternalDisplayId() {
|
| DCHECK_NE(kInvalidDisplayID, internal_display_id_);
|
|
|