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

Side by Side Diff: chrome/browser/ui/views/autofill/view_util.h

Issue 2789843004: [Payments] Upload card UI now has a CVC prompt (Closed)
Patch Set: Addressing code review comments Created 3 years, 8 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
(Empty)
1 // Copyright 2017 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef CHROME_BROWSER_UI_VIEWS_AUTOFILL_VIEW_UTIL_H_
6 #define CHROME_BROWSER_UI_VIEWS_AUTOFILL_VIEW_UTIL_H_
7
8 #include "components/strings/grit/components_strings.h"
9 #include "ui/base/l10n/l10n_util.h"
10 #include "ui/views/controls/textfield/textfield.h"
11
12 namespace autofill {
13
14 // Fixed width of the CVC Textfield, in characters.
15 static const int kDefaultWidthForCvc = 8;
Evan Stade 2017/04/11 15:28:05 I would just inline this. The code itself is very
Jared Saul 2017/04/11 22:57:47 Done.
16
17 // Creates and returns a small Textfield intended to be used for CVC entry.
18 static views::Textfield* CreateCvcTextfield() {
19 views::Textfield* textfield = new views::Textfield();
20 textfield->set_placeholder_text(
21 l10n_util::GetStringUTF16(IDS_AUTOFILL_DIALOG_PLACEHOLDER_CVC));
22 textfield->set_default_width_in_chars(kDefaultWidthForCvc);
23 textfield->SetTextInputType(ui::TextInputType::TEXT_INPUT_TYPE_NUMBER);
24 return textfield;
25 }
26
27 } // namespace autofill
28
29 #endif // CHROME_BROWSER_UI_VIEWS_AUTOFILL_VIEW_UTIL_H_
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/autofill/save_card_bubble_views.cc ('k') | components/autofill/core/browser/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698