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

Unified Diff: chrome/renderer/webplugin_delegate_proxy.cc

Issue 3782012: Merge 62820 - Implement IME for Mac plugins using the Cocoa event model on 10... (Closed) Base URL: svn://svn.chromium.org/chrome/branches/552/src/
Patch Set: 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
===================================================================
--- chrome/renderer/webplugin_delegate_proxy.cc (revision 62862)
+++ chrome/renderer/webplugin_delegate_proxy.cc (working copy)
@@ -472,6 +472,8 @@
OnDeferResourceLoading)
#if defined(OS_MACOSX)
+ IPC_MESSAGE_HANDLER(PluginHostMsg_SetImeEnabled,
+ OnSetImeEnabled);
IPC_MESSAGE_HANDLER(PluginHostMsg_BindFakePluginWindowHandle,
OnBindFakePluginWindowHandle);
IPC_MESSAGE_HANDLER(PluginHostMsg_UpdateGeometry_ACK,
@@ -1025,6 +1027,18 @@
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) {
@@ -1373,6 +1387,11 @@
}
#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