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

Side by Side Diff: chrome/browser/payments/payment_request_factory.cc

Issue 2775193004: [Payments] Have an observer for canMakePayment, for testing. (Closed)
Patch Set: addressed comments Created 3 years, 9 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
« no previous file with comments | « no previous file | chrome/browser/ui/views/payments/payment_request_browsertest_base.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 "chrome/browser/payments/payment_request_factory.h" 5 #include "chrome/browser/payments/payment_request_factory.h"
6 6
7 #include <memory> 7 #include <memory>
8 8
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/memory/ptr_util.h" 10 #include "base/memory/ptr_util.h"
11 #include "chrome/browser/payments/chrome_payment_request_delegate.h" 11 #include "chrome/browser/payments/chrome_payment_request_delegate.h"
12 #include "components/payments/content/payment_request_delegate.h" 12 #include "components/payments/content/payment_request_delegate.h"
13 #include "components/payments/content/payment_request_web_contents_manager.h" 13 #include "components/payments/content/payment_request_web_contents_manager.h"
14 #include "content/public/browser/web_contents.h" 14 #include "content/public/browser/web_contents.h"
15 15
16 namespace payments { 16 namespace payments {
17 17
18 void CreatePaymentRequestForWebContents( 18 void CreatePaymentRequestForWebContents(
19 content::WebContents* web_contents, 19 content::WebContents* web_contents,
20 mojo::InterfaceRequest<payments::mojom::PaymentRequest> request) { 20 mojo::InterfaceRequest<payments::mojom::PaymentRequest> request) {
21 DCHECK(web_contents); 21 DCHECK(web_contents);
22 PaymentRequestWebContentsManager::GetOrCreateForWebContents(web_contents) 22 PaymentRequestWebContentsManager::GetOrCreateForWebContents(web_contents)
23 ->CreatePaymentRequest(web_contents, 23 ->CreatePaymentRequest(
24 base::MakeUnique<ChromePaymentRequestDelegate>( 24 web_contents,
25 web_contents), 25 base::MakeUnique<ChromePaymentRequestDelegate>(web_contents),
26 std::move(request)); 26 std::move(request),
27 /*observer_for_testing=*/nullptr);
27 } 28 }
28 29
29 } // namespace payments 30 } // namespace payments
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/ui/views/payments/payment_request_browsertest_base.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698