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

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

Issue 2715213005: [Payments] Add the pay button, and control its enabled state (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
OLDNEW
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 "base/macros.h" 7 #include "base/macros.h"
8 #include "chrome/browser/autofill/personal_data_manager_factory.h" 8 #include "chrome/browser/autofill/personal_data_manager_factory.h"
9 #include "chrome/browser/browser_process.h"
9 #include "chrome/browser/profiles/profile.h" 10 #include "chrome/browser/profiles/profile.h"
10 #include "chrome/browser/ui/browser_dialogs.h" 11 #include "chrome/browser/ui/browser_dialogs.h"
11 #include "components/payments/content/payment_request_dialog.h" 12 #include "components/payments/content/payment_request_dialog.h"
12 #include "content/public/browser/web_contents.h" 13 #include "content/public/browser/web_contents.h"
13 14
14 namespace payments { 15 namespace payments {
15 16
16 ChromePaymentRequestDelegate::ChromePaymentRequestDelegate( 17 ChromePaymentRequestDelegate::ChromePaymentRequestDelegate(
17 content::WebContents* web_contents) 18 content::WebContents* web_contents)
18 : dialog_(nullptr), web_contents_(web_contents) {} 19 : dialog_(nullptr), web_contents_(web_contents) {}
(...skipping 10 matching lines...) Expand all
29 dialog_ = nullptr; 30 dialog_ = nullptr;
30 } 31 }
31 } 32 }
32 33
33 autofill::PersonalDataManager* 34 autofill::PersonalDataManager*
34 ChromePaymentRequestDelegate::GetPersonalDataManager() { 35 ChromePaymentRequestDelegate::GetPersonalDataManager() {
35 return autofill::PersonalDataManagerFactory::GetForProfile( 36 return autofill::PersonalDataManagerFactory::GetForProfile(
36 Profile::FromBrowserContext(web_contents_->GetBrowserContext())); 37 Profile::FromBrowserContext(web_contents_->GetBrowserContext()));
37 } 38 }
38 39
40 const std::string& ChromePaymentRequestDelegate::GetApplicationLocale() const {
41 return g_browser_process->GetApplicationLocale();
42 }
43
39 } // namespace payments 44 } // namespace payments
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698