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

Side by Side Diff: components/autofill/core/browser/autofill_external_delegate.cc

Issue 1522563002: Modernize autofill popup design (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 11 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
OLDNEW
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 <stddef.h> 7 #include <stddef.h>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 285 matching lines...) Expand 10 before | Expand all | Expand 10 after
296 suggestions->push_back(Suggestion(value)); 296 suggestions->push_back(Suggestion(value));
297 suggestions->back().frontend_id = POPUP_ITEM_ID_CLEAR_FORM; 297 suggestions->back().frontend_id = POPUP_ITEM_ID_CLEAR_FORM;
298 } 298 }
299 299
300 // Append the 'Chrome Autofill options' menu item; 300 // Append the 'Chrome Autofill options' menu item;
301 // TODO(rouslan): Switch on the platform in the GRD file when keyboard 301 // TODO(rouslan): Switch on the platform in the GRD file when keyboard
302 // accessory becomes default on Android. 302 // accessory becomes default on Android.
303 suggestions->push_back(Suggestion(l10n_util::GetStringUTF16( 303 suggestions->push_back(Suggestion(l10n_util::GetStringUTF16(
304 IsKeyboardAccessoryEnabled() ? IDS_AUTOFILL_OPTIONS_CONTENT_DESCRIPTION 304 IsKeyboardAccessoryEnabled() ? IDS_AUTOFILL_OPTIONS_CONTENT_DESCRIPTION
305 : IDS_AUTOFILL_OPTIONS_POPUP))); 305 : IDS_AUTOFILL_OPTIONS_POPUP)));
306 suggestions->back().label =
307 l10n_util::GetStringUTF16(IDS_AUTOFILL_OPTIONS_POPUP_LABEL);
306 suggestions->back().frontend_id = POPUP_ITEM_ID_AUTOFILL_OPTIONS; 308 suggestions->back().frontend_id = POPUP_ITEM_ID_AUTOFILL_OPTIONS;
307 if (IsKeyboardAccessoryEnabled()) 309 if (IsKeyboardAccessoryEnabled())
308 suggestions->back().icon = base::ASCIIToUTF16("settings"); 310 suggestions->back().icon = base::ASCIIToUTF16("settings");
309 } 311 }
310 312
311 void AutofillExternalDelegate::InsertDataListValues( 313 void AutofillExternalDelegate::InsertDataListValues(
312 std::vector<Suggestion>* suggestions) { 314 std::vector<Suggestion>* suggestions) {
313 if (data_list_values_.empty()) 315 if (data_list_values_.empty())
314 return; 316 return;
315 317
(...skipping 23 matching lines...) Expand all
339 suggestions->insert(suggestions->begin(), data_list_values_.size(), 341 suggestions->insert(suggestions->begin(), data_list_values_.size(),
340 Suggestion()); 342 Suggestion());
341 for (size_t i = 0; i < data_list_values_.size(); i++) { 343 for (size_t i = 0; i < data_list_values_.size(); i++) {
342 (*suggestions)[i].value = data_list_values_[i]; 344 (*suggestions)[i].value = data_list_values_[i];
343 (*suggestions)[i].label = data_list_labels_[i]; 345 (*suggestions)[i].label = data_list_labels_[i];
344 (*suggestions)[i].frontend_id = POPUP_ITEM_ID_DATALIST_ENTRY; 346 (*suggestions)[i].frontend_id = POPUP_ITEM_ID_DATALIST_ENTRY;
345 } 347 }
346 } 348 }
347 349
348 } // namespace autofill 350 } // namespace autofill
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698