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

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

Issue 2636073002: Create mojom and StructTraits for ui/display/types/display_mode.cc (Closed)
Patch Set: Change structure not to use display_mode_mojo.(cc|h). Instead, use friend class in display_mode.h. 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..4e6f700b43048efc7b3dc7e1a02d66cf1a65aa8e 100644
--- a/ui/display/types/display_mode.h
+++ b/ui/display/types/display_mode.h
@@ -13,13 +13,27 @@
#include "ui/display/types/display_types_export.h"
#include "ui/gfx/geometry/size.h"
+#if !defined(OS_IOS)
kylechar 2017/01/25 16:59:45 Get rid of all the !defined(OS_IOS) ifdefs, here a
thanhph1 2017/01/25 20:28:40 Done.
+#include "mojo/public/cpp/bindings/struct_traits.h" // nogncheck
kylechar 2017/01/25 16:59:45 Remove the // nogncheck.
thanhph1 2017/01/25 20:28:40 Done.
+#endif
+
namespace display {
+#if !defined(OS_IOS)
+namespace mojom {
+class DisplayModeDataView;
+}
+#endif
+
// This class represents the basic information for a native mode. Platforms will
// extend this class to add platform specific information about the mode.
class DISPLAY_TYPES_EXPORT DisplayMode {
public:
+ DisplayMode();
kylechar 2017/01/25 16:59:45 Can you make this private? I'm not sure what insta
thanhph1 2017/01/25 20:28:40 This display_struct_traits_test.mojom.cc uses it s
DisplayMode(const gfx::Size& size, bool interlaced, float refresh_rate);
+ DisplayMode(DisplayMode&&);
+ DisplayMode& operator=(DisplayMode&&);
+
virtual ~DisplayMode();
virtual std::unique_ptr<DisplayMode> Clone() const;
@@ -34,6 +48,10 @@ class DISPLAY_TYPES_EXPORT DisplayMode {
bool is_interlaced_;
float refresh_rate_;
+#if !defined(OS_IOS)
+ friend struct mojo::StructTraits<mojom::DisplayModeDataView, DisplayMode>;
+#endif
+
DISALLOW_COPY_AND_ASSIGN(DisplayMode);
};

Powered by Google App Engine
This is Rietveld 408576698