OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/ui/autofill/chrome_autofill_client.h" | 5 #include "chrome/browser/ui/autofill/chrome_autofill_client.h" |
6 | 6 |
7 #include "base/logging.h" | 7 #include "base/logging.h" |
8 #include "base/prefs/pref_service.h" | 8 #include "base/prefs/pref_service.h" |
9 #include "chrome/browser/autofill/autofill_cc_infobar_delegate.h" | 9 #include "chrome/browser/autofill/autofill_cc_infobar_delegate.h" |
10 #include "chrome/browser/autofill/personal_data_manager_factory.h" | 10 #include "chrome/browser/autofill/personal_data_manager_factory.h" |
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
100 #if defined(OS_ANDROID) | 100 #if defined(OS_ANDROID) |
101 chrome::android::ChromiumApplication::ShowAutofillSettings(); | 101 chrome::android::ChromiumApplication::ShowAutofillSettings(); |
102 #else | 102 #else |
103 Browser* browser = chrome::FindBrowserWithWebContents(web_contents_); | 103 Browser* browser = chrome::FindBrowserWithWebContents(web_contents_); |
104 if (browser) | 104 if (browser) |
105 chrome::ShowSettingsSubPage(browser, chrome::kAutofillSubPage); | 105 chrome::ShowSettingsSubPage(browser, chrome::kAutofillSubPage); |
106 #endif // #if defined(OS_ANDROID) | 106 #endif // #if defined(OS_ANDROID) |
107 } | 107 } |
108 | 108 |
109 void ChromeAutofillClient::ConfirmSaveCreditCard( | 109 void ChromeAutofillClient::ConfirmSaveCreditCard( |
| 110 const AutofillMetrics& metric_logger, |
110 const base::Closure& save_card_callback) { | 111 const base::Closure& save_card_callback) { |
111 InfoBarService* infobar_service = | 112 InfoBarService* infobar_service = |
112 InfoBarService::FromWebContents(web_contents_); | 113 InfoBarService::FromWebContents(web_contents_); |
113 AutofillCCInfoBarDelegate::Create(infobar_service, save_card_callback); | 114 AutofillCCInfoBarDelegate::Create( |
| 115 infobar_service, &metric_logger, save_card_callback); |
114 } | 116 } |
115 | 117 |
116 bool ChromeAutofillClient::HasCreditCardScanFeature() { | 118 bool ChromeAutofillClient::HasCreditCardScanFeature() { |
117 return CreditCardScannerController::HasCreditCardScanFeature(); | 119 return CreditCardScannerController::HasCreditCardScanFeature(); |
118 } | 120 } |
119 | 121 |
120 void ChromeAutofillClient::ScanCreditCard( | 122 void ChromeAutofillClient::ScanCreditCard( |
121 const CreditCardScanCallback& callback) { | 123 const CreditCardScanCallback& callback) { |
122 CreditCardScannerController::ScanCreditCard(web_contents(), callback); | 124 CreditCardScannerController::ScanCreditCard(web_contents(), callback); |
123 } | 125 } |
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
221 profile_full_name); | 223 profile_full_name); |
222 #endif // defined(OS_ANDROID) | 224 #endif // defined(OS_ANDROID) |
223 } | 225 } |
224 | 226 |
225 void ChromeAutofillClient::OnFirstUserGestureObserved() { | 227 void ChromeAutofillClient::OnFirstUserGestureObserved() { |
226 web_contents()->SendToAllFrames( | 228 web_contents()->SendToAllFrames( |
227 new AutofillMsg_FirstUserGestureObservedInTab(routing_id())); | 229 new AutofillMsg_FirstUserGestureObservedInTab(routing_id())); |
228 } | 230 } |
229 | 231 |
230 } // namespace autofill | 232 } // namespace autofill |
OLD | NEW |