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

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: Fix Android build (accidentally omitted scoping class name) 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 // Creates and returns a small Textfield intended to be used for CVC entry.
15 static views::Textfield* CreateCvcTextfield() {
Evan Stade 2017/04/12 23:56:22 sorry, didn't notice you inlined this in the heade
Jared Saul 2017/04/13 00:42:35 No problem; done. PTAL: I wrapped it in a class w
16 views::Textfield* textfield = new views::Textfield();
17 textfield->set_placeholder_text(
18 l10n_util::GetStringUTF16(IDS_AUTOFILL_DIALOG_PLACEHOLDER_CVC));
19 textfield->set_default_width_in_chars(8);
20 textfield->SetTextInputType(ui::TextInputType::TEXT_INPUT_TYPE_NUMBER);
21 return textfield;
22 }
23
24 } // namespace autofill
25
26 #endif // CHROME_BROWSER_UI_VIEWS_AUTOFILL_VIEW_UTIL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698