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

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: decouple renderer side code more 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 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
116 virtual void didHandleFetchEvent( 116 virtual void didHandleFetchEvent(
117 int request_id, 117 int request_id,
118 const blink::WebServiceWorkerResponse& response); 118 const blink::WebServiceWorkerResponse& response);
119 virtual void didHandleNotificationClickEvent( 119 virtual void didHandleNotificationClickEvent(
120 int request_id, 120 int request_id,
121 blink::WebServiceWorkerEventResult result); 121 blink::WebServiceWorkerEventResult result);
122 virtual void didHandlePushEvent(int request_id, 122 virtual void didHandlePushEvent(int request_id,
123 blink::WebServiceWorkerEventResult result); 123 blink::WebServiceWorkerEventResult result);
124 virtual void didHandleSyncEvent(int request_id, 124 virtual void didHandleSyncEvent(int request_id,
125 blink::WebServiceWorkerEventResult result); 125 blink::WebServiceWorkerEventResult result);
126 virtual void didHandleCrossOriginConnectEvent(int request_id,
127 bool accept_connection);
128 126
129 // Called on the main thread. 127 // Called on the main thread.
130 virtual blink::WebServiceWorkerNetworkProvider* 128 virtual blink::WebServiceWorkerNetworkProvider*
131 createServiceWorkerNetworkProvider(blink::WebDataSource* data_source); 129 createServiceWorkerNetworkProvider(blink::WebDataSource* data_source);
132 virtual blink::WebServiceWorkerProvider* createServiceWorkerProvider(); 130 virtual blink::WebServiceWorkerProvider* createServiceWorkerProvider();
133 131
134 virtual void postMessageToClient( 132 virtual void postMessageToClient(
135 const blink::WebString& uuid, 133 const blink::WebString& uuid,
136 const blink::WebString& message, 134 const blink::WebString& message,
137 blink::WebMessagePortChannelArray* channels); 135 blink::WebMessagePortChannelArray* channels);
(...skipping 26 matching lines...) Expand all
164 void OnSyncEvent(int request_id); 162 void OnSyncEvent(int request_id);
165 void OnNotificationClickEvent( 163 void OnNotificationClickEvent(
166 int request_id, 164 int request_id,
167 int64_t persistent_notification_id, 165 int64_t persistent_notification_id,
168 const PlatformNotificationData& notification_data); 166 const PlatformNotificationData& notification_data);
169 void OnPushEvent(int request_id, const std::string& data); 167 void OnPushEvent(int request_id, const std::string& data);
170 void OnGeofencingEvent(int request_id, 168 void OnGeofencingEvent(int request_id,
171 blink::WebGeofencingEventType event_type, 169 blink::WebGeofencingEventType event_type,
172 const std::string& region_id, 170 const std::string& region_id,
173 const blink::WebCircularGeofencingRegion& region); 171 const blink::WebCircularGeofencingRegion& region);
174 void OnCrossOriginConnectEvent(int request_id,
175 const NavigatorConnectClient& client);
176 void OnPostMessage( 172 void OnPostMessage(
177 const base::string16& message, 173 const base::string16& message,
178 const std::vector<TransferredMessagePort>& sent_message_ports, 174 const std::vector<TransferredMessagePort>& sent_message_ports,
179 const std::vector<int>& new_routing_ids); 175 const std::vector<int>& new_routing_ids);
180 void OnCrossOriginMessageToWorker( 176 void OnCrossOriginMessageToWorker(
181 const NavigatorConnectClient& client, 177 const NavigatorConnectClient& client,
182 const base::string16& message, 178 const base::string16& message,
183 const std::vector<TransferredMessagePort>& sent_message_ports, 179 const std::vector<TransferredMessagePort>& sent_message_ports,
184 const std::vector<int>& new_routing_ids); 180 const std::vector<int>& new_routing_ids);
185 void OnSendStashedMessagePorts( 181 void OnSendStashedMessagePorts(
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
233 std::map<int, base::TimeTicks> install_start_timings_; 229 std::map<int, base::TimeTicks> install_start_timings_;
234 std::map<int, base::TimeTicks> notification_click_start_timings_; 230 std::map<int, base::TimeTicks> notification_click_start_timings_;
235 std::map<int, base::TimeTicks> push_start_timings_; 231 std::map<int, base::TimeTicks> push_start_timings_;
236 232
237 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerContextClient); 233 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerContextClient);
238 }; 234 };
239 235
240 } // namespace content 236 } // namespace content
241 237
242 #endif // CONTENT_RENDERER_SERVICE_WORKER_SERVICE_WORKER_CONTEXT_CLIENT_H_ 238 #endif // CONTENT_RENDERER_SERVICE_WORKER_SERVICE_WORKER_CONTEXT_CLIENT_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698