| 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/debug/trace_event.h" | 10 #include "base/debug/trace_event.h" |
| (...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 146 void EmbeddedWorkerContextClient::didPauseAfterDownload() { | 146 void EmbeddedWorkerContextClient::didPauseAfterDownload() { |
| 147 Send(new EmbeddedWorkerHostMsg_DidPauseAfterDownload(embedded_worker_id_)); | 147 Send(new EmbeddedWorkerHostMsg_DidPauseAfterDownload(embedded_worker_id_)); |
| 148 } | 148 } |
| 149 | 149 |
| 150 void EmbeddedWorkerContextClient::getClients( | 150 void EmbeddedWorkerContextClient::getClients( |
| 151 blink::WebServiceWorkerClientsCallbacks* callbacks) { | 151 blink::WebServiceWorkerClientsCallbacks* callbacks) { |
| 152 DCHECK(script_context_); | 152 DCHECK(script_context_); |
| 153 script_context_->GetClientDocuments(callbacks); | 153 script_context_->GetClientDocuments(callbacks); |
| 154 } | 154 } |
| 155 | 155 |
| 156 void EmbeddedWorkerContextClient::openWindow( |
| 157 const blink::WebURL& url, |
| 158 blink::WebServiceWorkerClientCallbacks* callbacks) { |
| 159 DCHECK(script_context_); |
| 160 script_context_->OpenWindow(url, callbacks); |
| 161 } |
| 162 |
| 156 void EmbeddedWorkerContextClient::workerReadyForInspection() { | 163 void EmbeddedWorkerContextClient::workerReadyForInspection() { |
| 157 Send(new EmbeddedWorkerHostMsg_WorkerReadyForInspection(embedded_worker_id_)); | 164 Send(new EmbeddedWorkerHostMsg_WorkerReadyForInspection(embedded_worker_id_)); |
| 158 } | 165 } |
| 159 | 166 |
| 160 void EmbeddedWorkerContextClient::workerContextFailedToStart() { | 167 void EmbeddedWorkerContextClient::workerContextFailedToStart() { |
| 161 DCHECK(main_thread_proxy_->RunsTasksOnCurrentThread()); | 168 DCHECK(main_thread_proxy_->RunsTasksOnCurrentThread()); |
| 162 DCHECK(!script_context_); | 169 DCHECK(!script_context_); |
| 163 | 170 |
| 164 Send(new EmbeddedWorkerHostMsg_WorkerScriptLoadFailed(embedded_worker_id_)); | 171 Send(new EmbeddedWorkerHostMsg_WorkerScriptLoadFailed(embedded_worker_id_)); |
| 165 | 172 |
| (...skipping 271 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 437 registration->SetWaiting( | 444 registration->SetWaiting( |
| 438 dispatcher->GetServiceWorker(attrs.waiting, false)); | 445 dispatcher->GetServiceWorker(attrs.waiting, false)); |
| 439 registration->SetActive( | 446 registration->SetActive( |
| 440 dispatcher->GetServiceWorker(attrs.active, false)); | 447 dispatcher->GetServiceWorker(attrs.active, false)); |
| 441 | 448 |
| 442 script_context_->SetRegistrationInServiceWorkerGlobalScope( | 449 script_context_->SetRegistrationInServiceWorkerGlobalScope( |
| 443 registration.Pass()); | 450 registration.Pass()); |
| 444 } | 451 } |
| 445 | 452 |
| 446 } // namespace content | 453 } // namespace content |
| OLD | NEW |