| OLD | NEW |
| 1 // Copyright 2017 The Chromium Authors. All rights reserved. | 1 // Copyright 2017 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/chrome_payment_request_delegate.h" | 5 #include "chrome/browser/payments/chrome_payment_request_delegate.h" |
| 6 | 6 |
| 7 #include "chrome/browser/autofill/personal_data_manager_factory.h" |
| 8 #include "chrome/browser/profiles/profile.h" |
| 7 #include "chrome/browser/ui/browser_dialogs.h" | 9 #include "chrome/browser/ui/browser_dialogs.h" |
| 10 #include "content/public/browser/web_contents.h" |
| 8 | 11 |
| 9 namespace payments { | 12 namespace payments { |
| 10 | 13 |
| 14 ChromePaymentRequestDelegate::ChromePaymentRequestDelegate( |
| 15 content::WebContents* web_contents) |
| 16 : web_contents_(web_contents) {} |
| 17 |
| 11 void ChromePaymentRequestDelegate::ShowPaymentRequestDialog( | 18 void ChromePaymentRequestDelegate::ShowPaymentRequestDialog( |
| 12 PaymentRequest* request) { | 19 PaymentRequest* request) { |
| 13 chrome::ShowPaymentRequestDialog(request); | 20 chrome::ShowPaymentRequestDialog(request); |
| 14 } | 21 } |
| 15 | 22 |
| 23 autofill::PersonalDataManager* |
| 24 ChromePaymentRequestDelegate::GetPersonalDataManager() { |
| 25 return autofill::PersonalDataManagerFactory::GetForProfile( |
| 26 Profile::FromBrowserContext(web_contents_->GetBrowserContext())); |
| 27 } |
| 28 |
| 16 } // namespace payments | 29 } // namespace payments |
| OLD | NEW |