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 WEBKIT_PLUGINS_NPAPI_WEBPLUGIN_IME_WIN_H_ | 5 #ifndef CONTENT_CHILD_NPAPI_WEBPLUGIN_IME_WIN_H_ |
6 #define WEBKIT_PLUGINS_NPAPI_WEBPLUGIN_IME_WIN_H_ | 6 #define CONTENT_CHILD_NPAPI_WEBPLUGIN_IME_WIN_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
11 #include "base/basictypes.h" | 11 #include "base/basictypes.h" |
12 #include "base/strings/string16.h" | 12 #include "base/strings/string16.h" |
13 #include "third_party/npapi/bindings/npapi.h" | 13 #include "third_party/npapi/bindings/npapi.h" |
14 #include "ui/gfx/rect.h" | 14 #include "ui/gfx/rect.h" |
15 | 15 |
16 namespace webkit { | 16 namespace content { |
17 namespace npapi { | |
18 | 17 |
19 class PluginInstance; | 18 class PluginInstance; |
20 | 19 |
21 // A class that emulates an IME for windowless plug-ins. A windowless plug-in | 20 // A class that emulates an IME for windowless plug-ins. A windowless plug-in |
22 // does not have a window. Therefore, we cannot attach an IME to a windowless | 21 // does not have a window. Therefore, we cannot attach an IME to a windowless |
23 // plug-in. To allow such windowless plug-ins to use IMEs without any changes to | 22 // plug-in. To allow such windowless plug-ins to use IMEs without any changes to |
24 // them, this class receives the IME data from a browser and patches IMM32 | 23 // them, this class receives the IME data from a browser and patches IMM32 |
25 // functions to return the IME data when a windowless plug-in calls IMM32 | 24 // functions to return the IME data when a windowless plug-in calls IMM32 |
26 // functions. I would not Flash retrieves pointers to IMM32 functions with | 25 // functions. I would not Flash retrieves pointers to IMM32 functions with |
27 // GetProcAddress(), this class also needs a hook to GetProcAddress() to | 26 // GetProcAddress(), this class also needs a hook to GetProcAddress() to |
(...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
172 | 171 |
173 // The IME status received from a plug-in. | 172 // The IME status received from a plug-in. |
174 bool status_updated_; | 173 bool status_updated_; |
175 int input_type_; | 174 int input_type_; |
176 gfx::Rect caret_rect_; | 175 gfx::Rect caret_rect_; |
177 | 176 |
178 // The pointer to the WebPluginIMEWin instance used by patch functions. | 177 // The pointer to the WebPluginIMEWin instance used by patch functions. |
179 static WebPluginIMEWin* instance_; | 178 static WebPluginIMEWin* instance_; |
180 }; | 179 }; |
181 | 180 |
182 } // namespace npapi | 181 } // namespace content |
183 } // namespace webkit | |
184 | 182 |
185 #endif // WEBKIT_PLUGINS_NPAPI_WEBPLUGIN_IME_WIN_H_ | 183 #endif // CONTENT_CHILD_NPAPI_WEBPLUGIN_IME_WIN_H_ |
OLD | NEW |