| 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 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 116 } | 116 } |
| 117 | 117 |
| 118 void EmbeddedWorkerContextClient::Send(IPC::Message* message) { | 118 void EmbeddedWorkerContextClient::Send(IPC::Message* message) { |
| 119 sender_->Send(message); | 119 sender_->Send(message); |
| 120 } | 120 } |
| 121 | 121 |
| 122 blink::WebURL EmbeddedWorkerContextClient::scope() const { | 122 blink::WebURL EmbeddedWorkerContextClient::scope() const { |
| 123 return service_worker_scope_; | 123 return service_worker_scope_; |
| 124 } | 124 } |
| 125 | 125 |
| 126 blink::WebServiceWorkerCacheStorage* |
| 127 EmbeddedWorkerContextClient::cacheStorage() { |
| 128 return script_context_->cache_storage(); |
| 129 } |
| 130 |
| 126 void EmbeddedWorkerContextClient::didPauseAfterDownload() { | 131 void EmbeddedWorkerContextClient::didPauseAfterDownload() { |
| 127 Send(new EmbeddedWorkerHostMsg_DidPauseAfterDownload(embedded_worker_id_)); | 132 Send(new EmbeddedWorkerHostMsg_DidPauseAfterDownload(embedded_worker_id_)); |
| 128 } | 133 } |
| 129 | 134 |
| 130 void EmbeddedWorkerContextClient::getClients( | 135 void EmbeddedWorkerContextClient::getClients( |
| 131 blink::WebServiceWorkerClientsCallbacks* callbacks) { | 136 blink::WebServiceWorkerClientsCallbacks* callbacks) { |
| 132 DCHECK(script_context_); | 137 DCHECK(script_context_); |
| 133 script_context_->GetClientDocuments(callbacks); | 138 script_context_->GetClientDocuments(callbacks); |
| 134 } | 139 } |
| 135 | 140 |
| (...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 318 } | 323 } |
| 319 | 324 |
| 320 void EmbeddedWorkerContextClient::SendWorkerStarted() { | 325 void EmbeddedWorkerContextClient::SendWorkerStarted() { |
| 321 DCHECK(worker_task_runner_->RunsTasksOnCurrentThread()); | 326 DCHECK(worker_task_runner_->RunsTasksOnCurrentThread()); |
| 322 Send(new EmbeddedWorkerHostMsg_WorkerStarted( | 327 Send(new EmbeddedWorkerHostMsg_WorkerStarted( |
| 323 WorkerTaskRunner::Instance()->CurrentWorkerId(), | 328 WorkerTaskRunner::Instance()->CurrentWorkerId(), |
| 324 embedded_worker_id_)); | 329 embedded_worker_id_)); |
| 325 } | 330 } |
| 326 | 331 |
| 327 } // namespace content | 332 } // namespace content |
| OLD | NEW |