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

Unified Diff: webkit/plugins/npapi/webplugin_delegate_impl.h

Issue 7082034: Send IME events to windowless plug-ins (Chromium side) (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 7 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 side-by-side diff with in-line comments
Download patch
Index: webkit/plugins/npapi/webplugin_delegate_impl.h
===================================================================
--- webkit/plugins/npapi/webplugin_delegate_impl.h (revision 87397)
+++ webkit/plugins/npapi/webplugin_delegate_impl.h (working copy)
@@ -55,6 +55,10 @@
#endif // NP_NO_QUICKDRAW
#endif // OS_MACOSX
+#if defined(OS_WIN)
+class WebPluginIMEWin;
+#endif // OS_WIN
+
// An implementation of WebPluginDelegate that runs in the plugin process,
// proxied from the renderer by WebPluginDelegateProxy.
class WebPluginDelegateImpl : public WebPluginDelegate {
@@ -77,6 +81,7 @@
PLUGIN_QUIRK_HANDLE_MOUSE_CAPTURE = 16384, // Windows
PLUGIN_QUIRK_WINDOWLESS_NO_RIGHT_CLICK = 32768, // Linux
PLUGIN_QUIRK_IGNORE_FIRST_SETWINDOW_CALL = 65536, // Windows.
+ PLUGIN_QUIRK_EMULATE_IME = 131072, // Windows.
};
static WebPluginDelegateImpl* Create(const FilePath& filename,
@@ -140,6 +145,11 @@
// Informs the plugin that the view it is in has gained or lost focus.
void SetContentAreaHasFocus(bool has_focus);
+#if defined(OS_WIN)
+ // Returns the IME status retrieved from a plug-in.
+ bool GetIMEStatus(int* input_type, gfx::Rect* caret_rect);
+#endif
+
#if defined(OS_MACOSX)
// Informs the plugin that the geometry has changed, as with UpdateGeometry,
// but also includes the new buffer context for that new geometry.
@@ -311,6 +321,10 @@
// Used to throttle WM_USER+1 messages in Flash.
uint32 last_message_;
bool is_calling_wndproc;
+
+ // An IME emulator used by a windowless plug-in to retrieve IME data through
+ // IMM32 functions.
+ scoped_ptr<WebPluginIMEWin> plugin_ime_;
#endif // defined(OS_WIN)
#if defined(USE_X11)
@@ -376,6 +390,9 @@
HKEY key, DWORD index, LPWSTR name, LPDWORD name_size, LPDWORD reserved,
LPWSTR class_name, LPDWORD class_size, PFILETIME last_write_time);
+ // GetProcAddress intercepter for windowless plugins.
+ static FARPROC WINAPI GetProcAddressPatch(HMODULE module, LPCSTR name);
+
// The mouse hook proc which handles mouse capture in windowed plugins.
static LRESULT CALLBACK MouseHookProc(int code, WPARAM wParam,
LPARAM lParam);

Powered by Google App Engine
This is Rietveld 408576698