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

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

Issue 1210643002: Update navigator.services API to use the new services.onconnect event [2/3]. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@serviceport
Patch Set: properly close connections when a worker is stopped Created 5 years, 5 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 <map> 8 #include <map>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
115 virtual void didHandleFetchEvent( 115 virtual void didHandleFetchEvent(
116 int request_id, 116 int request_id,
117 const blink::WebServiceWorkerResponse& response); 117 const blink::WebServiceWorkerResponse& response);
118 virtual void didHandleNotificationClickEvent( 118 virtual void didHandleNotificationClickEvent(
119 int request_id, 119 int request_id,
120 blink::WebServiceWorkerEventResult result); 120 blink::WebServiceWorkerEventResult result);
121 virtual void didHandlePushEvent(int request_id, 121 virtual void didHandlePushEvent(int request_id,
122 blink::WebServiceWorkerEventResult result); 122 blink::WebServiceWorkerEventResult result);
123 virtual void didHandleSyncEvent(int request_id, 123 virtual void didHandleSyncEvent(int request_id,
124 blink::WebServiceWorkerEventResult result); 124 blink::WebServiceWorkerEventResult result);
125 virtual void didHandleCrossOriginConnectEvent(int request_id,
126 bool accept_connection);
127 125
128 // Called on the main thread. 126 // Called on the main thread.
129 virtual blink::WebServiceWorkerNetworkProvider* 127 virtual blink::WebServiceWorkerNetworkProvider*
130 createServiceWorkerNetworkProvider(blink::WebDataSource* data_source); 128 createServiceWorkerNetworkProvider(blink::WebDataSource* data_source);
131 virtual blink::WebServiceWorkerProvider* createServiceWorkerProvider(); 129 virtual blink::WebServiceWorkerProvider* createServiceWorkerProvider();
132 130
133 virtual void postMessageToClient( 131 virtual void postMessageToClient(
134 const blink::WebString& uuid, 132 const blink::WebString& uuid,
135 const blink::WebString& message, 133 const blink::WebString& message,
136 blink::WebMessagePortChannelArray* channels); 134 blink::WebMessagePortChannelArray* channels);
(...skipping 26 matching lines...) Expand all
163 void OnSyncEvent(int request_id); 161 void OnSyncEvent(int request_id);
164 void OnNotificationClickEvent( 162 void OnNotificationClickEvent(
165 int request_id, 163 int request_id,
166 int64_t persistent_notification_id, 164 int64_t persistent_notification_id,
167 const PlatformNotificationData& notification_data); 165 const PlatformNotificationData& notification_data);
168 void OnPushEvent(int request_id, const std::string& data); 166 void OnPushEvent(int request_id, const std::string& data);
169 void OnGeofencingEvent(int request_id, 167 void OnGeofencingEvent(int request_id,
170 blink::WebGeofencingEventType event_type, 168 blink::WebGeofencingEventType event_type,
171 const std::string& region_id, 169 const std::string& region_id,
172 const blink::WebCircularGeofencingRegion& region); 170 const blink::WebCircularGeofencingRegion& region);
173 void OnCrossOriginConnectEvent(int request_id,
174 const NavigatorConnectClient& client);
175 void OnPostMessage( 171 void OnPostMessage(
176 const base::string16& message, 172 const base::string16& message,
177 const std::vector<TransferredMessagePort>& sent_message_ports, 173 const std::vector<TransferredMessagePort>& sent_message_ports,
178 const std::vector<int>& new_routing_ids); 174 const std::vector<int>& new_routing_ids);
179 void OnCrossOriginMessageToWorker( 175 void OnCrossOriginMessageToWorker(
180 const NavigatorConnectClient& client, 176 const NavigatorConnectClient& client,
181 const base::string16& message, 177 const base::string16& message,
182 const std::vector<TransferredMessagePort>& sent_message_ports, 178 const std::vector<TransferredMessagePort>& sent_message_ports,
183 const std::vector<int>& new_routing_ids); 179 const std::vector<int>& new_routing_ids);
184 void OnSendStashedMessagePorts( 180 void OnSendStashedMessagePorts(
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
232 std::map<int, base::TimeTicks> install_start_timings_; 228 std::map<int, base::TimeTicks> install_start_timings_;
233 std::map<int, base::TimeTicks> notification_click_start_timings_; 229 std::map<int, base::TimeTicks> notification_click_start_timings_;
234 std::map<int, base::TimeTicks> push_start_timings_; 230 std::map<int, base::TimeTicks> push_start_timings_;
235 231
236 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerContextClient); 232 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerContextClient);
237 }; 233 };
238 234
239 } // namespace content 235 } // namespace content
240 236
241 #endif // CONTENT_RENDERER_SERVICE_WORKER_SERVICE_WORKER_CONTEXT_CLIENT_H_ 237 #endif // CONTENT_RENDERER_SERVICE_WORKER_SERVICE_WORKER_CONTEXT_CLIENT_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698