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

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

Issue 2779283002: [Web Payments] Implement the CVC Unmask dialog. (Closed)
Patch Set: BUILD Created 3 years, 8 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"
8 #include "chrome/browser/autofill/personal_data_manager_factory.h" 7 #include "chrome/browser/autofill/personal_data_manager_factory.h"
9 #include "chrome/browser/browser_process.h" 8 #include "chrome/browser/browser_process.h"
10 #include "chrome/browser/profiles/profile.h" 9 #include "chrome/browser/profiles/profile.h"
11 #include "chrome/browser/ui/browser_dialogs.h" 10 #include "chrome/browser/ui/browser_dialogs.h"
12 #include "components/payments/content/payment_request_dialog.h" 11 #include "components/payments/content/payment_request_dialog.h"
13 #include "content/public/browser/web_contents.h" 12 #include "content/public/browser/web_contents.h"
14 13
15 namespace payments { 14 namespace payments {
16 15
17 ChromePaymentRequestDelegate::ChromePaymentRequestDelegate( 16 ChromePaymentRequestDelegate::ChromePaymentRequestDelegate(
(...skipping 27 matching lines...) Expand all
45 const std::string& ChromePaymentRequestDelegate::GetApplicationLocale() const { 44 const std::string& ChromePaymentRequestDelegate::GetApplicationLocale() const {
46 return g_browser_process->GetApplicationLocale(); 45 return g_browser_process->GetApplicationLocale();
47 } 46 }
48 47
49 bool ChromePaymentRequestDelegate::IsIncognito() const { 48 bool ChromePaymentRequestDelegate::IsIncognito() const {
50 Profile* profile = 49 Profile* profile =
51 Profile::FromBrowserContext(web_contents_->GetBrowserContext()); 50 Profile::FromBrowserContext(web_contents_->GetBrowserContext());
52 return profile && profile->GetProfileType() == Profile::INCOGNITO_PROFILE; 51 return profile && profile->GetProfileType() == Profile::INCOGNITO_PROFILE;
53 } 52 }
54 53
54 void ChromePaymentRequestDelegate::DoFullCardRequest(
55 const autofill::CreditCard& credit_card,
56 base::WeakPtr<autofill::payments::FullCardRequest::ResultDelegate>
57 result_delegate) {
58 dialog_->ShowCvcUnmaskPrompt(credit_card, result_delegate, web_contents_);
59 }
60
55 } // namespace payments 61 } // namespace payments
OLDNEW
« no previous file with comments | « chrome/browser/payments/chrome_payment_request_delegate.h ('k') | chrome/browser/payments/payment_request_factory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698