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

Side by Side Diff: chrome/browser/ui/views/autofill/autofill_dialog_views.cc

Issue 12220130: i18n for placeholders in requestAutocomplete dialog (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: sync Created 7 years, 10 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
« no previous file with comments | « chrome/browser/ui/autofill/autofill_dialog_types.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "chrome/browser/ui/views/autofill/autofill_dialog_views.h" 5 #include "chrome/browser/ui/views/autofill/autofill_dialog_views.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/utf_string_conversions.h" 9 #include "base/utf_string_conversions.h"
10 #include "chrome/browser/autofill/wallet/wallet_service_url.h" 10 #include "chrome/browser/autofill/wallet/wallet_service_url.h"
11 #include "chrome/browser/profiles/profile.h" 11 #include "chrome/browser/profiles/profile.h"
12 #include "chrome/browser/ui/autofill/autofill_dialog_controller.h" 12 #include "chrome/browser/ui/autofill/autofill_dialog_controller.h"
13 #include "chrome/browser/ui/views/constrained_window_views.h" 13 #include "chrome/browser/ui/views/constrained_window_views.h"
14 #include "content/public/browser/native_web_keyboard_event.h" 14 #include "content/public/browser/native_web_keyboard_event.h"
15 #include "content/public/browser/navigation_controller.h" 15 #include "content/public/browser/navigation_controller.h"
16 #include "content/public/browser/web_contents.h" 16 #include "content/public/browser/web_contents.h"
17 #include "grit/theme_resources.h" 17 #include "grit/theme_resources.h"
18 #include "third_party/skia/include/core/SkColor.h" 18 #include "third_party/skia/include/core/SkColor.h"
19 #include "ui/base/l10n/l10n_util.h"
19 #include "ui/base/models/combobox_model.h" 20 #include "ui/base/models/combobox_model.h"
20 #include "ui/base/resource/resource_bundle.h" 21 #include "ui/base/resource/resource_bundle.h"
21 #include "ui/gfx/canvas.h" 22 #include "ui/gfx/canvas.h"
22 #include "ui/views/background.h" 23 #include "ui/views/background.h"
23 #include "ui/views/border.h" 24 #include "ui/views/border.h"
24 #include "ui/views/controls/button/checkbox.h" 25 #include "ui/views/controls/button/checkbox.h"
25 #include "ui/views/controls/button/image_button.h" 26 #include "ui/views/controls/button/image_button.h"
26 #include "ui/views/controls/combobox/combobox.h" 27 #include "ui/views/controls/combobox/combobox.h"
27 #include "ui/views/controls/image_view.h" 28 #include "ui/views/controls/image_view.h"
28 #include "ui/views/controls/label.h" 29 #include "ui/views/controls/label.h"
(...skipping 824 matching lines...) Expand 10 before | Expand all | Expand 10 after
853 854
854 for (int i = 0; i < input_model->GetItemCount(); ++i) { 855 for (int i = 0; i < input_model->GetItemCount(); ++i) {
855 if (input.autofilled_value == input_model->GetItemAt(i)) { 856 if (input.autofilled_value == input_model->GetItemAt(i)) {
856 combobox->SetSelectedIndex(i); 857 combobox->SetSelectedIndex(i);
857 break; 858 break;
858 } 859 }
859 } 860 }
860 } else { 861 } else {
861 DecoratedTextfield* field = new DecoratedTextfield( 862 DecoratedTextfield* field = new DecoratedTextfield(
862 input.autofilled_value, 863 input.autofilled_value,
863 ASCIIToUTF16(input.placeholder_text), 864 l10n_util::GetStringUTF16(input.placeholder_text_rid),
864 this); 865 this);
865 textfields->insert(std::make_pair(&input, field)); 866 textfields->insert(std::make_pair(&input, field));
866 layout->AddView(field); 867 layout->AddView(field);
867 } 868 }
868 } 869 }
869 870
870 return view; 871 return view;
871 } 872 }
872 873
873 void AutofillDialogViews::UpdateDetailsGroupState(const DetailsGroup& group) { 874 void AutofillDialogViews::UpdateDetailsGroupState(const DetailsGroup& group) {
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after
998 AutofillDialogViews::DetailsGroup::DetailsGroup(DialogSection section) 999 AutofillDialogViews::DetailsGroup::DetailsGroup(DialogSection section)
999 : section(section), 1000 : section(section),
1000 container(NULL), 1001 container(NULL),
1001 manual_input(NULL), 1002 manual_input(NULL),
1002 suggested_info(NULL), 1003 suggested_info(NULL),
1003 suggested_button(NULL) {} 1004 suggested_button(NULL) {}
1004 1005
1005 AutofillDialogViews::DetailsGroup::~DetailsGroup() {} 1006 AutofillDialogViews::DetailsGroup::~DetailsGroup() {}
1006 1007
1007 } // namespace autofill 1008 } // namespace autofill
OLDNEW
« no previous file with comments | « chrome/browser/ui/autofill/autofill_dialog_types.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698