Index: third_party/WebKit/Source/modules/background_fetch/BackgroundFetchStructTraits.h |
diff --git a/third_party/WebKit/Source/modules/background_fetch/BackgroundFetchStructTraits.h b/third_party/WebKit/Source/modules/background_fetch/BackgroundFetchStructTraits.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..c51cd21dc6aea3436845eb3d43a5f49ac9b09f5e |
--- /dev/null |
+++ b/third_party/WebKit/Source/modules/background_fetch/BackgroundFetchStructTraits.h |
@@ -0,0 +1,34 @@ |
+// Copyright 2017 The Chromium Authors. All rights reserved. |
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+#ifndef BackgroundFetchStructTraits_h |
+#define BackgroundFetchStructTraits_h |
+ |
+#include "public/platform/modules/background_fetch/background_fetch.mojom-blink.h" |
+#include "wtf/text/WTFString.h" |
+ |
+namespace mojo { |
+ |
+template <> |
+struct StructTraits<blink::mojom::IconDefinitionDataView, |
+ blink::IconDefinition> { |
+ static WTF::String src(const blink::IconDefinition& definition) { |
+ return definition.src(); |
+ } |
+ |
+ static WTF::String sizes(const blink::IconDefinition& definition) { |
+ return definition.sizes(); |
+ } |
+ |
+ static WTF::String type(const blink::IconDefinition& definition) { |
+ return definition.type(); |
+ } |
+ |
+ static bool Read(blink::mojom::IconDefinitionDataView input, |
+ blink::IconDefinition* out); |
+}; |
+ |
+} // namespace mojo |
+ |
+#endif // BackgroundFetchStructTraits_h |