OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 #import "ios/chrome/browser/ui/autofill/autofill_client_ios.h" | 5 #import "ios/chrome/browser/ui/autofill/autofill_client_ios.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/prefs/pref_service.h" | 8 #include "base/prefs/pref_service.h" |
9 #include "components/autofill/core/browser/autofill_cc_infobar_delegate.h" | 9 #include "components/autofill/core/browser/autofill_cc_infobar_delegate.h" |
10 #include "components/autofill/core/browser/ui/card_unmask_prompt_view.h" | 10 #include "components/autofill/core/browser/ui/card_unmask_prompt_view.h" |
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
70 unmask_controller_.ShowPrompt( | 70 unmask_controller_.ShowPrompt( |
71 provider->CreateCardUnmaskPromptView(&unmask_controller_), card, | 71 provider->CreateCardUnmaskPromptView(&unmask_controller_), card, |
72 delegate); | 72 delegate); |
73 } | 73 } |
74 | 74 |
75 void AutofillClientIOS::OnUnmaskVerificationResult(PaymentsRpcResult result) { | 75 void AutofillClientIOS::OnUnmaskVerificationResult(PaymentsRpcResult result) { |
76 unmask_controller_.OnVerificationResult(result); | 76 unmask_controller_.OnVerificationResult(result); |
77 } | 77 } |
78 | 78 |
79 void AutofillClientIOS::ConfirmSaveCreditCardLocally( | 79 void AutofillClientIOS::ConfirmSaveCreditCardLocally( |
80 const base::Closure& callback) { | 80 const base::Closure& callback, |
| 81 const CreditCard& card) { |
81 // This method is invoked synchronously from | 82 // This method is invoked synchronously from |
82 // AutofillManager::OnFormSubmitted(); at the time of detecting that a form | 83 // AutofillManager::OnFormSubmitted(); at the time of detecting that a form |
83 // was submitted, the WebContents is guaranteed to be live. Since the | 84 // was submitted, the WebContents is guaranteed to be live. Since the |
84 // InfoBarService is a WebContentsUserData, it must also be alive at this | 85 // InfoBarService is a WebContentsUserData, it must also be alive at this |
85 // time. | 86 // time. |
86 AutofillCCInfoBarDelegate::CreateForLocalSave(infobar_manager_, callback); | 87 AutofillCCInfoBarDelegate::CreateForLocalSave(infobar_manager_, callback, |
| 88 card); |
87 } | 89 } |
88 | 90 |
89 void AutofillClientIOS::ConfirmSaveCreditCardToCloud( | 91 void AutofillClientIOS::ConfirmSaveCreditCardToCloud( |
90 const base::Closure& callback, | 92 const base::Closure& callback, |
| 93 const CreditCard& card, |
91 scoped_ptr<base::DictionaryValue> legal_message) { | 94 scoped_ptr<base::DictionaryValue> legal_message) { |
92 AutofillCCInfoBarDelegate::CreateForUpload(infobar_manager_, callback); | 95 AutofillCCInfoBarDelegate::CreateForUpload(infobar_manager_, callback, card); |
93 } | 96 } |
94 | 97 |
95 void AutofillClientIOS::LoadRiskData( | 98 void AutofillClientIOS::LoadRiskData( |
96 const base::Callback<void(const std::string&)>& callback) { | 99 const base::Callback<void(const std::string&)>& callback) { |
97 callback.Run(ios::GetChromeBrowserProvider()->GetRiskData()); | 100 callback.Run(ios::GetChromeBrowserProvider()->GetRiskData()); |
98 } | 101 } |
99 | 102 |
100 bool AutofillClientIOS::HasCreditCardScanFeature() { | 103 bool AutofillClientIOS::HasCreditCardScanFeature() { |
101 return false; | 104 return false; |
102 } | 105 } |
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
163 return form_origin.SchemeIsCryptographic(); | 166 return form_origin.SchemeIsCryptographic(); |
164 } | 167 } |
165 | 168 |
166 void AutofillClientIOS::OnFirstUserGestureObserved() { | 169 void AutofillClientIOS::OnFirstUserGestureObserved() { |
167 // TODO(gcasto): [Merge 306796] http://crbug.com/439425 Verify if this method | 170 // TODO(gcasto): [Merge 306796] http://crbug.com/439425 Verify if this method |
168 // needs a real implementation or not. | 171 // needs a real implementation or not. |
169 NOTIMPLEMENTED(); | 172 NOTIMPLEMENTED(); |
170 } | 173 } |
171 | 174 |
172 } // namespace autofill | 175 } // namespace autofill |
OLD | NEW |