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

Unified Diff: chrome/renderer/render_view.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/render_view.h ('k') | chrome/renderer/webplugin_delegate_proxy.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/renderer/render_view.cc
===================================================================
--- chrome/renderer/render_view.cc (revision 62862)
+++ chrome/renderer/render_view.cc (working copy)
@@ -789,6 +789,8 @@
#if defined(OS_MACOSX)
IPC_MESSAGE_HANDLER(ViewMsg_SetWindowVisibility, OnSetWindowVisibility)
IPC_MESSAGE_HANDLER(ViewMsg_WindowFrameChanged, OnWindowFrameChanged)
+ IPC_MESSAGE_HANDLER(ViewMsg_PluginImeCompositionConfirmed,
+ OnPluginImeCompositionConfirmed)
#endif
IPC_MESSAGE_HANDLER(ViewMsg_SetEditCommandsForNextKeyEvent,
OnSetEditCommandsForNextKeyEvent)
@@ -4875,6 +4877,17 @@
(*plugin_it)->WindowFrameChanged(window_frame, view_frame);
}
}
+
+void RenderView::OnPluginImeCompositionConfirmed(const string16& text,
+ int plugin_id) {
+ // WebPluginDelegateProxy is responsible for figuring out if this text
+ // applies to it or not, so inform all the delegates.
+ std::set<WebPluginDelegateProxy*>::iterator plugin_it;
+ for (plugin_it = plugin_delegates_.begin();
+ plugin_it != plugin_delegates_.end(); ++plugin_it) {
+ (*plugin_it)->ImeCompositionConfirmed(text, plugin_id);
+ }
+}
#endif // OS_MACOSX
void RenderView::SendExtensionRequest(
@@ -5790,6 +5803,15 @@
}
#if defined(OS_MACOSX)
+void RenderView::SetPluginImeEnabled(bool enabled, int plugin_id) {
+ IPC::Message* msg = new ViewHostMsg_SetPluginImeEnabled(routing_id(),
+ enabled, plugin_id);
+ // This message can be sent during event-handling, and needs to be delivered
+ // within that context.
+ msg->set_unblock(true);
+ Send(msg);
+}
+
gfx::PluginWindowHandle RenderView::AllocateFakePluginWindowHandle(
bool opaque, bool root) {
gfx::PluginWindowHandle window = NULL;
« no previous file with comments | « chrome/renderer/render_view.h ('k') | chrome/renderer/webplugin_delegate_proxy.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698