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

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

Issue 2517223002: Move content/renderer/background_sync to Blink (Closed)
Patch Set: Fix broken WebEmbeddedWorker test Created 4 years, 1 month 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/CommonCustomTypesStructTraits.h
diff --git a/third_party/WebKit/Source/platform/mojo/CommonCustomTypesStructTraits.h b/third_party/WebKit/Source/platform/mojo/CommonCustomTypesStructTraits.h
index 40595811d9769a9f7fdece63cdba4895cf9ff7cf..051f02e8eb0a33ad31f05c467b64aa6efed4b6ea 100644
--- a/third_party/WebKit/Source/platform/mojo/CommonCustomTypesStructTraits.h
+++ b/third_party/WebKit/Source/platform/mojo/CommonCustomTypesStructTraits.h
@@ -26,6 +26,16 @@ struct PLATFORM_EXPORT
static bool Read(common::mojom::String16DataView, WTF::String* out);
};
+template <>
+struct PLATFORM_EXPORT StructTraits<common::mojom::TimeDataView, double> {
+ static double seconds(double time) { return time; }
+
+ static bool Read(common::mojom::TimeDataView data, double* time) {
+ *time = data.seconds();
+ return true;
+ }
+};
+
} // namespace mojo
#endif // CommonCustomTypesStructTraits_h

Powered by Google App Engine
This is Rietveld 408576698