Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | |
|
please use gerrit instead
2017/01/06 21:49:09
2017
Mathieu
2017/01/07 05:03:07
Done.
| |
| 2 // Use of this source code is governed by a BSD-style license that can be | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #include "chrome/browser/payments/payment_request_factory.h" | |
| 6 | |
| 7 #include <memory> | |
| 8 | |
| 9 #include "chrome/browser/payments/chrome_payment_request_delegate.h" | |
| 10 #include "components/payments/payment_request_delegate.h" | |
| 11 #include "components/payments/payment_request_web_contents_manager.h" | |
| 12 #include "content/public/browser/web_contents.h" | |
| 13 | |
| 14 namespace payments { | |
| 15 | |
| 16 void CreatePaymentRequestForWebContents( | |
| 17 content::WebContents* web_contents, | |
| 18 mojo::InterfaceRequest<payments::mojom::PaymentRequest> request) { | |
| 19 DCHECK(web_contents); | |
|
please use gerrit instead
2017/01/06 21:49:09
#include "base/logging.h"
Mathieu
2017/01/07 05:03:07
Done.
| |
| 20 PaymentRequestWebContentsManager* web_contents_manager = | |
| 21 PaymentRequestWebContentsManager::GetOrCreateForWebContents(web_contents); | |
| 22 | |
| 23 std::unique_ptr<PaymentRequestDelegate> delegate( | |
| 24 new ChromePaymentRequestDelegate()); | |
| 25 web_contents_manager->CreatePaymentRequestImpl( | |
| 26 web_contents, std::move(delegate), std::move(request)); | |
|
please use gerrit instead
2017/01/06 21:49:09
Would a single statement be easier to understand?
Mathieu
2017/01/07 05:03:07
Done. good suggestion!
| |
| 27 } | |
| 28 | |
| 29 } // namespace payments | |
| OLD | NEW |