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

Side by Side 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 unified diff | Download patch
« no previous file with comments | « Source/platform/blink_platform.gypi ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2009 Google Inc. All rights reserved. 2 * Copyright (C) 2009 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
77 // It is the opposite of the physical rotation. 77 // It is the opposite of the physical rotation.
78 uint16_t orientationAngle; 78 uint16_t orientationAngle;
79 79
80 WebScreenInfo() 80 WebScreenInfo()
81 : deviceScaleFactor(1) 81 : deviceScaleFactor(1)
82 , depth(0) 82 , depth(0)
83 , depthPerComponent(0) 83 , depthPerComponent(0)
84 , isMonochrome(false) 84 , isMonochrome(false)
85 , orientationType(WebScreenOrientationUndefined) 85 , orientationType(WebScreenOrientationUndefined)
86 , orientationAngle(0) { } 86 , orientationAngle(0) { }
87
88 bool operator==(const WebScreenInfo& other) const
89 {
90 return this->deviceScaleFactor == other.deviceScaleFactor
91 && this->depth == other.depth
92 && this->depthPerComponent == other.depthPerComponent
93 && this->isMonochrome == other.isMonochrome
94 && this->rect == other.rect
95 && this->availableRect == other.availableRect
96 && this->orientationType == other.orientationType
97 && this->orientationAngle == other.orientationAngle;
98 }
99
100 bool operator!=(const WebScreenInfo& other) const
101 {
102 return !this->operator==(other);
103 }
87 }; 104 };
88 105
89 } // namespace blink 106 } // namespace blink
90 107
91 #endif 108 #endif
OLDNEW
« 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