Chromium Code Reviews| Index: ash/display/display_info.cc |
| diff --git a/ash/display/display_info.cc b/ash/display/display_info.cc |
| index d886a5962a19c1150bf05199ac2adb6cfe824f92..9db5dca898e6819e891806348b9178211c10079d 100644 |
| --- a/ash/display/display_info.cc |
| +++ b/ash/display/display_info.cc |
| @@ -22,6 +22,11 @@ |
| namespace ash { |
| namespace internal { |
| +Resolution::Resolution(const gfx::Size& size, bool interlaced) |
| + : size(size), |
| + interlaced(interlaced) { |
| +} |
| + |
| // satic |
| DisplayInfo DisplayInfo::CreateFromSpec(const std::string& spec) { |
| return CreateFromSpecWithID(spec, gfx::Display::kInvalidDisplayID); |
| @@ -148,6 +153,7 @@ void DisplayInfo::Copy(const DisplayInfo& native_info) { |
| bounds_in_pixel_ = native_info.bounds_in_pixel_; |
| size_in_pixel_ = native_info.size_in_pixel_; |
| device_scale_factor_ = native_info.device_scale_factor_; |
| + resolutions_ = native_info.resolutions_; |
| // Copy overscan_insets_in_dip_ if it's not empty. This is for test |
| // cases which use "/o" annotation which sets the overscan inset |
| @@ -214,5 +220,18 @@ std::string DisplayInfo::ToString() const { |
| ui_scale_); |
| } |
| +std::string DisplayInfo::ToFullString() const { |
| + std::string resolutions_str; |
| + std::vector<Resolution>::const_iterator iter = resolutions_.begin(); |
| + for (; iter != resolutions_.end(); ++iter) { |
| + if (resolutions_str.empty()) |
|
Daniel Erat
2013/07/31 22:10:17
the other way, right? you should only append the c
oshima
2013/07/31 23:29:26
oops, you're right. done.
|
| + resolutions_str += ","; |
| + resolutions_str += iter->size.ToString(); |
| + if (iter->interlaced) |
| + resolutions_str += "(i)"; |
| + } |
| + return ToString() + ", resolutions=" + resolutions_str; |
| +} |
| + |
| } // namespace internal |
| } // namespace ash |