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

Side by Side Diff: chrome/browser/autofill/autofill_external_delegate.cc

Issue 10987100: Switch AutofillManager to be UserData on WebContents. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix external delegate Created 8 years, 2 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 | Annotate | Revision Log
OLDNEW
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 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
103 // No suggestions, any popup currently showing is obsolete. 103 // No suggestions, any popup currently showing is obsolete.
104 HideAutofillPopup(); 104 HideAutofillPopup();
105 return; 105 return;
106 } 106 }
107 107
108 // Send to display. 108 // Send to display.
109 if (autofill_query_field_.is_focusable) { 109 if (autofill_query_field_.is_focusable) {
110 popup_visible_ = true; 110 popup_visible_ = true;
111 ApplyAutofillSuggestions(values, labels, icons, ids); 111 ApplyAutofillSuggestions(values, labels, icons, ids);
112 112
113 tab_contents_->autofill_manager()->OnDidShowAutofillSuggestions( 113 AutofillManager::FromWebContents(tab_contents_->web_contents())->
114 has_autofill_item && !has_shown_autofill_popup_for_current_edit_); 114 OnDidShowAutofillSuggestions(
115 has_autofill_item && !has_shown_autofill_popup_for_current_edit_);
115 has_shown_autofill_popup_for_current_edit_ |= has_autofill_item; 116 has_shown_autofill_popup_for_current_edit_ |= has_autofill_item;
116 } 117 }
117 } 118 }
118 119
119 void AutofillExternalDelegate::OnShowPasswordSuggestions( 120 void AutofillExternalDelegate::OnShowPasswordSuggestions(
120 const std::vector<string16>& suggestions, 121 const std::vector<string16>& suggestions,
121 const FormFieldData& field, 122 const FormFieldData& field,
122 const gfx::Rect& bounds) { 123 const gfx::Rect& bounds) {
123 autofill_query_field_ = field; 124 autofill_query_field_ = field;
124 125
(...skipping 223 matching lines...) Expand 10 before | Expand all | Expand 10 after
348 349
349 350
350 #if defined(OS_MACOSX) 351 #if defined(OS_MACOSX)
351 352
352 AutofillExternalDelegate* AutofillExternalDelegate::Create( 353 AutofillExternalDelegate* AutofillExternalDelegate::Create(
353 TabContents*, AutofillManager*) { 354 TabContents*, AutofillManager*) {
354 return NULL; 355 return NULL;
355 } 356 }
356 357
357 #endif 358 #endif
OLDNEW
« no previous file with comments | « base/supports_user_data.h ('k') | chrome/browser/autofill/autofill_external_delegate_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698