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

Unified Diff: third_party/WebKit/Source/platform/mojo/GeometryStructTraits.h

Issue 2943983003: chrome/blink: Add functionality for in-product help for media elements. (Closed)
Patch Set: .. Created 3 years, 4 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: third_party/WebKit/Source/platform/mojo/GeometryStructTraits.h
diff --git a/third_party/WebKit/Source/platform/mojo/GeometryStructTraits.h b/third_party/WebKit/Source/platform/mojo/GeometryStructTraits.h
index 21d4a8ffb839e105432701c63734d495e443f6de..07e5f4fab089b971d2822b7cc3dea9906c63feae 100644
--- a/third_party/WebKit/Source/platform/mojo/GeometryStructTraits.h
+++ b/third_party/WebKit/Source/platform/mojo/GeometryStructTraits.h
@@ -7,6 +7,7 @@
#include "third_party/WebKit/public/platform/WebFloatPoint.h"
#include "third_party/WebKit/public/platform/WebFloatRect.h"
+#include "third_party/WebKit/public/platform/WebRect.h"
#include "third_party/WebKit/public/platform/WebSize.h"
#include "ui/gfx/geometry/mojo/geometry.mojom-shared.h"
@@ -28,6 +29,15 @@ struct StructTraits<gfx::mojom::RectFDataView, ::blink::WebFloatRect> {
static bool Read(gfx::mojom::RectFDataView, ::blink::WebFloatRect* out);
};
+template <>
+struct StructTraits<gfx::mojom::RectDataView, ::blink::WebRect> {
+ static int x(const ::blink::WebRect& rect) { return rect.x; }
+ static int y(const ::blink::WebRect& rect) { return rect.y; }
+ static int width(const ::blink::WebRect& rect) { return rect.width; }
+ static int height(const ::blink::WebRect& rect) { return rect.height; }
+ static bool Read(gfx::mojom::RectDataView, ::blink::WebRect* out);
+};
+
template <>
struct StructTraits<gfx::mojom::SizeDataView, ::blink::WebSize> {
static int width(const ::blink::WebSize& size) { return size.width; }

Powered by Google App Engine
This is Rietveld 408576698