Chromium Code Reviews| 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 275 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 286 // TODO(rouslan): Remove manual upper-casing when keyboard accessory becomes | 286 // TODO(rouslan): Remove manual upper-casing when keyboard accessory becomes |
| 287 // default on Android. | 287 // default on Android. |
| 288 if (IsKeyboardAccessoryEnabled()) | 288 if (IsKeyboardAccessoryEnabled()) |
| 289 value = base::i18n::ToUpper(value); | 289 value = base::i18n::ToUpper(value); |
| 290 | 290 |
| 291 suggestions->push_back(Suggestion(value)); | 291 suggestions->push_back(Suggestion(value)); |
| 292 suggestions->back().frontend_id = POPUP_ITEM_ID_CLEAR_FORM; | 292 suggestions->back().frontend_id = POPUP_ITEM_ID_CLEAR_FORM; |
| 293 } | 293 } |
| 294 | 294 |
| 295 // Append the 'Chrome Autofill options' menu item; | 295 // Append the 'Chrome Autofill options' menu item; |
| 296 suggestions->push_back(Suggestion( | 296 suggestions->push_back(Suggestion(l10n_util::GetStringUTF16( |
| 297 l10n_util::GetStringUTF16(IDS_AUTOFILL_OPTIONS_POPUP))); | 297 IsKeyboardAccessoryEnabled() ? IDS_AUTOFILL_OPTIONS_CONTENT_DESCRIPTION |
|
Evan Stade
2015/09/21 20:03:47
this seems like another place we should just switc
please use gerrit instead
2015/09/21 20:34:44
Added a TODO. Done.
| |
| 298 : IDS_AUTOFILL_OPTIONS_POPUP))); | |
| 298 suggestions->back().frontend_id = POPUP_ITEM_ID_AUTOFILL_OPTIONS; | 299 suggestions->back().frontend_id = POPUP_ITEM_ID_AUTOFILL_OPTIONS; |
| 299 if (IsKeyboardAccessoryEnabled()) | 300 if (IsKeyboardAccessoryEnabled()) |
| 300 suggestions->back().icon = base::ASCIIToUTF16("settings"); | 301 suggestions->back().icon = base::ASCIIToUTF16("settings"); |
| 301 } | 302 } |
| 302 | 303 |
| 303 void AutofillExternalDelegate::InsertDataListValues( | 304 void AutofillExternalDelegate::InsertDataListValues( |
| 304 std::vector<Suggestion>* suggestions) { | 305 std::vector<Suggestion>* suggestions) { |
| 305 if (data_list_values_.empty()) | 306 if (data_list_values_.empty()) |
| 306 return; | 307 return; |
| 307 | 308 |
| (...skipping 10 matching lines...) Expand all Loading... | |
| 318 suggestions->insert(suggestions->begin(), data_list_values_.size(), | 319 suggestions->insert(suggestions->begin(), data_list_values_.size(), |
| 319 Suggestion()); | 320 Suggestion()); |
| 320 for (size_t i = 0; i < data_list_values_.size(); i++) { | 321 for (size_t i = 0; i < data_list_values_.size(); i++) { |
| 321 (*suggestions)[i].value = data_list_values_[i]; | 322 (*suggestions)[i].value = data_list_values_[i]; |
| 322 (*suggestions)[i].label = data_list_labels_[i]; | 323 (*suggestions)[i].label = data_list_labels_[i]; |
| 323 (*suggestions)[i].frontend_id = POPUP_ITEM_ID_DATALIST_ENTRY; | 324 (*suggestions)[i].frontend_id = POPUP_ITEM_ID_DATALIST_ENTRY; |
| 324 } | 325 } |
| 325 } | 326 } |
| 326 | 327 |
| 327 } // namespace autofill | 328 } // namespace autofill |
| OLD | NEW |