OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 #include "ui/display/types/display_mode.h" | 5 #include "ui/display/types/display_mode.h" |
6 | 6 |
7 #include "base/memory/ptr_util.h" | 7 #include "base/memory/ptr_util.h" |
8 #include "base/strings/stringprintf.h" | 8 #include "base/strings/stringprintf.h" |
9 | 9 |
10 namespace ui { | 10 namespace ui { |
(...skipping 14 matching lines...) Expand all Loading... |
25 } | 25 } |
26 | 26 |
27 std::string DisplayMode::ToString() const { | 27 std::string DisplayMode::ToString() const { |
28 return base::StringPrintf("[%dx%d %srate=%f]", | 28 return base::StringPrintf("[%dx%d %srate=%f]", |
29 size_.width(), | 29 size_.width(), |
30 size_.height(), | 30 size_.height(), |
31 is_interlaced_ ? "interlaced " : "", | 31 is_interlaced_ ? "interlaced " : "", |
32 refresh_rate_); | 32 refresh_rate_); |
33 } | 33 } |
34 | 34 |
| 35 void PrintTo(const DisplayMode& mode, std::ostream* os) { |
| 36 *os << mode.ToString(); |
| 37 } |
| 38 |
35 } // namespace ui | 39 } // namespace ui |
OLD | NEW |