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

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

Issue 2370393002: Extracting placeholder information from Webkit to Blimp (Closed)
Patch Set: Created 4 years, 2 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
1 // Copyright 2016 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CONTENT_COMMON_TEXT_INPUT_STATE_H_ 5 #ifndef CONTENT_COMMON_TEXT_INPUT_STATE_H_
6 #define CONTENT_COMMON_TEXT_INPUT_STATE_H_ 6 #define CONTENT_COMMON_TEXT_INPUT_STATE_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "content/common/content_export.h" 10 #include "content/common/content_export.h"
11 #include "ui/base/ime/text_input_mode.h" 11 #include "ui/base/ime/text_input_mode.h"
12 #include "ui/base/ime/text_input_type.h" 12 #include "ui/base/ime/text_input_type.h"
13 13
14 namespace content { 14 namespace content {
15 15
16 // The text input state information for handling IME on the browser side. The 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 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). 18 // method to handle IME (the usage is specific to each platform).
19 struct CONTENT_EXPORT TextInputState { 19 struct CONTENT_EXPORT TextInputState {
20 TextInputState(); 20 TextInputState();
21 TextInputState(const TextInputState& other); 21 TextInputState(const TextInputState& other);
22 22
23 // Type of the input field. 23 // Type of the input field.
24 ui::TextInputType type; 24 ui::TextInputType type;
25 25
26 // The mode of input field. 26 // The mode of input field.
27 ui::TextInputMode mode; 27 ui::TextInputMode mode;
28 28
29 // The placeholder for the input field, if any.
30 std::string placeholder;
31
29 // The flags of input field (autocorrect, autocomplete, etc.) 32 // The flags of input field (autocorrect, autocomplete, etc.)
30 int flags; 33 int flags;
31 34
32 // The value of input field. 35 // The value of input field.
33 std::string value; 36 std::string value;
34 37
35 // The cursor position of the current selection start, or the caret position 38 // The cursor position of the current selection start, or the caret position
36 // if nothing is selected. 39 // if nothing is selected.
37 int selection_start; 40 int selection_start;
38 41
(...skipping 19 matching lines...) Expand all
58 // Autofill). 61 // Autofill).
59 bool is_non_ime_change; 62 bool is_non_ime_change;
60 63
61 // Whether we are in a batch edit. 64 // Whether we are in a batch edit.
62 bool batch_edit; 65 bool batch_edit;
63 }; 66 };
64 67
65 } // namespace content 68 } // namespace content
66 69
67 #endif // CONTENT_COMMON_TEXT_INPUT_STATE_H_ 70 #endif // CONTENT_COMMON_TEXT_INPUT_STATE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698