OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 #include "content/renderer/service_worker/embedded_worker_context_client.h" | 5 #include "content/renderer/service_worker/embedded_worker_context_client.h" |
6 | 6 |
7 #include <map> | 7 #include <map> |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/lazy_instance.h" | 10 #include "base/lazy_instance.h" |
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
143 blink::WebServiceWorkerCacheStorage* | 143 blink::WebServiceWorkerCacheStorage* |
144 EmbeddedWorkerContextClient::cacheStorage() { | 144 EmbeddedWorkerContextClient::cacheStorage() { |
145 return script_context_->cache_storage(); | 145 return script_context_->cache_storage(); |
146 } | 146 } |
147 | 147 |
148 void EmbeddedWorkerContextClient::didPauseAfterDownload() { | 148 void EmbeddedWorkerContextClient::didPauseAfterDownload() { |
149 Send(new EmbeddedWorkerHostMsg_DidPauseAfterDownload(embedded_worker_id_)); | 149 Send(new EmbeddedWorkerHostMsg_DidPauseAfterDownload(embedded_worker_id_)); |
150 } | 150 } |
151 | 151 |
152 void EmbeddedWorkerContextClient::getClients( | 152 void EmbeddedWorkerContextClient::getClients( |
| 153 const blink::WebServiceWorkerClientQueryOptions& options, |
153 blink::WebServiceWorkerClientsCallbacks* callbacks) { | 154 blink::WebServiceWorkerClientsCallbacks* callbacks) { |
154 DCHECK(script_context_); | 155 DCHECK(script_context_); |
155 script_context_->GetClientDocuments(callbacks); | 156 script_context_->GetClients(options, callbacks); |
156 } | 157 } |
157 | 158 |
158 void EmbeddedWorkerContextClient::openWindow( | 159 void EmbeddedWorkerContextClient::openWindow( |
159 const blink::WebURL& url, | 160 const blink::WebURL& url, |
160 blink::WebServiceWorkerClientCallbacks* callbacks) { | 161 blink::WebServiceWorkerClientCallbacks* callbacks) { |
161 DCHECK(script_context_); | 162 DCHECK(script_context_); |
162 script_context_->OpenWindow(url, callbacks); | 163 script_context_->OpenWindow(url, callbacks); |
163 } | 164 } |
164 | 165 |
165 void EmbeddedWorkerContextClient::setCachedMetadata(const blink::WebURL& url, | 166 void EmbeddedWorkerContextClient::setCachedMetadata(const blink::WebURL& url, |
(...skipping 301 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
467 registration->SetWaiting( | 468 registration->SetWaiting( |
468 dispatcher->GetServiceWorker(attrs.waiting, false)); | 469 dispatcher->GetServiceWorker(attrs.waiting, false)); |
469 registration->SetActive( | 470 registration->SetActive( |
470 dispatcher->GetServiceWorker(attrs.active, false)); | 471 dispatcher->GetServiceWorker(attrs.active, false)); |
471 | 472 |
472 script_context_->SetRegistrationInServiceWorkerGlobalScope( | 473 script_context_->SetRegistrationInServiceWorkerGlobalScope( |
473 registration.Pass()); | 474 registration.Pass()); |
474 } | 475 } |
475 | 476 |
476 } // namespace content | 477 } // namespace content |
OLD | NEW |