Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1227)

Side by Side Diff: content/renderer/service_worker/embedded_worker_context_client.cc

Issue 843583005: [ServiceWorker] Implement WebServiceWorkerContextClient::openWindow(). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@content_browser_client_openurl
Patch Set: rebase Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 135 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 269 matching lines...) Expand 10 before | Expand all | Expand 10 after
435 registration->SetWaiting( 442 registration->SetWaiting(
436 dispatcher->GetServiceWorker(attrs.waiting, false)); 443 dispatcher->GetServiceWorker(attrs.waiting, false));
437 registration->SetActive( 444 registration->SetActive(
438 dispatcher->GetServiceWorker(attrs.active, false)); 445 dispatcher->GetServiceWorker(attrs.active, false));
439 446
440 script_context_->SetRegistrationInServiceWorkerGlobalScope( 447 script_context_->SetRegistrationInServiceWorkerGlobalScope(
441 registration.Pass()); 448 registration.Pass());
442 } 449 }
443 450
444 } // namespace content 451 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698