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

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

Issue 1636483002: Update the PushEvent to have a nullable PushMessageData (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address comments Created 4 years, 11 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 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 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 } 46 }
47 47
48 namespace IPC { 48 namespace IPC {
49 class Message; 49 class Message;
50 } 50 }
51 51
52 namespace content { 52 namespace content {
53 53
54 struct NavigatorConnectClient; 54 struct NavigatorConnectClient;
55 struct PlatformNotificationData; 55 struct PlatformNotificationData;
56 struct PushEventPayload;
56 struct ServiceWorkerClientInfo; 57 struct ServiceWorkerClientInfo;
57 class ServiceWorkerProviderContext; 58 class ServiceWorkerProviderContext;
58 class ServiceWorkerContextClient; 59 class ServiceWorkerContextClient;
59 class ThreadSafeSender; 60 class ThreadSafeSender;
60 class WebServiceWorkerRegistrationImpl; 61 class WebServiceWorkerRegistrationImpl;
61 62
62 // This class provides access to/from an ServiceWorker's WorkerGlobalScope. 63 // This class provides access to/from an ServiceWorker's WorkerGlobalScope.
63 // Unless otherwise noted, all methods are called on the worker thread. 64 // Unless otherwise noted, all methods are called on the worker thread.
64 class ServiceWorkerContextClient 65 class ServiceWorkerContextClient
65 : public blink::WebServiceWorkerContextClient { 66 : public blink::WebServiceWorkerContextClient {
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after
185 const ServiceWorkerVersionAttributes& attrs); 186 const ServiceWorkerVersionAttributes& attrs);
186 187
187 void OnActivateEvent(int request_id); 188 void OnActivateEvent(int request_id);
188 void OnInstallEvent(int request_id); 189 void OnInstallEvent(int request_id);
189 void OnFetchEvent(int request_id, const ServiceWorkerFetchRequest& request); 190 void OnFetchEvent(int request_id, const ServiceWorkerFetchRequest& request);
190 void OnNotificationClickEvent( 191 void OnNotificationClickEvent(
191 int request_id, 192 int request_id,
192 int64_t persistent_notification_id, 193 int64_t persistent_notification_id,
193 const PlatformNotificationData& notification_data, 194 const PlatformNotificationData& notification_data,
194 int action_index); 195 int action_index);
195 void OnPushEvent(int request_id, const std::string& data); 196 void OnPushEvent(int request_id, const content::PushEventPayload& payload);
Peter Beverloo 2016/01/26 12:35:18 s/content:://
harkness 2016/01/26 14:49:20 Done.
196 void OnGeofencingEvent(int request_id, 197 void OnGeofencingEvent(int request_id,
197 blink::WebGeofencingEventType event_type, 198 blink::WebGeofencingEventType event_type,
198 const std::string& region_id, 199 const std::string& region_id,
199 const blink::WebCircularGeofencingRegion& region); 200 const blink::WebCircularGeofencingRegion& region);
200 void OnPostMessage( 201 void OnPostMessage(
201 const base::string16& message, 202 const base::string16& message,
202 const std::vector<TransferredMessagePort>& sent_message_ports, 203 const std::vector<TransferredMessagePort>& sent_message_ports,
203 const std::vector<int>& new_routing_ids); 204 const std::vector<int>& new_routing_ids);
204 void OnCrossOriginMessageToWorker( 205 void OnCrossOriginMessageToWorker(
205 const NavigatorConnectClient& client, 206 const NavigatorConnectClient& client,
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
242 // Initialized on the worker thread in workerContextStarted and 243 // Initialized on the worker thread in workerContextStarted and
243 // destructed on the worker thread in willDestroyWorkerContext. 244 // destructed on the worker thread in willDestroyWorkerContext.
244 scoped_ptr<WorkerContextData> context_; 245 scoped_ptr<WorkerContextData> context_;
245 246
246 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerContextClient); 247 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerContextClient);
247 }; 248 };
248 249
249 } // namespace content 250 } // namespace content
250 251
251 #endif // CONTENT_RENDERER_SERVICE_WORKER_SERVICE_WORKER_CONTEXT_CLIENT_H_ 252 #endif // CONTENT_RENDERER_SERVICE_WORKER_SERVICE_WORKER_CONTEXT_CLIENT_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698