OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_CHILD_NPAPI_WEBPLUGIN_IME_WIN_H_ | 5 #ifndef CONTENT_CHILD_NPAPI_WEBPLUGIN_IME_WIN_H_ |
6 #define CONTENT_CHILD_NPAPI_WEBPLUGIN_IME_WIN_H_ | 6 #define CONTENT_CHILD_NPAPI_WEBPLUGIN_IME_WIN_H_ |
7 | 7 |
| 8 #include <stdint.h> |
| 9 |
8 #include <string> | 10 #include <string> |
9 #include <vector> | 11 #include <vector> |
10 | 12 |
11 #include "base/basictypes.h" | |
12 #include "base/strings/string16.h" | 13 #include "base/strings/string16.h" |
13 #include "third_party/npapi/bindings/npapi.h" | 14 #include "third_party/npapi/bindings/npapi.h" |
14 #include "ui/gfx/geometry/rect.h" | 15 #include "ui/gfx/geometry/rect.h" |
15 | 16 |
16 namespace content { | 17 namespace content { |
17 | 18 |
18 class PluginInstance; | 19 class PluginInstance; |
19 | 20 |
20 // A class that emulates an IME for windowless plugins. A windowless plugin | 21 // A class that emulates an IME for windowless plugins. A windowless plugin |
21 // does not have a window. Therefore, we cannot attach an IME to a windowless | 22 // does not have a window. Therefore, we cannot attach an IME to a windowless |
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
142 // The return value for GCS_COMPSTR. | 143 // The return value for GCS_COMPSTR. |
143 base::string16 composition_text_; | 144 base::string16 composition_text_; |
144 | 145 |
145 // The return value for GCS_RESULTSTR. | 146 // The return value for GCS_RESULTSTR. |
146 base::string16 result_text_; | 147 base::string16 result_text_; |
147 | 148 |
148 // The return value for GCS_COMPATTR. | 149 // The return value for GCS_COMPATTR. |
149 std::string composition_attributes_; | 150 std::string composition_attributes_; |
150 | 151 |
151 // The return value for GCS_COMPCLAUSE. | 152 // The return value for GCS_COMPCLAUSE. |
152 std::vector<uint32> composition_clauses_; | 153 std::vector<uint32_t> composition_clauses_; |
153 | 154 |
154 // The return value for GCS_RESULTCLAUSE. | 155 // The return value for GCS_RESULTCLAUSE. |
155 uint32 result_clauses_[2]; | 156 uint32_t result_clauses_[2]; |
156 | 157 |
157 // The return value for GCS_CURSORPOS. | 158 // The return value for GCS_CURSORPOS. |
158 int cursor_position_; | 159 int cursor_position_; |
159 | 160 |
160 // The return value for GCS_DELTASTART. | 161 // The return value for GCS_DELTASTART. |
161 int delta_start_; | 162 int delta_start_; |
162 | 163 |
163 // Whether we are composing text. This variable is used for sending a | 164 // Whether we are composing text. This variable is used for sending a |
164 // WM_IME_STARTCOMPOSITION message when we start composing IME text. | 165 // WM_IME_STARTCOMPOSITION message when we start composing IME text. |
165 bool composing_text_; | 166 bool composing_text_; |
166 | 167 |
167 // Whether a plugin supports IME messages. When a plugin cannot handle | 168 // Whether a plugin supports IME messages. When a plugin cannot handle |
168 // IME messages, we need to send the IME text with WM_CHAR messages as Windows | 169 // IME messages, we need to send the IME text with WM_CHAR messages as Windows |
169 // does. | 170 // does. |
170 bool support_ime_messages_; | 171 bool support_ime_messages_; |
171 | 172 |
172 // The IME status received from a plugin. | 173 // The IME status received from a plugin. |
173 bool status_updated_; | 174 bool status_updated_; |
174 int input_type_; | 175 int input_type_; |
175 gfx::Rect caret_rect_; | 176 gfx::Rect caret_rect_; |
176 | 177 |
177 // The pointer to the WebPluginIMEWin instance used by patch functions. | 178 // The pointer to the WebPluginIMEWin instance used by patch functions. |
178 static WebPluginIMEWin* instance_; | 179 static WebPluginIMEWin* instance_; |
179 }; | 180 }; |
180 | 181 |
181 } // namespace content | 182 } // namespace content |
182 | 183 |
183 #endif // CONTENT_CHILD_NPAPI_WEBPLUGIN_IME_WIN_H_ | 184 #endif // CONTENT_CHILD_NPAPI_WEBPLUGIN_IME_WIN_H_ |
OLD | NEW |