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

Side by Side Diff: content/common/text_input_state.h

Issue 1914603002: Replace ViewHostMsg_TextInputState_Params with content::TextInputState. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressing Comments Created 4 years, 8 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 2016 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 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 // The text input state information for handling IME on the browser side. The
17 // text input state information such as type, mode, etc. are used by the input
18 // method to handle IME (the usage is specific to each platform).
19 struct CONTENT_EXPORT TextInputState {
20 TextInputState();
21 TextInputState(const TextInputState& other);
22
23 // Type of the input field.
24 ui::TextInputType type;
25
26 // The mode of input field.
27 ui::TextInputMode mode;
28
29 // The flags of input field (autocorrect, autocomplete, etc.)
30 int flags;
31
32 // The value of input field.
33 std::string value;
34
35 // The cursor position of the current selection start, or the caret position
36 // if nothing is selected.
37 int selection_start;
38
39 // The cursor position of the current selection end, or the caret position if
40 // nothing is selected.
41 int selection_end;
42
43 // The start position of the current composition, or -1 if there is none.
44 int composition_start;
45
46 // The end position of the current composition, or -1 if there is none.
47 int composition_end;
48
49 // Whether or not inline composition can be performed for the current input.
50 bool can_compose_inline;
51
52 // Whether or not the IME should be shown as a result of this update. Even if
53 // true, the IME will only be shown if the input is appropriate (e.g. not
54 // TEXT_INPUT_TYPE_NONE).
55 bool show_ime_if_needed;
56
57 // Whether this change is originated from non-IME (e.g., Javascript,
58 // Autofill).
59 bool is_non_ime_change;
60 };
61
62 } // namespace content
63
64 #endif // CONTENT_COMMON_TEXT_INPUT_STATE_H_
OLDNEW
« no previous file with comments | « content/browser/renderer_host/render_widget_host_view_mus.cc ('k') | content/common/text_input_state.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698