OLD | NEW |
---|---|
(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_ | |
OLD | NEW |