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 127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
138 virtual void postMessageToClient( | 138 virtual void postMessageToClient( |
139 const blink::WebString& uuid, | 139 const blink::WebString& uuid, |
140 const blink::WebString& message, | 140 const blink::WebString& message, |
141 blink::WebMessagePortChannelArray* channels); | 141 blink::WebMessagePortChannelArray* channels); |
142 virtual void postMessageToCrossOriginClient( | 142 virtual void postMessageToCrossOriginClient( |
143 const blink::WebCrossOriginServiceWorkerClient& client, | 143 const blink::WebCrossOriginServiceWorkerClient& client, |
144 const blink::WebString& message, | 144 const blink::WebString& message, |
145 blink::WebMessagePortChannelArray* channels); | 145 blink::WebMessagePortChannelArray* channels); |
146 virtual void focus(const blink::WebString& uuid, | 146 virtual void focus(const blink::WebString& uuid, |
147 blink::WebServiceWorkerClientCallbacks*); | 147 blink::WebServiceWorkerClientCallbacks*); |
| 148 virtual void navigate(const blink::WebString& uuid, |
| 149 const blink::WebURL&, |
| 150 blink::WebServiceWorkerClientCallbacks*); |
148 virtual void skipWaiting( | 151 virtual void skipWaiting( |
149 blink::WebServiceWorkerSkipWaitingCallbacks* callbacks); | 152 blink::WebServiceWorkerSkipWaitingCallbacks* callbacks); |
150 virtual void claim(blink::WebServiceWorkerClientsClaimCallbacks* callbacks); | 153 virtual void claim(blink::WebServiceWorkerClientsClaimCallbacks* callbacks); |
151 | 154 |
152 virtual void DispatchSyncEvent(const blink::WebSyncRegistration& registration, | 155 virtual void DispatchSyncEvent(const blink::WebSyncRegistration& registration, |
153 const SyncCallback& callback); | 156 const SyncCallback& callback); |
154 | 157 |
155 private: | 158 private: |
156 struct WorkerContextData; | 159 struct WorkerContextData; |
157 | 160 |
(...skipping 26 matching lines...) Expand all Loading... |
184 const base::string16& message, | 187 const base::string16& message, |
185 const std::vector<TransferredMessagePort>& sent_message_ports, | 188 const std::vector<TransferredMessagePort>& sent_message_ports, |
186 const std::vector<int>& new_routing_ids); | 189 const std::vector<int>& new_routing_ids); |
187 void OnDidGetClients( | 190 void OnDidGetClients( |
188 int request_id, const std::vector<ServiceWorkerClientInfo>& clients); | 191 int request_id, const std::vector<ServiceWorkerClientInfo>& clients); |
189 void OnOpenWindowResponse(int request_id, | 192 void OnOpenWindowResponse(int request_id, |
190 const ServiceWorkerClientInfo& client); | 193 const ServiceWorkerClientInfo& client); |
191 void OnOpenWindowError(int request_id, const std::string& message); | 194 void OnOpenWindowError(int request_id, const std::string& message); |
192 void OnFocusClientResponse(int request_id, | 195 void OnFocusClientResponse(int request_id, |
193 const ServiceWorkerClientInfo& client); | 196 const ServiceWorkerClientInfo& client); |
| 197 void OnNavigateClientResponse(int request_id, |
| 198 const ServiceWorkerClientInfo& client); |
| 199 void OnNavigateClientError(int request_id, const GURL& url); |
194 void OnDidSkipWaiting(int request_id); | 200 void OnDidSkipWaiting(int request_id); |
195 void OnDidClaimClients(int request_id); | 201 void OnDidClaimClients(int request_id); |
196 void OnClaimClientsError(int request_id, | 202 void OnClaimClientsError(int request_id, |
197 blink::WebServiceWorkerError::ErrorType error_type, | 203 blink::WebServiceWorkerError::ErrorType error_type, |
198 const base::string16& message); | 204 const base::string16& message); |
199 void OnPing(); | 205 void OnPing(); |
200 | 206 |
201 base::WeakPtr<ServiceWorkerContextClient> GetWeakPtr(); | 207 base::WeakPtr<ServiceWorkerContextClient> GetWeakPtr(); |
202 | 208 |
203 const int embedded_worker_id_; | 209 const int embedded_worker_id_; |
(...skipping 18 matching lines...) Expand all Loading... |
222 // Initialized on the worker thread in workerContextStarted and | 228 // Initialized on the worker thread in workerContextStarted and |
223 // destructed on the worker thread in willDestroyWorkerContext. | 229 // destructed on the worker thread in willDestroyWorkerContext. |
224 scoped_ptr<WorkerContextData> context_; | 230 scoped_ptr<WorkerContextData> context_; |
225 | 231 |
226 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerContextClient); | 232 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerContextClient); |
227 }; | 233 }; |
228 | 234 |
229 } // namespace content | 235 } // namespace content |
230 | 236 |
231 #endif // CONTENT_RENDERER_SERVICE_WORKER_SERVICE_WORKER_CONTEXT_CLIENT_H_ | 237 #endif // CONTENT_RENDERER_SERVICE_WORKER_SERVICE_WORKER_CONTEXT_CLIENT_H_ |
OLD | NEW |