OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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_TEST_DISPLAY_UTIL_H_ | 5 #ifndef UI_DISPLAY_TEST_DISPLAY_TEST_UTIL_H_ |
6 #define UI_GFX_TEST_DISPLAY_UTIL_H_ | 6 #define UI_DISPLAY_TEST_DISPLAY_TEST_UTIL_H_ |
7 | 7 |
8 #include "ui/gfx/display.h" | 8 #include "ui/display/display.h" |
9 | 9 |
10 namespace gfx { | 10 namespace display { |
11 | 11 |
12 inline bool operator==(const Display& lhs, const Display& rhs) { | 12 inline bool operator==(const Display& lhs, const Display& rhs) { |
13 return lhs.id() == rhs.id() && | 13 return lhs.id() == rhs.id() && |
14 lhs.bounds() == rhs.bounds() && | 14 lhs.bounds() == rhs.bounds() && |
15 lhs.work_area() == rhs.work_area() && | 15 lhs.work_area() == rhs.work_area() && |
16 lhs.device_scale_factor() == rhs.device_scale_factor() && | 16 lhs.device_scale_factor() == rhs.device_scale_factor() && |
17 lhs.rotation() == rhs.rotation() && | 17 lhs.rotation() == rhs.rotation() && |
18 lhs.touch_support() == rhs.touch_support(); | 18 lhs.touch_support() == rhs.touch_support(); |
19 } | 19 } |
20 | 20 |
21 } // namespace gfx | 21 void PrintTo(const Display& display, ::std::ostream* os) { |
| 22 *os << display.ToString(); |
| 23 } |
22 | 24 |
23 #endif // UI_GFX_TEST_DISPLAY_UTIL_H_ | 25 } // namespace display |
| 26 |
| 27 #endif // UI_DISPLAY_TEST_DISPLAY_TEST_UTIL_H_ |
OLD | NEW |