Chromium Code Reviews| Index: components/autofill/content/public/interfaces/autofill_types.mojom |
| diff --git a/components/autofill/content/public/interfaces/autofill_types.mojom b/components/autofill/content/public/interfaces/autofill_types.mojom |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..222f1b8971226ce6e2e18f62848836f021fc2929 |
| --- /dev/null |
| +++ b/components/autofill/content/public/interfaces/autofill_types.mojom |
| @@ -0,0 +1,51 @@ |
| +// Copyright 2016 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +module autofill.mojom; |
| + |
| +import "url/mojo/url.mojom"; |
| + |
| +// autofill::FormFieldData::RoleAttribute |
| +enum RoleAttribute { |
| + ROLE_ATTRIBUTE_PRESENTATION, |
| + ROLE_ATTRIBUTE_OTHER |
| +}; |
| + |
| +// base::i18n::TextDirection |
| +enum TextDirection { |
| + UNKNOWN_DIRECTION = 0, |
| + RIGHT_TO_LEFT = 1, |
| + LEFT_TO_RIGHT = 2, |
| + TEXT_DIRECTION_NUM_DIRECTIONS = 3 |
| +}; |
| + |
| +struct FormFieldData { |
| + string label = ""; |
|
yzshen1
2016/05/23 16:59:13
Now that you have mapped this to a custom type, do
leonhsl(Using Gerrit)
2016/05/24 06:38:20
Yeah it's right. Done. Thanks~
|
| + string name = ""; |
| + string value = ""; |
| + string form_control_type = ""; |
| + string autocomplete_attribute = ""; |
| + string placeholder = ""; |
| + |
| + uint64 max_length; |
| + bool is_autofilled; |
| + bool is_checked; |
| + bool is_checkable; |
|
dcheng
2016/05/23 20:43:44
Is it possible for is_checked to be true but is_ch
leonhsl(Using Gerrit)
2016/05/24 06:38:20
Checked around is_checked & is_checkable and I sup
vabr (Chromium)
2016/05/24 07:40:30
Agreed, if is_checkable is false, then is_checked
|
| + bool is_focusable; |
| + bool should_autocomplete; |
| + RoleAttribute role; |
| + TextDirection text_direction; |
| + |
| + array<string> option_values; |
| + array<string> option_contents; |
| +}; |
| + |
| +struct FormData { |
| + string name = ""; |
| + url.mojom.Url origin; |
| + url.mojom.Url action; |
| + bool is_form_tag; |
| + bool is_formless_checkout; |
| + array<FormFieldData> fields; |
| +}; |