Only grant permissions to new extensions from sync if they have the expected version
[chromium-blink-merge.git] / components / autofill / core / browser / detail_input.h
blobf5037c69516f827f4bc4159a412b4670aa944fde
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.
5 #ifndef COMPONENTS_AUTOFILL_CORE_BROWSER_DETAIL_INPUT_H_
6 #define COMPONENTS_AUTOFILL_CORE_BROWSER_DETAIL_INPUT_H_
8 #include <vector>
10 #include "base/strings/string16.h"
11 #include "components/autofill/core/browser/field_types.h"
13 namespace autofill {
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.
26 // Returns whether this input can spread across multiple lines.
27 bool IsMultiline() const;
29 // Used to determine which inputs share lines when laying out.
30 Length length;
32 ServerFieldType type;
34 // Text shown when the input is at its default state (e.g. empty).
35 base::string16 placeholder_text;
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;
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;
46 typedef std::vector<DetailInput> DetailInputs;
48 } // namespace autofill
50 #endif // COMPONENTS_AUTOFILL_CORE_BROWSER_DETAIL_INPUT_H_