| OLD | NEW |
| 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/payment_request_delegate.h" | 12 #include "components/payments/content/payment_request_delegate.h" |
| 13 #include "components/payments/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(web_contents, |
| 24 base::MakeUnique<ChromePaymentRequestDelegate>( | 24 base::MakeUnique<ChromePaymentRequestDelegate>( |
| 25 web_contents), | 25 web_contents), |
| 26 std::move(request)); | 26 std::move(request)); |
| 27 } | 27 } |
| 28 | 28 |
| 29 } // namespace payments | 29 } // namespace payments |
| OLD | NEW |