Index: ui/gfx/display.h |
diff --git a/ui/gfx/display.h b/ui/gfx/display.h |
index c6df7e703ad54dba04977ee2ce6ed1a6d9df791a..648eefb85b781386409faaef49515caae3f8c4b0 100644 |
--- a/ui/gfx/display.h |
+++ b/ui/gfx/display.h |
@@ -154,6 +154,20 @@ class GFX_EXPORT Display { |
TouchSupport touch_support_; |
}; |
+inline bool operator==(const gfx::Display& lhs, const gfx::Display& rhs) { |
+ return lhs.id() == rhs.id() && |
+ lhs.bounds() == rhs.bounds() && |
+ lhs.work_area() == rhs.work_area() && |
+ lhs.device_scale_factor() == rhs.device_scale_factor() && |
+ lhs.rotation() == rhs.rotation() && |
+ lhs.touch_support() == rhs.touch_support(); |
+} |
oshima
2016/01/28 18:32:04
One concern I have is that this differ from identi
robliao
2016/01/29 01:44:40
sgtm. Done.
|
+ |
+// This is declared here for use in gtest-based unit tests but is defined in |
+// the gfx_test_support target. Depend on that to use this in your unit test. |
+// This should not be used in production code - call ToString() instead. |
+void PrintTo(const Display& display, ::std::ostream* os); |
+ |
} // namespace gfx |
#endif // UI_GFX_DISPLAY_H_ |