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

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

Issue 2636073002: Create mojom and StructTraits for ui/display/types/display_mode.cc (Closed)
Patch Set: Dont need to make changes in ui/ozone/common/BUILD.gn. Created 3 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
Index: ui/display/types/display_mode.h
diff --git a/ui/display/types/display_mode.h b/ui/display/types/display_mode.h
index 0b972d5f497a8288007c0d154c74ca982964f31f..bb7bfc3973e1a1c9e201e2a90637214f1b370869 100644
--- a/ui/display/types/display_mode.h
+++ b/ui/display/types/display_mode.h
@@ -20,9 +20,24 @@ namespace display {
class DISPLAY_TYPES_EXPORT DisplayMode {
public:
DisplayMode(const gfx::Size& size, bool interlaced, float refresh_rate);
+ DisplayMode(DisplayMode&&) = default;
kylechar 2017/01/24 21:15:07 Move to cc file.
thanhph1 2017/01/25 16:26:17 Done.
+ DisplayMode& operator=(DisplayMode&&) = default;
kylechar 2017/01/24 21:15:07 Move to cc file.
thanhph1 2017/01/25 16:26:17 Done.
+
virtual ~DisplayMode();
virtual std::unique_ptr<DisplayMode> Clone() const;
+ void set_size(const gfx::Size& size) {
kylechar 2017/01/24 21:15:07 We really don't want to make DisplayMode mutable.
thanhph1 2017/01/25 16:26:17 As discussed, I removed display_mode_mojo.(cc|h) a
+ size_ = size;
+ }
+
+ void set_is_interlaced(const bool is_interlaced) {
+ is_interlaced_ = is_interlaced;
+ }
+
+ void set_refresh_rate(const float refresh_rate) {
+ refresh_rate_ = refresh_rate;
+ }
+
const gfx::Size& size() const { return size_; }
bool is_interlaced() const { return is_interlaced_; }
float refresh_rate() const { return refresh_rate_; }
« ui/display/mojo/display_struct_traits_unittest.cc ('K') | « ui/display/mojo/typemaps.gni ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698