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

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

Issue 2931953002: [Payments] Rename openWindowForClients and openWindowForPaymentHandler (Closed)
Patch Set: address nit Created 3 years, 6 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 <map> 7 #include <map>
8 #include <memory> 8 #include <memory>
9 #include <utility> 9 #include <utility>
10 10
(...skipping 613 matching lines...) Expand 10 before | Expand all | Expand 10 after
624 std::unique_ptr<blink::WebServiceWorkerClientsCallbacks> callbacks) { 624 std::unique_ptr<blink::WebServiceWorkerClientsCallbacks> callbacks) {
625 DCHECK(callbacks); 625 DCHECK(callbacks);
626 int request_id = context_->clients_callbacks.Add(std::move(callbacks)); 626 int request_id = context_->clients_callbacks.Add(std::move(callbacks));
627 ServiceWorkerClientQueryOptions options; 627 ServiceWorkerClientQueryOptions options;
628 options.client_type = weboptions.client_type; 628 options.client_type = weboptions.client_type;
629 options.include_uncontrolled = weboptions.include_uncontrolled; 629 options.include_uncontrolled = weboptions.include_uncontrolled;
630 Send(new ServiceWorkerHostMsg_GetClients( 630 Send(new ServiceWorkerHostMsg_GetClients(
631 GetRoutingID(), request_id, options)); 631 GetRoutingID(), request_id, options));
632 } 632 }
633 633
634 void ServiceWorkerContextClient::OpenWindowForClients( 634 void ServiceWorkerContextClient::OpenNewTab(
635 const blink::WebURL& url, 635 const blink::WebURL& url,
636 std::unique_ptr<blink::WebServiceWorkerClientCallbacks> callbacks) { 636 std::unique_ptr<blink::WebServiceWorkerClientCallbacks> callbacks) {
637 DCHECK(callbacks); 637 DCHECK(callbacks);
638 int request_id = context_->client_callbacks.Add(std::move(callbacks)); 638 int request_id = context_->client_callbacks.Add(std::move(callbacks));
639 Send(new ServiceWorkerHostMsg_OpenNewTab(GetRoutingID(), request_id, url)); 639 Send(new ServiceWorkerHostMsg_OpenNewTab(GetRoutingID(), request_id, url));
640 } 640 }
641 641
642 void ServiceWorkerContextClient::OpenWindowForPaymentHandler( 642 void ServiceWorkerContextClient::OpenNewPopup(
643 const blink::WebURL& url, 643 const blink::WebURL& url,
644 std::unique_ptr<blink::WebServiceWorkerClientCallbacks> callbacks) { 644 std::unique_ptr<blink::WebServiceWorkerClientCallbacks> callbacks) {
645 DCHECK(callbacks); 645 DCHECK(callbacks);
646 int request_id = context_->client_callbacks.Add(std::move(callbacks)); 646 int request_id = context_->client_callbacks.Add(std::move(callbacks));
647 Send(new ServiceWorkerHostMsg_OpenNewPopup(GetRoutingID(), request_id, url)); 647 Send(new ServiceWorkerHostMsg_OpenNewPopup(GetRoutingID(), request_id, url));
648 } 648 }
649 649
650 void ServiceWorkerContextClient::SetCachedMetadata(const blink::WebURL& url, 650 void ServiceWorkerContextClient::SetCachedMetadata(const blink::WebURL& url,
651 const char* data, 651 const char* data,
652 size_t size) { 652 size_t size) {
(...skipping 1043 matching lines...) Expand 10 before | Expand all | Expand 10 after
1696 } 1696 }
1697 1697
1698 base::WeakPtr<ServiceWorkerContextClient> 1698 base::WeakPtr<ServiceWorkerContextClient>
1699 ServiceWorkerContextClient::GetWeakPtr() { 1699 ServiceWorkerContextClient::GetWeakPtr() {
1700 DCHECK(worker_task_runner_->RunsTasksInCurrentSequence()); 1700 DCHECK(worker_task_runner_->RunsTasksInCurrentSequence());
1701 DCHECK(context_); 1701 DCHECK(context_);
1702 return context_->weak_factory.GetWeakPtr(); 1702 return context_->weak_factory.GetWeakPtr();
1703 } 1703 }
1704 1704
1705 } // namespace content 1705 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698