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

Side by Side Diff: components/autofill/core/browser/detail_input.h

Issue 974323002: Componentize autofill dialog common code (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: add missing includes Created 5 years, 9 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 2015 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 COMPONENTS_AUTOFILL_CORE_BROWSER_DETAIL_INPUT_H_
6 #define COMPONENTS_AUTOFILL_CORE_BROWSER_DETAIL_INPUT_H_
7
8 #include <vector>
9
10 #include "base/strings/string16.h"
11 #include "components/autofill/core/browser/field_types.h"
12
13 namespace autofill {
14
15 // This struct describes a single input control for the imperative autocomplete
16 // dialog.
17 struct DetailInput {
18 enum Length {
19 SHORT, // Shares a line with other short inputs, like display: inline.
20 SHORT_EOL, // Like SHORT but starts a new line directly afterward. Used to
21 // separate groups of short inputs into different lines.
22 LONG, // Will be given its own full line, like display: block.
23 NONE, // Input will not be shown.
24 };
25
26 // Returns whether this input can spread across multiple lines.
27 bool IsMultiline() const;
28
29 // Used to determine which inputs share lines when laying out.
30 Length length;
31
32 ServerFieldType type;
33
34 // Text shown when the input is at its default state (e.g. empty).
35 base::string16 placeholder_text;
36
37 // A number between 0 and 1.0 that describes how much of the horizontal space
38 // in the row should be allotted to this input. 0 is equivalent to 1.
39 float expand_weight;
40
41 // When non-empty, indicates the starting value for this input. This will be
42 // used when the user is editing existing data.
43 base::string16 initial_value;
44 };
45
46 typedef std::vector<DetailInput> DetailInputs;
47
48 } // namespace autofill
49
50 #endif // COMPONENTS_AUTOFILL_CORE_BROWSER_DETAIL_INPUT_H_
OLDNEW
« no previous file with comments | « components/autofill/core/browser/BUILD.gn ('k') | components/autofill/core/browser/detail_input.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698