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 #include "components/autofill/core/browser/autofill_external_delegate.h" | 5 #include "components/autofill/core/browser/autofill_external_delegate.h" |
6 | 6 |
7 #include "base/strings/utf_string_conversions.h" | 7 #include "base/strings/utf_string_conversions.h" |
8 #include "components/autofill/core/browser/autocomplete_history_manager.h" | 8 #include "components/autofill/core/browser/autocomplete_history_manager.h" |
9 #include "components/autofill/core/browser/autofill_driver.h" | 9 #include "components/autofill/core/browser/autofill_driver.h" |
10 #include "components/autofill/core/browser/autofill_manager.h" | 10 #include "components/autofill/core/browser/autofill_manager.h" |
(...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
180 } | 180 } |
181 | 181 |
182 registered_key_press_event_callback_with_ = NULL; | 182 registered_key_press_event_callback_with_ = NULL; |
183 } | 183 } |
184 | 184 |
185 bool AutofillExternalDelegate::ShouldRepostEvent(const ui::MouseEvent& event) { | 185 bool AutofillExternalDelegate::ShouldRepostEvent(const ui::MouseEvent& event) { |
186 NOTREACHED(); | 186 NOTREACHED(); |
187 return true; | 187 return true; |
188 } | 188 } |
189 | 189 |
190 void AutofillExternalDelegate::DidSelectSuggestion(int identifier) { | 190 void AutofillExternalDelegate::DidPreselectSuggestion(int identifier) { |
191 ClearPreviewedForm(); | 191 ClearPreviewedForm(); |
192 | 192 |
193 // Only preview the data if it is a profile. | 193 // Only preview the data if it is a profile. |
194 if (identifier > 0) | 194 if (identifier > 0) |
195 FillAutofillFormData(identifier, true); | 195 FillAutofillFormData(identifier, true); |
196 } | 196 } |
197 | 197 |
198 void AutofillExternalDelegate::DidAcceptSuggestion(const base::string16& value, | 198 void AutofillExternalDelegate::DidAcceptSuggestion(const base::string16& value, |
199 int identifier) { | 199 int identifier) { |
200 RenderViewHost* host = web_contents_->GetRenderViewHost(); | 200 RenderViewHost* host = web_contents_->GetRenderViewHost(); |
(...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
375 // Set the values that all datalist elements share. | 375 // Set the values that all datalist elements share. |
376 autofill_icons->insert(autofill_icons->begin(), | 376 autofill_icons->insert(autofill_icons->begin(), |
377 data_list_values_.size(), | 377 data_list_values_.size(), |
378 base::string16()); | 378 base::string16()); |
379 autofill_unique_ids->insert(autofill_unique_ids->begin(), | 379 autofill_unique_ids->insert(autofill_unique_ids->begin(), |
380 data_list_values_.size(), | 380 data_list_values_.size(), |
381 WebAutofillClient::MenuItemIDDataListEntry); | 381 WebAutofillClient::MenuItemIDDataListEntry); |
382 } | 382 } |
383 | 383 |
384 } // namespace autofill | 384 } // namespace autofill |
OLD | NEW |