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 <stddef.h> | 8 #include <stddef.h> |
9 #include <stdint.h> | 9 #include <stdint.h> |
10 | 10 |
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
121 int level, | 121 int level, |
122 const blink::WebString& message, | 122 const blink::WebString& message, |
123 int line_number, | 123 int line_number, |
124 const blink::WebString& source_url) override; | 124 const blink::WebString& source_url) override; |
125 void sendDevToolsMessage(int session_id, | 125 void sendDevToolsMessage(int session_id, |
126 int call_id, | 126 int call_id, |
127 const blink::WebString& message, | 127 const blink::WebString& message, |
128 const blink::WebString& state) override; | 128 const blink::WebString& state) override; |
129 void didHandleActivateEvent(int request_id, | 129 void didHandleActivateEvent(int request_id, |
130 blink::WebServiceWorkerEventResult) override; | 130 blink::WebServiceWorkerEventResult) override; |
| 131 void didHandleExtendableMessageEvent( |
| 132 int request_id, |
| 133 blink::WebServiceWorkerEventResult result) override; |
131 void didHandleInstallEvent( | 134 void didHandleInstallEvent( |
132 int request_id, | 135 int request_id, |
133 blink::WebServiceWorkerEventResult result) override; | 136 blink::WebServiceWorkerEventResult result) override; |
134 void didHandleFetchEvent(int request_id) override; | 137 void didHandleFetchEvent(int request_id) override; |
135 void didHandleFetchEvent( | 138 void didHandleFetchEvent( |
136 int request_id, | 139 int request_id, |
137 const blink::WebServiceWorkerResponse& response) override; | 140 const blink::WebServiceWorkerResponse& response) override; |
138 void didHandleNotificationClickEvent( | 141 void didHandleNotificationClickEvent( |
139 int request_id, | 142 int request_id, |
140 blink::WebServiceWorkerEventResult result) override; | 143 blink::WebServiceWorkerEventResult result) override; |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
179 // in the browser process. | 182 // in the browser process. |
180 int GetRoutingID() const { return embedded_worker_id_; } | 183 int GetRoutingID() const { return embedded_worker_id_; } |
181 | 184 |
182 void Send(IPC::Message* message); | 185 void Send(IPC::Message* message); |
183 void SendWorkerStarted(); | 186 void SendWorkerStarted(); |
184 void SetRegistrationInServiceWorkerGlobalScope( | 187 void SetRegistrationInServiceWorkerGlobalScope( |
185 const ServiceWorkerRegistrationObjectInfo& info, | 188 const ServiceWorkerRegistrationObjectInfo& info, |
186 const ServiceWorkerVersionAttributes& attrs); | 189 const ServiceWorkerVersionAttributes& attrs); |
187 | 190 |
188 void OnActivateEvent(int request_id); | 191 void OnActivateEvent(int request_id); |
| 192 void OnExtendableMessageEvent( |
| 193 int request_id, |
| 194 const base::string16& message, |
| 195 const std::vector<TransferredMessagePort>& sent_message_ports, |
| 196 const std::vector<int>& new_routing_ids); |
189 void OnInstallEvent(int request_id); | 197 void OnInstallEvent(int request_id); |
190 void OnFetchEvent(int request_id, const ServiceWorkerFetchRequest& request); | 198 void OnFetchEvent(int request_id, const ServiceWorkerFetchRequest& request); |
191 void OnNotificationClickEvent( | 199 void OnNotificationClickEvent( |
192 int request_id, | 200 int request_id, |
193 int64_t persistent_notification_id, | 201 int64_t persistent_notification_id, |
194 const PlatformNotificationData& notification_data, | 202 const PlatformNotificationData& notification_data, |
195 int action_index); | 203 int action_index); |
196 void OnPushEvent(int request_id, const PushEventPayload& payload); | 204 void OnPushEvent(int request_id, const PushEventPayload& payload); |
197 void OnGeofencingEvent(int request_id, | 205 void OnGeofencingEvent(int request_id, |
198 blink::WebGeofencingEventType event_type, | 206 blink::WebGeofencingEventType event_type, |
199 const std::string& region_id, | 207 const std::string& region_id, |
200 const blink::WebCircularGeofencingRegion& region); | 208 const blink::WebCircularGeofencingRegion& region); |
| 209 |
| 210 // TODO(nhiroki): Remove this after ExtendableMessageEvent is enabled by |
| 211 // default (crbug.com/543198). |
201 void OnPostMessage( | 212 void OnPostMessage( |
202 const base::string16& message, | 213 const base::string16& message, |
203 const std::vector<TransferredMessagePort>& sent_message_ports, | 214 const std::vector<TransferredMessagePort>& sent_message_ports, |
204 const std::vector<int>& new_routing_ids); | 215 const std::vector<int>& new_routing_ids); |
| 216 |
205 void OnCrossOriginMessageToWorker( | 217 void OnCrossOriginMessageToWorker( |
206 const NavigatorConnectClient& client, | 218 const NavigatorConnectClient& client, |
207 const base::string16& message, | 219 const base::string16& message, |
208 const std::vector<TransferredMessagePort>& sent_message_ports, | 220 const std::vector<TransferredMessagePort>& sent_message_ports, |
209 const std::vector<int>& new_routing_ids); | 221 const std::vector<int>& new_routing_ids); |
210 void OnDidGetClients( | 222 void OnDidGetClients( |
211 int request_id, const std::vector<ServiceWorkerClientInfo>& clients); | 223 int request_id, const std::vector<ServiceWorkerClientInfo>& clients); |
212 void OnOpenWindowResponse(int request_id, | 224 void OnOpenWindowResponse(int request_id, |
213 const ServiceWorkerClientInfo& client); | 225 const ServiceWorkerClientInfo& client); |
214 void OnOpenWindowError(int request_id, const std::string& message); | 226 void OnOpenWindowError(int request_id, const std::string& message); |
(...skipping 28 matching lines...) Expand all Loading... |
243 // Initialized on the worker thread in workerContextStarted and | 255 // Initialized on the worker thread in workerContextStarted and |
244 // destructed on the worker thread in willDestroyWorkerContext. | 256 // destructed on the worker thread in willDestroyWorkerContext. |
245 scoped_ptr<WorkerContextData> context_; | 257 scoped_ptr<WorkerContextData> context_; |
246 | 258 |
247 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerContextClient); | 259 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerContextClient); |
248 }; | 260 }; |
249 | 261 |
250 } // namespace content | 262 } // namespace content |
251 | 263 |
252 #endif // CONTENT_RENDERER_SERVICE_WORKER_SERVICE_WORKER_CONTEXT_CLIENT_H_ | 264 #endif // CONTENT_RENDERER_SERVICE_WORKER_SERVICE_WORKER_CONTEXT_CLIENT_H_ |
OLD | NEW |