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

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

Issue 2517223002: Move content/renderer/background_sync to Blink (Closed)
Patch Set: Remove extra includes and make DEPS more specific Created 4 years 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 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 namespace blink { 43 namespace blink {
44 44
45 struct WebCrossOriginServiceWorkerClient; 45 struct WebCrossOriginServiceWorkerClient;
46 struct WebServiceWorkerClientQueryOptions; 46 struct WebServiceWorkerClientQueryOptions;
47 class WebDataSource; 47 class WebDataSource;
48 class WebServiceWorkerContextProxy; 48 class WebServiceWorkerContextProxy;
49 class WebServiceWorkerNetworkProvider; 49 class WebServiceWorkerNetworkProvider;
50 class WebServiceWorkerProvider; 50 class WebServiceWorkerProvider;
51 class WebServiceWorkerResponse; 51 class WebServiceWorkerResponse;
52 class WebString; 52 class WebString;
53 class InterfaceRegistry;
53 54
54 // This interface is implemented by the client. It is supposed to be created 55 // This interface is implemented by the client. It is supposed to be created
55 // on the main thread and then passed on to the worker thread by a newly 56 // on the main thread and then passed on to the worker thread by a newly
56 // created WorkerGlobalScope. Unless otherwise noted, all methods of this class 57 // created WorkerGlobalScope. Unless otherwise noted, all methods of this class
57 // are called on the worker thread. 58 // are called on the worker thread.
58 class WebServiceWorkerContextClient { 59 class WebServiceWorkerContextClient {
59 public: 60 public:
60 virtual ~WebServiceWorkerContextClient() {} 61 virtual ~WebServiceWorkerContextClient() {}
61 62
62 // ServiceWorker specific method. Called when script accesses the 63 // ServiceWorker specific method. Called when script accesses the
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after
175 WebServiceWorkerEventResult result, 176 WebServiceWorkerEventResult result,
176 double eventDispatchTime) {} 177 double eventDispatchTime) {}
177 178
178 // ServiceWorker specific method. Called after PushEvent (dispatched via 179 // ServiceWorker specific method. Called after PushEvent (dispatched via
179 // WebServiceWorkerContextProxy) is handled by the ServiceWorker's script 180 // WebServiceWorkerContextProxy) is handled by the ServiceWorker's script
180 // context. 181 // context.
181 virtual void didHandlePushEvent(int pushEventID, 182 virtual void didHandlePushEvent(int pushEventID,
182 WebServiceWorkerEventResult result, 183 WebServiceWorkerEventResult result,
183 double eventDispatchTime) {} 184 double eventDispatchTime) {}
184 185
185 // ServiceWorker specific method. Called after SyncEvent (dispatched via
186 // WebServiceWorkerContextProxy) is handled by the ServiceWorker's script
187 // context.
188 virtual void didHandleSyncEvent(int syncEventID,
189 WebServiceWorkerEventResult result,
190 double eventDispatchTime) {}
191
192 // Ownership of the returned object is transferred to the caller. 186 // Ownership of the returned object is transferred to the caller.
193 // This is called on the main thread. 187 // This is called on the main thread.
194 virtual WebServiceWorkerNetworkProvider* createServiceWorkerNetworkProvider( 188 virtual WebServiceWorkerNetworkProvider* createServiceWorkerNetworkProvider(
195 WebDataSource*) { 189 WebDataSource*) {
196 return nullptr; 190 return nullptr;
197 } 191 }
198 192
199 // Ownership of the returned object is transferred to the caller. 193 // Ownership of the returned object is transferred to the caller.
200 // This is called on the main thread. 194 // This is called on the main thread.
201 virtual WebServiceWorkerProvider* createServiceWorkerProvider() { 195 virtual WebServiceWorkerProvider* createServiceWorkerProvider() {
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
262 // passed to the WebServiceWorkerClientsCallbacks implementation. 256 // passed to the WebServiceWorkerClientsCallbacks implementation.
263 virtual void navigate(const WebString& uuid, 257 virtual void navigate(const WebString& uuid,
264 const WebURL&, 258 const WebURL&,
265 WebServiceWorkerClientCallbacks*) = 0; 259 WebServiceWorkerClientCallbacks*) = 0;
266 260
267 // Called when the worker wants to register subscopes to handle via foreign 261 // Called when the worker wants to register subscopes to handle via foreign
268 // fetch. Will only be called while an install event is in progress. 262 // fetch. Will only be called while an install event is in progress.
269 virtual void registerForeignFetchScopes( 263 virtual void registerForeignFetchScopes(
270 const WebVector<WebURL>& subScopes, 264 const WebVector<WebURL>& subScopes,
271 const WebVector<WebSecurityOrigin>& origins) = 0; 265 const WebVector<WebSecurityOrigin>& origins) = 0;
266
267 virtual InterfaceRegistry* interfaceRegistry() { return nullptr; }
jbroman 2016/11/21 21:36:01 nit: I know this file is already inconsistent, but
272 }; 268 };
273 269
274 } // namespace blink 270 } // namespace blink
275 271
276 #endif // WebServiceWorkerContextClient_h 272 #endif // WebServiceWorkerContextClient_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698