OLD | NEW |
---|---|
(Empty) | |
1 // 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.
| |
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 CONTENT_COMMON_TEXT_INPUT_STATE_H_ | |
6 #define CONTENT_COMMON_TEXT_INPUT_STATE_H_ | |
7 | |
8 #include <string> | |
9 | |
10 #include "content/common/content_export.h" | |
11 #include "ui/base/ime/text_input_mode.h" | |
12 #include "ui/base/ime/text_input_type.h" | |
13 | |
14 namespace content { | |
15 | |
16 struct CONTENT_EXPORT TextInputState { | |
17 TextInputState(); | |
18 | |
19 // Type of the input field. | |
20 ui::TextInputType type; | |
21 | |
22 // The mode of input field. | |
23 ui::TextInputMode mode; | |
24 | |
25 // The flags of input field (autocorrect, autocomplete, etc.) | |
26 int flags; | |
27 | |
28 // The value of input field. | |
29 std::string value; | |
30 | |
31 // The cursor position of the current selection start, or the caret position | |
32 // if nothing is selected. | |
33 int selection_start; | |
34 | |
35 // The cursor position of the current selection end, or the caret position if | |
36 // nothing is selected. | |
37 int selection_end; | |
38 | |
39 // The start position of the current composition, or -1 if there is none. | |
40 int composition_start; | |
41 | |
42 // The end position of the current composition, or -1 if there is none. | |
43 int composition_end; | |
44 | |
45 // Whether or not inline composition can be performed for the current input. | |
46 bool can_compose_inline; | |
47 | |
48 // Whether or not the IME should be shown as a result of this update. Even if | |
49 // true, the IME will only be shown if the input is appropriate (e.g. not | |
50 // TEXT_INPUT_TYPE_NONE). | |
51 bool show_ime_if_needed; | |
52 | |
53 // 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.
| |
54 // Autofill). | |
55 bool is_non_ime_change; | |
56 }; | |
57 | |
58 } // namespace content | |
59 | |
60 #endif | |
Charlie Reis
2016/03/09 00:09:33
nit: #endif // CONTENT_COMMON_TEXT_INPUT_STATE_H_
| |
OLD | NEW |