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

Unified Diff: content/common/background_fetch/background_fetch_struct_traits.h

Issue 2767093004: Implement the BackgroundFetch{Fail,ed} Service Worker events (Closed)
Patch Set: forward declare the data view 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: content/common/background_fetch/background_fetch_struct_traits.h
diff --git a/content/common/background_fetch/background_fetch_struct_traits.h b/content/common/background_fetch/background_fetch_struct_traits.h
index c824610e2b29c85016fa5769692fa7500ff3737e..d1d3ee3549d72e91f9496154e15562837b1ba30b 100644
--- a/content/common/background_fetch/background_fetch_struct_traits.h
+++ b/content/common/background_fetch/background_fetch_struct_traits.h
@@ -13,6 +13,12 @@
#include "mojo/public/cpp/bindings/struct_traits.h"
#include "third_party/WebKit/public/platform/modules/background_fetch/background_fetch.mojom.h"
+namespace content {
+namespace mojom {
+class BackgroundFetchSettledFetchDataView;
+}
+}
+
namespace mojo {
template <>
@@ -61,6 +67,23 @@ struct CONTENT_EXPORT
};
template <>
+struct CONTENT_EXPORT
+ StructTraits<content::mojom::BackgroundFetchSettledFetchDataView,
+ content::BackgroundFetchSettledFetch> {
+ static const content::ServiceWorkerFetchRequest& request(
+ const content::BackgroundFetchSettledFetch& fetch) {
+ return fetch.request;
+ }
+ static const content::ServiceWorkerResponse& response(
+ const content::BackgroundFetchSettledFetch& fetch) {
+ return fetch.response;
+ }
+
+ static bool Read(content::mojom::BackgroundFetchSettledFetchDataView data,
+ content::BackgroundFetchSettledFetch* definition);
+};
+
+template <>
struct CONTENT_EXPORT StructTraits<blink::mojom::IconDefinitionDataView,
content::IconDefinition> {
static const std::string& src(const content::IconDefinition& definition) {

Powered by Google App Engine
This is Rietveld 408576698