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

Side by Side Diff: content/common/background_fetch/background_fetch_types.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 unified diff | Download patch
OLDNEW
1 // Copyright 2017 The Chromium Authors. All rights reserved. 1 // Copyright 2017 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CONTENT_COMMON_BACKGROUND_FETCH_BACKGROUND_FETCH_TYPES_H_ 5 #ifndef CONTENT_COMMON_BACKGROUND_FETCH_BACKGROUND_FETCH_TYPES_H_
6 #define CONTENT_COMMON_BACKGROUND_FETCH_BACKGROUND_FETCH_TYPES_H_ 6 #define CONTENT_COMMON_BACKGROUND_FETCH_BACKGROUND_FETCH_TYPES_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
11 11
12 #include "content/common/content_export.h" 12 #include "content/common/content_export.h"
13 #include "content/common/service_worker/service_worker_types.h"
13 14
14 namespace content { 15 namespace content {
15 16
16 // Represents the definition of an icon developers can optionally provide with a 17 // Represents the definition of an icon developers can optionally provide with a
17 // Background Fetch fetch. Analogous to the following structure in the spec: 18 // Background Fetch fetch. Analogous to the following structure in the spec:
18 // https://wicg.github.io/background-fetch/#background-fetch-manager 19 // https://wicg.github.io/background-fetch/#background-fetch-manager
19 // 20 //
20 // Parsing of the icon definitions as well as fetching an appropriate icon will 21 // Parsing of the icon definitions as well as fetching an appropriate icon will
21 // be done by Blink in the renderer process. The browser process is expected to 22 // be done by Blink in the renderer process. The browser process is expected to
22 // treat these values as opaque strings. 23 // treat these values as opaque strings.
(...skipping 29 matching lines...) Expand all
52 ~BackgroundFetchRegistration(); 53 ~BackgroundFetchRegistration();
53 54
54 std::string tag; 55 std::string tag;
55 std::vector<IconDefinition> icons; 56 std::vector<IconDefinition> icons;
56 std::string title; 57 std::string title;
57 int64_t total_download_size = 0; 58 int64_t total_download_size = 0;
58 59
59 // TODO(peter): Support the `activeFetches` member of the specification. 60 // TODO(peter): Support the `activeFetches` member of the specification.
60 }; 61 };
61 62
63 // Represents a request/response pair for a settled Background Fetch fetch.
64 // Analogous to the following structure in the spec:
65 // http://wicg.github.io/background-fetch/#backgroundfetchsettledfetch
66 struct CONTENT_EXPORT BackgroundFetchSettledFetch {
67 BackgroundFetchSettledFetch();
68 BackgroundFetchSettledFetch(const BackgroundFetchSettledFetch& other);
69 ~BackgroundFetchSettledFetch();
70
71 ServiceWorkerFetchRequest request;
72 ServiceWorkerResponse response;
73 };
74
62 } // namespace content 75 } // namespace content
63 76
64 #endif // CONTENT_COMMON_BACKGROUND_FETCH_BACKGROUND_FETCH_TYPES_H_ 77 #endif // CONTENT_COMMON_BACKGROUND_FETCH_BACKGROUND_FETCH_TYPES_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698