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

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

Issue 1656933003: Add origins argument to registerForeignFetchScopes. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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/service_worker_context_client.h" 5 #include "content/renderer/service_worker/service_worker_context_client.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/lazy_instance.h" 9 #include "base/lazy_instance.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 637 matching lines...) Expand 10 before | Expand all | Expand 10 after
648 } 648 }
649 649
650 void ServiceWorkerContextClient::claim( 650 void ServiceWorkerContextClient::claim(
651 blink::WebServiceWorkerClientsClaimCallbacks* callbacks) { 651 blink::WebServiceWorkerClientsClaimCallbacks* callbacks) {
652 DCHECK(callbacks); 652 DCHECK(callbacks);
653 int request_id = context_->claim_clients_callbacks.Add(callbacks); 653 int request_id = context_->claim_clients_callbacks.Add(callbacks);
654 Send(new ServiceWorkerHostMsg_ClaimClients(GetRoutingID(), request_id)); 654 Send(new ServiceWorkerHostMsg_ClaimClients(GetRoutingID(), request_id));
655 } 655 }
656 656
657 void ServiceWorkerContextClient::registerForeignFetchScopes( 657 void ServiceWorkerContextClient::registerForeignFetchScopes(
658 const blink::WebVector<blink::WebURL>& sub_scopes) { 658 const blink::WebVector<blink::WebURL>& sub_scopes,
659 const blink::WebVector<blink::WebURL>& origins) {
659 Send(new ServiceWorkerHostMsg_RegisterForeignFetchScopes( 660 Send(new ServiceWorkerHostMsg_RegisterForeignFetchScopes(
660 GetRoutingID(), std::vector<GURL>(sub_scopes.begin(), sub_scopes.end()))); 661 GetRoutingID(), std::vector<GURL>(sub_scopes.begin(), sub_scopes.end()),
662 std::vector<GURL>(origins.begin(), origins.end())));
661 } 663 }
662 664
663 void ServiceWorkerContextClient::DispatchSyncEvent( 665 void ServiceWorkerContextClient::DispatchSyncEvent(
664 const blink::WebSyncRegistration& registration, 666 const blink::WebSyncRegistration& registration,
665 blink::WebServiceWorkerContextProxy::LastChanceOption last_chance, 667 blink::WebServiceWorkerContextProxy::LastChanceOption last_chance,
666 const SyncCallback& callback) { 668 const SyncCallback& callback) {
667 TRACE_EVENT0("ServiceWorker", 669 TRACE_EVENT0("ServiceWorker",
668 "ServiceWorkerContextClient::DispatchSyncEvent"); 670 "ServiceWorkerContextClient::DispatchSyncEvent");
669 int request_id = 671 int request_id =
670 context_->sync_event_callbacks.Add(new SyncCallback(callback)); 672 context_->sync_event_callbacks.Add(new SyncCallback(callback));
(...skipping 324 matching lines...) Expand 10 before | Expand all | Expand 10 after
995 } 997 }
996 998
997 base::WeakPtr<ServiceWorkerContextClient> 999 base::WeakPtr<ServiceWorkerContextClient>
998 ServiceWorkerContextClient::GetWeakPtr() { 1000 ServiceWorkerContextClient::GetWeakPtr() {
999 DCHECK(worker_task_runner_->RunsTasksOnCurrentThread()); 1001 DCHECK(worker_task_runner_->RunsTasksOnCurrentThread());
1000 DCHECK(context_); 1002 DCHECK(context_);
1001 return context_->weak_factory.GetWeakPtr(); 1003 return context_->weak_factory.GetWeakPtr();
1002 } 1004 }
1003 1005
1004 } // namespace content 1006 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698