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

Side by Side Diff: third_party/WebKit/public/web/modules/serviceworker/WebServiceWorkerContextClient.h

Issue 2703343002: ServiceWorker: Use mojo's data pipe for respondWith(stream) (Closed)
Patch Set: IFRAME_URL -> SCOPE Created 3 years, 8 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 /* 1 /*
2 * Copyright (C) 2013 Google Inc. All rights reserved. 2 * Copyright (C) 2013 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 21 matching lines...) Expand all
32 #define WebServiceWorkerContextClient_h 32 #define WebServiceWorkerContextClient_h
33 33
34 #include <memory> 34 #include <memory>
35 35
36 #include "public/platform/WebMessagePortChannel.h" 36 #include "public/platform/WebMessagePortChannel.h"
37 #include "public/platform/WebURL.h" 37 #include "public/platform/WebURL.h"
38 #include "public/platform/modules/serviceworker/WebServiceWorkerClientsClaimCall backs.h" 38 #include "public/platform/modules/serviceworker/WebServiceWorkerClientsClaimCall backs.h"
39 #include "public/platform/modules/serviceworker/WebServiceWorkerClientsInfo.h" 39 #include "public/platform/modules/serviceworker/WebServiceWorkerClientsInfo.h"
40 #include "public/platform/modules/serviceworker/WebServiceWorkerEventResult.h" 40 #include "public/platform/modules/serviceworker/WebServiceWorkerEventResult.h"
41 #include "public/platform/modules/serviceworker/WebServiceWorkerSkipWaitingCallb acks.h" 41 #include "public/platform/modules/serviceworker/WebServiceWorkerSkipWaitingCallb acks.h"
42 #include "public/platform/modules/serviceworker/WebServiceWorkerStreamHandle.h"
42 #include "public/web/WebDevToolsAgentClient.h" 43 #include "public/web/WebDevToolsAgentClient.h"
43 #include "v8/include/v8.h" 44 #include "v8/include/v8.h"
44 45
45 namespace blink { 46 namespace blink {
46 47
47 struct WebPaymentAppResponse; 48 struct WebPaymentAppResponse;
48 struct WebServiceWorkerClientQueryOptions; 49 struct WebServiceWorkerClientQueryOptions;
49 class WebServiceWorkerContextProxy; 50 class WebServiceWorkerContextProxy;
50 class WebServiceWorkerNetworkProvider; 51 class WebServiceWorkerNetworkProvider;
51 class WebServiceWorkerProvider; 52 class WebServiceWorkerProvider;
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
160 virtual void DidHandleExtendableMessageEvent( 161 virtual void DidHandleExtendableMessageEvent(
161 int event_id, 162 int event_id,
162 WebServiceWorkerEventResult result, 163 WebServiceWorkerEventResult result,
163 double event_dispatch_time) {} 164 double event_dispatch_time) {}
164 165
165 // ServiceWorker specific methods. respondFetchEvent will be called after 166 // ServiceWorker specific methods. respondFetchEvent will be called after
166 // FetchEvent returns a response by the ServiceWorker's script context, and 167 // FetchEvent returns a response by the ServiceWorker's script context, and
167 // didHandleFetchEvent will be called after the end of FetchEvent's 168 // didHandleFetchEvent will be called after the end of FetchEvent's
168 // lifecycle. When no response is provided, the browser should fallback to 169 // lifecycle. When no response is provided, the browser should fallback to
169 // native fetch. EventIDs are the same with the ids passed from 170 // native fetch. EventIDs are the same with the ids passed from
170 // dispatchFetchEvent respectively. 171 // dispatchFetchEvent respectively.
falken 2017/04/12 08:00:16 RespondToFetchEvent and ResponseToFetchEventWithRe
shimazu 2017/04/18 01:50:05 Done.
171 virtual void RespondToFetchEvent(int fetch_event_id, 172 virtual void RespondToFetchEvent(int fetch_event_id,
172 double event_dispatch_time) {} 173 double event_dispatch_time) {}
173 virtual void RespondToFetchEvent(int fetch_event_id, 174 virtual void RespondToFetchEventWithResponse(
174 const WebServiceWorkerResponse& response, 175 int fetch_event_id,
175 double event_dispatch_time) {} 176 const WebServiceWorkerResponse& response,
177 double event_dispatch_time) {}
178 virtual void RespondToFetchEventWithResponseStream(
179 int fetch_event_id,
180 const WebServiceWorkerResponse& response,
181 WebServiceWorkerStreamHandle* web_stream_handle,
182 double event_dispatch_time) {}
176 virtual void RespondToPaymentRequestEvent( 183 virtual void RespondToPaymentRequestEvent(
177 int event_id, 184 int event_id,
178 const WebPaymentAppResponse& response, 185 const WebPaymentAppResponse& response,
179 double event_dispatch_time) {} 186 double event_dispatch_time) {}
180 virtual void DidHandleFetchEvent(int fetch_event_id, 187 virtual void DidHandleFetchEvent(int fetch_event_id,
181 WebServiceWorkerEventResult result, 188 WebServiceWorkerEventResult result,
182 double event_dispatch_time) {} 189 double event_dispatch_time) {}
183 190
184 // ServiceWorker specific method. Called after InstallEvent (dispatched 191 // ServiceWorker specific method. Called after InstallEvent (dispatched
185 // via WebServiceWorkerContextProxy) is handled by the ServiceWorker's 192 // via WebServiceWorkerContextProxy) is handled by the ServiceWorker's
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
300 // Called when the worker wants to register subscopes to handle via foreign 307 // Called when the worker wants to register subscopes to handle via foreign
301 // fetch. Will only be called while an install event is in progress. 308 // fetch. Will only be called while an install event is in progress.
302 virtual void RegisterForeignFetchScopes( 309 virtual void RegisterForeignFetchScopes(
303 const WebVector<WebURL>& sub_scopes, 310 const WebVector<WebURL>& sub_scopes,
304 const WebVector<WebSecurityOrigin>& origins) = 0; 311 const WebVector<WebSecurityOrigin>& origins) = 0;
305 }; 312 };
306 313
307 } // namespace blink 314 } // namespace blink
308 315
309 #endif // WebServiceWorkerContextClient_h 316 #endif // WebServiceWorkerContextClient_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698