| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "base/utf_string_conversions.h" | 5 #include "base/utf_string_conversions.h" |
| 6 #include "chrome/browser/autofill/autocomplete_history_manager.h" | 6 #include "chrome/browser/autofill/autocomplete_history_manager.h" |
| 7 #include "chrome/browser/autofill/autofill_external_delegate.h" | 7 #include "chrome/browser/autofill/autofill_external_delegate.h" |
| 8 #include "chrome/browser/autofill/autofill_manager.h" | 8 #include "chrome/browser/autofill/autofill_manager.h" |
| 9 #include "chrome/common/autofill_messages.h" | 9 #include "chrome/common/autofill_messages.h" |
| 10 #include "chrome/common/chrome_constants.h" | 10 #include "chrome/common/chrome_constants.h" |
| (...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 104 // No suggestions, any popup currently showing is obsolete. | 104 // No suggestions, any popup currently showing is obsolete. |
| 105 HideAutofillPopup(); | 105 HideAutofillPopup(); |
| 106 return; | 106 return; |
| 107 } | 107 } |
| 108 | 108 |
| 109 // Send to display. | 109 // Send to display. |
| 110 if (autofill_query_field_.is_focusable) { | 110 if (autofill_query_field_.is_focusable) { |
| 111 popup_visible_ = true; | 111 popup_visible_ = true; |
| 112 ApplyAutofillSuggestions(values, labels, icons, ids); | 112 ApplyAutofillSuggestions(values, labels, icons, ids); |
| 113 | 113 |
| 114 AutofillManager::FromWebContents(web_contents_)-> | 114 autofill_manager_->OnDidShowAutofillSuggestions( |
| 115 OnDidShowAutofillSuggestions( | 115 has_autofill_item && !has_shown_autofill_popup_for_current_edit_); |
| 116 has_autofill_item && !has_shown_autofill_popup_for_current_edit_); | |
| 117 has_shown_autofill_popup_for_current_edit_ |= has_autofill_item; | 116 has_shown_autofill_popup_for_current_edit_ |= has_autofill_item; |
| 118 } | 117 } |
| 119 } | 118 } |
| 120 | 119 |
| 121 void AutofillExternalDelegate::OnShowPasswordSuggestions( | 120 void AutofillExternalDelegate::OnShowPasswordSuggestions( |
| 122 const std::vector<string16>& suggestions, | 121 const std::vector<string16>& suggestions, |
| 123 const FormFieldData& field, | 122 const FormFieldData& field, |
| 124 const gfx::Rect& bounds) { | 123 const gfx::Rect& bounds) { |
| 125 autofill_query_field_ = field; | 124 autofill_query_field_ = field; |
| 126 | 125 |
| (...skipping 222 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 349 | 348 |
| 350 | 349 |
| 351 #if defined(OS_MACOSX) | 350 #if defined(OS_MACOSX) |
| 352 | 351 |
| 353 void AutofillExternalDelegate::CreateForWebContentsAndManager( | 352 void AutofillExternalDelegate::CreateForWebContentsAndManager( |
| 354 content::WebContents* web_contents, | 353 content::WebContents* web_contents, |
| 355 AutofillManager* autofill_manager) { | 354 AutofillManager* autofill_manager) { |
| 356 } | 355 } |
| 357 | 356 |
| 358 #endif | 357 #endif |
| OLD | NEW |