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/bind.h" | 7 #include "base/bind.h" |
8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
9 #include "base/i18n/case_conversion.h" | 9 #include "base/i18n/case_conversion.h" |
10 #include "base/message_loop/message_loop.h" | 10 #include "base/message_loop/message_loop.h" |
(...skipping 282 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
293 suggestions->push_back(Suggestion(value)); | 293 suggestions->push_back(Suggestion(value)); |
294 suggestions->back().frontend_id = POPUP_ITEM_ID_CLEAR_FORM; | 294 suggestions->back().frontend_id = POPUP_ITEM_ID_CLEAR_FORM; |
295 } | 295 } |
296 | 296 |
297 // Append the 'Chrome Autofill options' menu item; | 297 // Append the 'Chrome Autofill options' menu item; |
298 // TODO(rouslan): Switch on the platform in the GRD file when keyboard | 298 // TODO(rouslan): Switch on the platform in the GRD file when keyboard |
299 // accessory becomes default on Android. | 299 // accessory becomes default on Android. |
300 suggestions->push_back(Suggestion(l10n_util::GetStringUTF16( | 300 suggestions->push_back(Suggestion(l10n_util::GetStringUTF16( |
301 IsKeyboardAccessoryEnabled() ? IDS_AUTOFILL_OPTIONS_CONTENT_DESCRIPTION | 301 IsKeyboardAccessoryEnabled() ? IDS_AUTOFILL_OPTIONS_CONTENT_DESCRIPTION |
302 : IDS_AUTOFILL_OPTIONS_POPUP))); | 302 : IDS_AUTOFILL_OPTIONS_POPUP))); |
| 303 suggestions->back().label = |
| 304 l10n_util::GetStringUTF16(IDS_AUTOFILL_OPTIONS_POPUP_LABEL); |
303 suggestions->back().frontend_id = POPUP_ITEM_ID_AUTOFILL_OPTIONS; | 305 suggestions->back().frontend_id = POPUP_ITEM_ID_AUTOFILL_OPTIONS; |
304 if (IsKeyboardAccessoryEnabled()) | 306 if (IsKeyboardAccessoryEnabled()) |
305 suggestions->back().icon = base::ASCIIToUTF16("settings"); | 307 suggestions->back().icon = base::ASCIIToUTF16("settings"); |
306 } | 308 } |
307 | 309 |
308 void AutofillExternalDelegate::InsertDataListValues( | 310 void AutofillExternalDelegate::InsertDataListValues( |
309 std::vector<Suggestion>* suggestions) { | 311 std::vector<Suggestion>* suggestions) { |
310 if (data_list_values_.empty()) | 312 if (data_list_values_.empty()) |
311 return; | 313 return; |
312 | 314 |
(...skipping 23 matching lines...) Expand all Loading... |
336 suggestions->insert(suggestions->begin(), data_list_values_.size(), | 338 suggestions->insert(suggestions->begin(), data_list_values_.size(), |
337 Suggestion()); | 339 Suggestion()); |
338 for (size_t i = 0; i < data_list_values_.size(); i++) { | 340 for (size_t i = 0; i < data_list_values_.size(); i++) { |
339 (*suggestions)[i].value = data_list_values_[i]; | 341 (*suggestions)[i].value = data_list_values_[i]; |
340 (*suggestions)[i].label = data_list_labels_[i]; | 342 (*suggestions)[i].label = data_list_labels_[i]; |
341 (*suggestions)[i].frontend_id = POPUP_ITEM_ID_DATALIST_ENTRY; | 343 (*suggestions)[i].frontend_id = POPUP_ITEM_ID_DATALIST_ENTRY; |
342 } | 344 } |
343 } | 345 } |
344 | 346 |
345 } // namespace autofill | 347 } // namespace autofill |
OLD | NEW |