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

Unified Diff: public/platform/WebScreenInfo.h

Issue 1100503003: Add operator== to WebScreenInfo. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: add testS Created 5 years, 8 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 | « Source/platform/blink_platform.gypi ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: public/platform/WebScreenInfo.h
diff --git a/public/platform/WebScreenInfo.h b/public/platform/WebScreenInfo.h
index 90413b9d4c6169b8f37054d41c3c6c95b9865956..76561bbb41564ffde82fa33a873106bac7c21c43 100644
--- a/public/platform/WebScreenInfo.h
+++ b/public/platform/WebScreenInfo.h
@@ -84,6 +84,23 @@ struct WebScreenInfo {
, isMonochrome(false)
, orientationType(WebScreenOrientationUndefined)
, orientationAngle(0) { }
+
+ bool operator==(const WebScreenInfo& other) const
+ {
+ return this->deviceScaleFactor == other.deviceScaleFactor
+ && this->depth == other.depth
+ && this->depthPerComponent == other.depthPerComponent
+ && this->isMonochrome == other.isMonochrome
+ && this->rect == other.rect
+ && this->availableRect == other.availableRect
+ && this->orientationType == other.orientationType
+ && this->orientationAngle == other.orientationAngle;
+ }
+
+ bool operator!=(const WebScreenInfo& other) const
+ {
+ return !this->operator==(other);
+ }
};
} // namespace blink
« no previous file with comments | « Source/platform/blink_platform.gypi ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698