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

Unified Diff: ui/display/types/display_mode.cc

Issue 2646213002: Write mojom and StructTraits for DisplaySnapshot. (Closed)
Patch Set: fix nits. Created 3 years, 10 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
« ui/display/types/display_mode.h ('K') | « ui/display/types/display_mode.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/display/types/display_mode.cc
diff --git a/ui/display/types/display_mode.cc b/ui/display/types/display_mode.cc
index 6d43caa5638406c5e43a4b7003d0e491db066715..b44970ac3e9b05634d4fd9c05b5eae719073a4d3 100644
--- a/ui/display/types/display_mode.cc
+++ b/ui/display/types/display_mode.cc
@@ -18,10 +18,18 @@ DisplayMode::DisplayMode(const gfx::Size& size,
DisplayMode::~DisplayMode() {}
+bool DisplayMode::operator==(const DisplayMode& other) const {
+ return this->size() == other.size() &&
+ this->is_interlaced() == other.is_interlaced() &&
+ this->refresh_rate() == other.refresh_rate();
+}
+
+bool DisplayMode::operator!=(const DisplayMode& other) const {
+ return !operator==(other);
+}
+
std::unique_ptr<DisplayMode> DisplayMode::Clone() const {
- return base::WrapUnique(new DisplayMode(size_,
- is_interlaced_,
- refresh_rate_));
+ return base::MakeUnique<DisplayMode>(size_, is_interlaced_, refresh_rate_);
}
std::string DisplayMode::ToString() const {
« ui/display/types/display_mode.h ('K') | « ui/display/types/display_mode.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698