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

Side by Side Diff: content/renderer/service_worker/service_worker_context_client.h

Issue 2534403002: [ServiceWorker] Mojofy extendable message event. (Closed)
Patch Set: Rebase only 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 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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_RENDERER_SERVICE_WORKER_SERVICE_WORKER_CONTEXT_CLIENT_H_ 5 #ifndef CONTENT_RENDERER_SERVICE_WORKER_SERVICE_WORKER_CONTEXT_CLIENT_H_
6 #define CONTENT_RENDERER_SERVICE_WORKER_SERVICE_WORKER_CONTEXT_CLIENT_H_ 6 #define CONTENT_RENDERER_SERVICE_WORKER_SERVICE_WORKER_CONTEXT_CLIENT_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 #include <stdint.h> 9 #include <stdint.h>
10 10
(...skipping 14 matching lines...) Expand all
25 #include "content/common/service_worker/service_worker_types.h" 25 #include "content/common/service_worker/service_worker_types.h"
26 #include "ipc/ipc_listener.h" 26 #include "ipc/ipc_listener.h"
27 #include "mojo/public/cpp/bindings/binding.h" 27 #include "mojo/public/cpp/bindings/binding.h"
28 #include "third_party/WebKit/public/platform/WebMessagePortChannel.h" 28 #include "third_party/WebKit/public/platform/WebMessagePortChannel.h"
29 #include "third_party/WebKit/public/platform/modules/serviceworker/WebServiceWor kerError.h" 29 #include "third_party/WebKit/public/platform/modules/serviceworker/WebServiceWor kerError.h"
30 #include "third_party/WebKit/public/platform/modules/serviceworker/service_worke r_event_status.mojom.h" 30 #include "third_party/WebKit/public/platform/modules/serviceworker/service_worke r_event_status.mojom.h"
31 #include "third_party/WebKit/public/web/modules/serviceworker/WebServiceWorkerCo ntextClient.h" 31 #include "third_party/WebKit/public/web/modules/serviceworker/WebServiceWorkerCo ntextClient.h"
32 #include "third_party/WebKit/public/web/modules/serviceworker/WebServiceWorkerCo ntextProxy.h" 32 #include "third_party/WebKit/public/web/modules/serviceworker/WebServiceWorkerCo ntextProxy.h"
33 #include "v8/include/v8.h" 33 #include "v8/include/v8.h"
34 34
35 struct ServiceWorkerMsg_ExtendableMessageEvent_Params;
36
37 namespace base { 35 namespace base {
38 class SingleThreadTaskRunner; 36 class SingleThreadTaskRunner;
39 class TaskRunner; 37 class TaskRunner;
40 } 38 }
41 39
42 namespace blink { 40 namespace blink {
43 class WebDataConsumerHandle; 41 class WebDataConsumerHandle;
44 class WebDataSource; 42 class WebDataSource;
45 struct WebServiceWorkerClientQueryOptions; 43 struct WebServiceWorkerClientQueryOptions;
46 class WebServiceWorkerContextProxy; 44 class WebServiceWorkerContextProxy;
(...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after
212 // in the browser process. 210 // in the browser process.
213 int GetRoutingID() const { return embedded_worker_id_; } 211 int GetRoutingID() const { return embedded_worker_id_; }
214 212
215 void Send(IPC::Message* message); 213 void Send(IPC::Message* message);
216 void SendWorkerStarted(); 214 void SendWorkerStarted();
217 void SetRegistrationInServiceWorkerGlobalScope( 215 void SetRegistrationInServiceWorkerGlobalScope(
218 const ServiceWorkerRegistrationObjectInfo& info, 216 const ServiceWorkerRegistrationObjectInfo& info,
219 const ServiceWorkerVersionAttributes& attrs); 217 const ServiceWorkerVersionAttributes& attrs);
220 218
221 // mojom::ServiceWorkerEventDispatcher 219 // mojom::ServiceWorkerEventDispatcher
220 void DispatchExtendableMessageEvent(
221 mojom::ExtendableMessageEventPtr event,
222 const DispatchExtendableMessageEventCallback& callback) override;
222 void DispatchFetchEvent(int fetch_event_id, 223 void DispatchFetchEvent(int fetch_event_id,
223 const ServiceWorkerFetchRequest& request, 224 const ServiceWorkerFetchRequest& request,
224 mojom::FetchEventPreloadHandlePtr preload_handle, 225 mojom::FetchEventPreloadHandlePtr preload_handle,
225 const DispatchFetchEventCallback& callback) override; 226 const DispatchFetchEventCallback& callback) override;
226 void DispatchSyncEvent( 227 void DispatchSyncEvent(
227 const std::string& tag, 228 const std::string& tag,
228 blink::mojom::BackgroundSyncEventLastChance last_chance, 229 blink::mojom::BackgroundSyncEventLastChance last_chance,
229 const DispatchSyncEventCallback& callback) override; 230 const DispatchSyncEventCallback& callback) override;
230 231
231 void OnActivateEvent(int request_id); 232 void OnActivateEvent(int request_id);
232 void OnExtendableMessageEvent(
233 int request_id,
234 const ServiceWorkerMsg_ExtendableMessageEvent_Params& params);
235 void OnInstallEvent(int request_id); 233 void OnInstallEvent(int request_id);
236 void OnNotificationClickEvent( 234 void OnNotificationClickEvent(
237 int request_id, 235 int request_id,
238 const std::string& notification_id, 236 const std::string& notification_id,
239 const PlatformNotificationData& notification_data, 237 const PlatformNotificationData& notification_data,
240 int action_index, 238 int action_index,
241 const base::NullableString16& reply); 239 const base::NullableString16& reply);
242 void OnPushEvent(int request_id, const PushEventPayload& payload); 240 void OnPushEvent(int request_id, const PushEventPayload& payload);
243 void OnNotificationCloseEvent( 241 void OnNotificationCloseEvent(
244 int request_id, 242 int request_id,
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
296 // Initialized on the worker thread in workerContextStarted and 294 // Initialized on the worker thread in workerContextStarted and
297 // destructed on the worker thread in willDestroyWorkerContext. 295 // destructed on the worker thread in willDestroyWorkerContext.
298 std::unique_ptr<WorkerContextData> context_; 296 std::unique_ptr<WorkerContextData> context_;
299 297
300 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerContextClient); 298 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerContextClient);
301 }; 299 };
302 300
303 } // namespace content 301 } // namespace content
304 302
305 #endif // CONTENT_RENDERER_SERVICE_WORKER_SERVICE_WORKER_CONTEXT_CLIENT_H_ 303 #endif // CONTENT_RENDERER_SERVICE_WORKER_SERVICE_WORKER_CONTEXT_CLIENT_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698