OLD | NEW |
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 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
118 virtual void didHandleFetchEvent( | 118 virtual void didHandleFetchEvent( |
119 int request_id, | 119 int request_id, |
120 const blink::WebServiceWorkerResponse& response); | 120 const blink::WebServiceWorkerResponse& response); |
121 virtual void didHandleNotificationClickEvent( | 121 virtual void didHandleNotificationClickEvent( |
122 int request_id, | 122 int request_id, |
123 blink::WebServiceWorkerEventResult result); | 123 blink::WebServiceWorkerEventResult result); |
124 virtual void didHandlePushEvent(int request_id, | 124 virtual void didHandlePushEvent(int request_id, |
125 blink::WebServiceWorkerEventResult result); | 125 blink::WebServiceWorkerEventResult result); |
126 virtual void didHandleSyncEvent(int request_id, | 126 virtual void didHandleSyncEvent(int request_id, |
127 blink::WebServiceWorkerEventResult result); | 127 blink::WebServiceWorkerEventResult result); |
128 virtual void didHandleCrossOriginConnectEvent(int request_id, | |
129 bool accept_connection); | |
130 | 128 |
131 // Called on the main thread. | 129 // Called on the main thread. |
132 virtual blink::WebServiceWorkerNetworkProvider* | 130 virtual blink::WebServiceWorkerNetworkProvider* |
133 createServiceWorkerNetworkProvider(blink::WebDataSource* data_source); | 131 createServiceWorkerNetworkProvider(blink::WebDataSource* data_source); |
134 virtual blink::WebServiceWorkerProvider* createServiceWorkerProvider(); | 132 virtual blink::WebServiceWorkerProvider* createServiceWorkerProvider(); |
135 | 133 |
136 virtual void postMessageToClient( | 134 virtual void postMessageToClient( |
137 const blink::WebString& uuid, | 135 const blink::WebString& uuid, |
138 const blink::WebString& message, | 136 const blink::WebString& message, |
139 blink::WebMessagePortChannelArray* channels); | 137 blink::WebMessagePortChannelArray* channels); |
(...skipping 26 matching lines...) Expand all Loading... |
166 void OnSyncEvent(int request_id); | 164 void OnSyncEvent(int request_id); |
167 void OnNotificationClickEvent( | 165 void OnNotificationClickEvent( |
168 int request_id, | 166 int request_id, |
169 int64_t persistent_notification_id, | 167 int64_t persistent_notification_id, |
170 const PlatformNotificationData& notification_data); | 168 const PlatformNotificationData& notification_data); |
171 void OnPushEvent(int request_id, const std::string& data); | 169 void OnPushEvent(int request_id, const std::string& data); |
172 void OnGeofencingEvent(int request_id, | 170 void OnGeofencingEvent(int request_id, |
173 blink::WebGeofencingEventType event_type, | 171 blink::WebGeofencingEventType event_type, |
174 const std::string& region_id, | 172 const std::string& region_id, |
175 const blink::WebCircularGeofencingRegion& region); | 173 const blink::WebCircularGeofencingRegion& region); |
176 void OnCrossOriginConnectEvent(int request_id, | |
177 const NavigatorConnectClient& client); | |
178 void OnPostMessage( | 174 void OnPostMessage( |
179 const base::string16& message, | 175 const base::string16& message, |
180 const std::vector<TransferredMessagePort>& sent_message_ports, | 176 const std::vector<TransferredMessagePort>& sent_message_ports, |
181 const std::vector<int>& new_routing_ids); | 177 const std::vector<int>& new_routing_ids); |
182 void OnCrossOriginMessageToWorker( | 178 void OnCrossOriginMessageToWorker( |
183 const NavigatorConnectClient& client, | 179 const NavigatorConnectClient& client, |
184 const base::string16& message, | 180 const base::string16& message, |
185 const std::vector<TransferredMessagePort>& sent_message_ports, | 181 const std::vector<TransferredMessagePort>& sent_message_ports, |
186 const std::vector<int>& new_routing_ids); | 182 const std::vector<int>& new_routing_ids); |
187 void OnSendStashedMessagePorts( | 183 void OnSendStashedMessagePorts( |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
226 // Initialized on the worker thread in workerContextStarted and | 222 // Initialized on the worker thread in workerContextStarted and |
227 // destructed on the worker thread in willDestroyWorkerContext. | 223 // destructed on the worker thread in willDestroyWorkerContext. |
228 scoped_ptr<WorkerContextData> context_; | 224 scoped_ptr<WorkerContextData> context_; |
229 | 225 |
230 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerContextClient); | 226 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerContextClient); |
231 }; | 227 }; |
232 | 228 |
233 } // namespace content | 229 } // namespace content |
234 | 230 |
235 #endif // CONTENT_RENDERER_SERVICE_WORKER_SERVICE_WORKER_CONTEXT_CLIENT_H_ | 231 #endif // CONTENT_RENDERER_SERVICE_WORKER_SERVICE_WORKER_CONTEXT_CLIENT_H_ |
OLD | NEW |