Chromium Code Reviews| Index: content/common/text_input_state.h |
| diff --git a/content/common/text_input_state.h b/content/common/text_input_state.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..4d853b494f9fb17a2c669ee24c4eb5b1f5d28d50 |
| --- /dev/null |
| +++ b/content/common/text_input_state.h |
| @@ -0,0 +1,60 @@ |
| +// Copyright 2015 The Chromium Authors. All rights reserved. |
|
Charlie Reis
2016/03/09 00:09:33
nit: 2016
EhsanK
2016/03/14 19:58:08
Done.
|
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#ifndef CONTENT_COMMON_TEXT_INPUT_STATE_H_ |
| +#define CONTENT_COMMON_TEXT_INPUT_STATE_H_ |
| + |
| +#include <string> |
| + |
| +#include "content/common/content_export.h" |
| +#include "ui/base/ime/text_input_mode.h" |
| +#include "ui/base/ime/text_input_type.h" |
| + |
| +namespace content { |
| + |
| +struct CONTENT_EXPORT TextInputState { |
| + TextInputState(); |
| + |
| + // Type of the input field. |
| + ui::TextInputType type; |
| + |
| + // The mode of input field. |
| + ui::TextInputMode mode; |
| + |
| + // The flags of input field (autocorrect, autocomplete, etc.) |
| + int flags; |
| + |
| + // The value of input field. |
| + std::string value; |
| + |
| + // The cursor position of the current selection start, or the caret position |
| + // if nothing is selected. |
| + int selection_start; |
| + |
| + // The cursor position of the current selection end, or the caret position if |
| + // nothing is selected. |
| + int selection_end; |
| + |
| + // The start position of the current composition, or -1 if there is none. |
| + int composition_start; |
| + |
| + // The end position of the current composition, or -1 if there is none. |
| + int composition_end; |
| + |
| + // Whether or not inline composition can be performed for the current input. |
| + bool can_compose_inline; |
| + |
| + // Whether or not the IME should be shown as a result of this update. Even if |
| + // true, the IME will only be shown if the input is appropriate (e.g. not |
| + // TEXT_INPUT_TYPE_NONE). |
| + bool show_ime_if_needed; |
| + |
| + // Whether this change is originated from none-IME (e.g., Javascript, |
|
Charlie Reis
2016/03/09 00:09:33
non-IME
EhsanK
2016/03/14 19:58:08
Done.
|
| + // Autofill). |
| + bool is_non_ime_change; |
| +}; |
| + |
| +} // namespace content |
| + |
| +#endif |
|
Charlie Reis
2016/03/09 00:09:33
nit: #endif // CONTENT_COMMON_TEXT_INPUT_STATE_H_
|