Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(85)

Unified Diff: ui/gfx/display.h

Issue 1639623003: ScreenWin Testability and Restructuring (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/gfx/BUILD.gn ('k') | ui/gfx/gfx.gyp » ('j') | ui/gfx/screen_win.h » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_
« no previous file with comments | « ui/gfx/BUILD.gn ('k') | ui/gfx/gfx.gyp » ('j') | ui/gfx/screen_win.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698