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

Unified Diff: third_party/WebKit/Source/modules/background_fetch/BackgroundFetchTypeConverters.h

Issue 2762573003: Implement BackgroundFetchManager.fetch() and struct traits (Closed)
Patch Set: First round of comments Created 3 years, 9 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/modules/background_fetch/BackgroundFetchTypeConverters.h
diff --git a/third_party/WebKit/Source/modules/background_fetch/BackgroundFetchTypeConverters.h b/third_party/WebKit/Source/modules/background_fetch/BackgroundFetchTypeConverters.h
new file mode 100644
index 0000000000000000000000000000000000000000..5a5ef9de48d8e060a5d1cc12f4847bbd577050a3
--- /dev/null
+++ b/third_party/WebKit/Source/modules/background_fetch/BackgroundFetchTypeConverters.h
@@ -0,0 +1,48 @@
+// 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 BackgroundFetchTypeConverters_h
+#define BackgroundFetchTypeConverters_h
+
+#include "modules/background_fetch/BackgroundFetchOptions.h"
+#include "modules/background_fetch/IconDefinition.h"
+#include "public/platform/modules/background_fetch/background_fetch.mojom-blink.h"
+
+namespace blink {
+class BackgroundFetchRegistration;
+}
+
+namespace mojo {
+
+template <>
+struct TypeConverter<blink::BackgroundFetchRegistration*,
+ blink::mojom::blink::BackgroundFetchRegistrationPtr> {
+ static blink::BackgroundFetchRegistration* Convert(
+ const blink::mojom::blink::BackgroundFetchRegistrationPtr&);
+};
+
+template <>
+struct TypeConverter<blink::mojom::blink::BackgroundFetchOptionsPtr,
+ blink::BackgroundFetchOptions> {
+ static blink::mojom::blink::BackgroundFetchOptionsPtr Convert(
+ const blink::BackgroundFetchOptions&);
+};
+
+template <>
+struct TypeConverter<blink::IconDefinition,
+ blink::mojom::blink::IconDefinitionPtr> {
+ static blink::IconDefinition Convert(
+ const blink::mojom::blink::IconDefinitionPtr&);
+};
+
+template <>
+struct TypeConverter<blink::mojom::blink::IconDefinitionPtr,
+ blink::IconDefinition> {
+ static blink::mojom::blink::IconDefinitionPtr Convert(
+ const blink::IconDefinition&);
+};
+
+} // namespace mojo
+
+#endif // BackgroundFetchTypeConverters_h

Powered by Google App Engine
This is Rietveld 408576698