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

Unified Diff: chrome/renderer/webplugin_delegate_proxy.cc

Issue 3808001: Implement IME for Mac plugins using the Cocoa event model on 10.6 (Closed)
Patch Set: Windows and unit test compile fixes Created 10 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/renderer/webplugin_delegate_proxy.h ('k') | third_party/mozilla/ComplexTextInputPanel.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/renderer/webplugin_delegate_proxy.cc
diff --git a/chrome/renderer/webplugin_delegate_proxy.cc b/chrome/renderer/webplugin_delegate_proxy.cc
index 708bbc985bb9e2f95e559ab16ac549fcd86e535e..f4229ff0a8f911bfa8d1eba7c93f800238b8962d 100644
--- a/chrome/renderer/webplugin_delegate_proxy.cc
+++ b/chrome/renderer/webplugin_delegate_proxy.cc
@@ -462,6 +462,8 @@ void WebPluginDelegateProxy::OnMessageReceived(const IPC::Message& msg) {
OnDeferResourceLoading)
#if defined(OS_MACOSX)
+ IPC_MESSAGE_HANDLER(PluginHostMsg_SetImeEnabled,
+ OnSetImeEnabled);
IPC_MESSAGE_HANDLER(PluginHostMsg_BindFakePluginWindowHandle,
OnBindFakePluginWindowHandle);
IPC_MESSAGE_HANDLER(PluginHostMsg_UpdateGeometry_ACK,
@@ -1015,6 +1017,18 @@ void WebPluginDelegateProxy::WindowFrameChanged(gfx::Rect window_frame,
msg->set_unblock(true);
Send(msg);
}
+void WebPluginDelegateProxy::ImeCompositionConfirmed(const string16& text,
+ int plugin_id) {
+ // If the text isn't intended for this plugin, there's nothing to do.
+ if (instance_id_ != plugin_id)
+ return;
+
+ IPC::Message* msg = new PluginMsg_ImeCompositionConfirmed(instance_id_,
+ text);
+ // Order relative to other key events is important.
+ msg->set_unblock(true);
+ Send(msg);
+}
#endif // OS_MACOSX
void WebPluginDelegateProxy::OnSetWindow(gfx::PluginWindowHandle window) {
@@ -1363,6 +1377,11 @@ WebPluginDelegateProxy::CreateSeekableResourceClient(
}
#if defined(OS_MACOSX)
+void WebPluginDelegateProxy::OnSetImeEnabled(bool enabled) {
+ if (render_view_)
+ render_view_->SetPluginImeEnabled(enabled, instance_id_);
+}
+
void WebPluginDelegateProxy::OnBindFakePluginWindowHandle(bool opaque) {
BindFakePluginWindowHandle(opaque);
}
« no previous file with comments | « chrome/renderer/webplugin_delegate_proxy.h ('k') | third_party/mozilla/ComplexTextInputPanel.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698