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 131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
142 void EmbeddedWorkerContextClient::didPauseAfterDownload() { | 142 void EmbeddedWorkerContextClient::didPauseAfterDownload() { |
143 Send(new EmbeddedWorkerHostMsg_DidPauseAfterDownload(embedded_worker_id_)); | 143 Send(new EmbeddedWorkerHostMsg_DidPauseAfterDownload(embedded_worker_id_)); |
144 } | 144 } |
145 | 145 |
146 void EmbeddedWorkerContextClient::getClients( | 146 void EmbeddedWorkerContextClient::getClients( |
147 blink::WebServiceWorkerClientsCallbacks* callbacks) { | 147 blink::WebServiceWorkerClientsCallbacks* callbacks) { |
148 DCHECK(script_context_); | 148 DCHECK(script_context_); |
149 script_context_->GetClientDocuments(callbacks); | 149 script_context_->GetClientDocuments(callbacks); |
150 } | 150 } |
151 | 151 |
| 152 void EmbeddedWorkerContextClient::openWindow( |
| 153 const blink::WebURL& url, |
| 154 blink::WebServiceWorkerClientCallbacks* callbacks) { |
| 155 DCHECK(script_context_); |
| 156 script_context_->OpenWindow(url, script_url_, callbacks); |
| 157 } |
| 158 |
152 void EmbeddedWorkerContextClient::workerReadyForInspection() { | 159 void EmbeddedWorkerContextClient::workerReadyForInspection() { |
153 Send(new EmbeddedWorkerHostMsg_WorkerReadyForInspection(embedded_worker_id_)); | 160 Send(new EmbeddedWorkerHostMsg_WorkerReadyForInspection(embedded_worker_id_)); |
154 } | 161 } |
155 | 162 |
156 void EmbeddedWorkerContextClient::workerContextFailedToStart() { | 163 void EmbeddedWorkerContextClient::workerContextFailedToStart() { |
157 DCHECK(main_thread_proxy_->RunsTasksOnCurrentThread()); | 164 DCHECK(main_thread_proxy_->RunsTasksOnCurrentThread()); |
158 DCHECK(!script_context_); | 165 DCHECK(!script_context_); |
159 | 166 |
160 Send(new EmbeddedWorkerHostMsg_WorkerScriptLoadFailed(embedded_worker_id_)); | 167 Send(new EmbeddedWorkerHostMsg_WorkerScriptLoadFailed(embedded_worker_id_)); |
161 | 168 |
(...skipping 247 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
409 | 416 |
410 void EmbeddedWorkerContextClient::SendWorkerStarted() { | 417 void EmbeddedWorkerContextClient::SendWorkerStarted() { |
411 DCHECK(worker_task_runner_->RunsTasksOnCurrentThread()); | 418 DCHECK(worker_task_runner_->RunsTasksOnCurrentThread()); |
412 TRACE_EVENT_ASYNC_END0("ServiceWorker", | 419 TRACE_EVENT_ASYNC_END0("ServiceWorker", |
413 "EmbeddedWorkerContextClient::StartingWorkerContext", | 420 "EmbeddedWorkerContextClient::StartingWorkerContext", |
414 this); | 421 this); |
415 Send(new EmbeddedWorkerHostMsg_WorkerStarted(embedded_worker_id_)); | 422 Send(new EmbeddedWorkerHostMsg_WorkerStarted(embedded_worker_id_)); |
416 } | 423 } |
417 | 424 |
418 } // namespace content | 425 } // namespace content |
OLD | NEW |