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 369 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
380 void EmbeddedWorkerContextClient::postMessageToCrossOriginClient( | 380 void EmbeddedWorkerContextClient::postMessageToCrossOriginClient( |
381 const blink::WebCrossOriginServiceWorkerClient& client, | 381 const blink::WebCrossOriginServiceWorkerClient& client, |
382 const blink::WebString& message, | 382 const blink::WebString& message, |
383 blink::WebMessagePortChannelArray* channels) { | 383 blink::WebMessagePortChannelArray* channels) { |
384 DCHECK(script_context_); | 384 DCHECK(script_context_); |
385 script_context_->PostCrossOriginMessageToClient(client, message, | 385 script_context_->PostCrossOriginMessageToClient(client, message, |
386 make_scoped_ptr(channels)); | 386 make_scoped_ptr(channels)); |
387 } | 387 } |
388 | 388 |
389 void EmbeddedWorkerContextClient::focus( | 389 void EmbeddedWorkerContextClient::focus( |
390 int client_id, blink::WebServiceWorkerClientFocusCallback* callback) { | 390 int client_id, blink::WebServiceWorkerClientCallbacks* callback) { |
391 DCHECK(script_context_); | 391 DCHECK(script_context_); |
392 script_context_->FocusClient(client_id, callback); | 392 script_context_->FocusClient(client_id, callback); |
393 } | 393 } |
394 | 394 |
395 void EmbeddedWorkerContextClient::skipWaiting( | 395 void EmbeddedWorkerContextClient::skipWaiting( |
396 blink::WebServiceWorkerSkipWaitingCallbacks* callbacks) { | 396 blink::WebServiceWorkerSkipWaitingCallbacks* callbacks) { |
397 DCHECK(script_context_); | 397 DCHECK(script_context_); |
398 script_context_->SkipWaiting(callbacks); | 398 script_context_->SkipWaiting(callbacks); |
399 } | 399 } |
400 | 400 |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
447 registration->SetWaiting( | 447 registration->SetWaiting( |
448 dispatcher->GetServiceWorker(attrs.waiting, false)); | 448 dispatcher->GetServiceWorker(attrs.waiting, false)); |
449 registration->SetActive( | 449 registration->SetActive( |
450 dispatcher->GetServiceWorker(attrs.active, false)); | 450 dispatcher->GetServiceWorker(attrs.active, false)); |
451 | 451 |
452 script_context_->SetRegistrationInServiceWorkerGlobalScope( | 452 script_context_->SetRegistrationInServiceWorkerGlobalScope( |
453 registration.Pass()); | 453 registration.Pass()); |
454 } | 454 } |
455 | 455 |
456 } // namespace content | 456 } // namespace content |
OLD | NEW |