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

Unified Diff: chrome/renderer/render_view.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/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
diff --git a/chrome/renderer/render_view.cc b/chrome/renderer/render_view.cc
index 0ca365031605e5e2db6e3ce8cb89f94dd3b297f2..125e4d52af8e13daa82ccc4b4ca3c8254c2f7b23 100644
--- a/chrome/renderer/render_view.cc
+++ b/chrome/renderer/render_view.cc
@@ -789,6 +789,8 @@ void RenderView::OnMessageReceived(const IPC::Message& message) {
#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)
@@ -4872,6 +4874,17 @@ void RenderView::OnWindowFrameChanged(const gfx::Rect& window_frame,
(*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(
@@ -5794,6 +5807,15 @@ void RenderView::EnsureDocumentTag() {
}
#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