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/personal_data_manager_factory.h" | 9 #include "chrome/browser/autofill/personal_data_manager_factory.h" |
10 #include "chrome/browser/browser_process.h" | 10 #include "chrome/browser/browser_process.h" |
(...skipping 246 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
257 | 257 |
258 void ChromeAutofillClient::WebContentsDestroyed() { | 258 void ChromeAutofillClient::WebContentsDestroyed() { |
259 HideAutofillPopup(); | 259 HideAutofillPopup(); |
260 } | 260 } |
261 | 261 |
262 void ChromeAutofillClient::OnZoomChanged( | 262 void ChromeAutofillClient::OnZoomChanged( |
263 const ui_zoom::ZoomController::ZoomChangedEventData& data) { | 263 const ui_zoom::ZoomController::ZoomChangedEventData& data) { |
264 HideAutofillPopup(); | 264 HideAutofillPopup(); |
265 } | 265 } |
266 | 266 |
267 void ChromeAutofillClient::DetectAccountCreationForms( | 267 void ChromeAutofillClient::PropagateAutofillPredictions( |
268 content::RenderFrameHost* rfh, | 268 content::RenderFrameHost* rfh, |
269 const std::vector<autofill::FormStructure*>& forms) { | 269 const std::vector<autofill::FormStructure*>& forms) { |
270 password_manager::ContentPasswordManagerDriver* driver = | 270 password_manager::ContentPasswordManagerDriver* driver = |
271 password_manager::ContentPasswordManagerDriver::GetForRenderFrameHost( | 271 password_manager::ContentPasswordManagerDriver::GetForRenderFrameHost( |
272 rfh); | 272 rfh); |
273 if (driver) | 273 if (driver) { |
274 driver->GetPasswordGenerationManager()->DetectAccountCreationForms(forms); | 274 driver->GetPasswordGenerationManager()->DetectAccountCreationForms(forms); |
| 275 driver->GetPasswordManager()->ProcessAutofillPredictions(driver, forms); |
| 276 } |
275 } | 277 } |
276 | 278 |
277 void ChromeAutofillClient::DidFillOrPreviewField( | 279 void ChromeAutofillClient::DidFillOrPreviewField( |
278 const base::string16& autofilled_value, | 280 const base::string16& autofilled_value, |
279 const base::string16& profile_full_name) { | 281 const base::string16& profile_full_name) { |
280 #if defined(OS_ANDROID) | 282 #if defined(OS_ANDROID) |
281 AutofillLoggerAndroid::DidFillOrPreviewField(autofilled_value, | 283 AutofillLoggerAndroid::DidFillOrPreviewField(autofilled_value, |
282 profile_full_name); | 284 profile_full_name); |
283 #endif // defined(OS_ANDROID) | 285 #endif // defined(OS_ANDROID) |
284 } | 286 } |
285 | 287 |
286 void ChromeAutofillClient::OnFirstUserGestureObserved() { | 288 void ChromeAutofillClient::OnFirstUserGestureObserved() { |
287 web_contents()->SendToAllFrames( | 289 web_contents()->SendToAllFrames( |
288 new AutofillMsg_FirstUserGestureObservedInTab(routing_id())); | 290 new AutofillMsg_FirstUserGestureObservedInTab(routing_id())); |
289 } | 291 } |
290 | 292 |
291 void ChromeAutofillClient::LinkClicked(const GURL& url, | 293 void ChromeAutofillClient::LinkClicked(const GURL& url, |
292 WindowOpenDisposition disposition) { | 294 WindowOpenDisposition disposition) { |
293 web_contents()->OpenURL(content::OpenURLParams( | 295 web_contents()->OpenURL(content::OpenURLParams( |
294 url, content::Referrer(), disposition, ui::PAGE_TRANSITION_LINK, false)); | 296 url, content::Referrer(), disposition, ui::PAGE_TRANSITION_LINK, false)); |
295 } | 297 } |
296 | 298 |
297 } // namespace autofill | 299 } // namespace autofill |
OLD | NEW |