| Index: content/browser/browser_plugin/browser_plugin_guest.cc
|
| diff --git a/content/browser/browser_plugin/browser_plugin_guest.cc b/content/browser/browser_plugin/browser_plugin_guest.cc
|
| index f07bd61ae8784b909f44604056d398ff05c82fbd..22067616fbba67ed6772ee171d1a3292d2dabd0f 100644
|
| --- a/content/browser/browser_plugin/browser_plugin_guest.cc
|
| +++ b/content/browser/browser_plugin/browser_plugin_guest.cc
|
| @@ -513,6 +513,10 @@ bool BrowserPluginGuest::OnMessageReceivedFromEmbedder(
|
| OnExecuteEditCommand)
|
| IPC_MESSAGE_HANDLER(BrowserPluginHostMsg_HandleInputEvent,
|
| OnHandleInputEvent)
|
| + IPC_MESSAGE_HANDLER(BrowserPluginHostMsg_ImeConfirmComposition,
|
| + OnImeConfirmComposition)
|
| + IPC_MESSAGE_HANDLER(BrowserPluginHostMsg_ImeSetComposition,
|
| + OnImeSetComposition)
|
| IPC_MESSAGE_HANDLER(BrowserPluginHostMsg_LockMouse_ACK, OnLockMouseAck)
|
| IPC_MESSAGE_HANDLER(BrowserPluginHostMsg_NavigateGuest, OnNavigateGuest)
|
| IPC_MESSAGE_HANDLER(BrowserPluginHostMsg_PluginDestroyed, OnPluginDestroyed)
|
| @@ -1115,6 +1119,8 @@ bool BrowserPluginGuest::ShouldForwardToBrowserPluginGuest(
|
| case BrowserPluginHostMsg_DragStatusUpdate::ID:
|
| case BrowserPluginHostMsg_ExecuteEditCommand::ID:
|
| case BrowserPluginHostMsg_HandleInputEvent::ID:
|
| + case BrowserPluginHostMsg_ImeConfirmComposition::ID:
|
| + case BrowserPluginHostMsg_ImeSetComposition::ID:
|
| case BrowserPluginHostMsg_LockMouse_ACK::ID:
|
| case BrowserPluginHostMsg_NavigateGuest::ID:
|
| case BrowserPluginHostMsg_PluginDestroyed::ID:
|
| @@ -1150,6 +1156,14 @@ bool BrowserPluginGuest::OnMessageReceived(const IPC::Message& message) {
|
| #endif
|
| IPC_MESSAGE_HANDLER(ViewHostMsg_ShowWidget, OnShowWidget)
|
| IPC_MESSAGE_HANDLER(ViewHostMsg_TakeFocus, OnTakeFocus)
|
| + IPC_MESSAGE_HANDLER(ViewHostMsg_TextInputTypeChanged,
|
| + OnTextInputTypeChanged)
|
| + IPC_MESSAGE_HANDLER(ViewHostMsg_ImeCancelComposition,
|
| + OnImeCancelComposition)
|
| +#if defined(OS_MACOSX) || defined(OS_WIN) || defined(USE_AURA)
|
| + IPC_MESSAGE_HANDLER(ViewHostMsg_ImeCompositionRangeChanged,
|
| + OnImeCompositionRangeChanged)
|
| +#endif
|
| IPC_MESSAGE_HANDLER(ViewHostMsg_UnlockMouse, OnUnlockMouse)
|
| IPC_MESSAGE_HANDLER(ViewHostMsg_UpdateFrameName, OnUpdateFrameName)
|
| IPC_MESSAGE_HANDLER(ViewHostMsg_UpdateRect, OnUpdateRect)
|
| @@ -1258,6 +1272,27 @@ void BrowserPluginGuest::OnExecuteEditCommand(int instance_id,
|
| Send(new InputMsg_ExecuteEditCommand(routing_id(), name, std::string()));
|
| }
|
|
|
| +void BrowserPluginGuest::OnImeSetComposition(
|
| + int instance_id,
|
| + const std::string& text,
|
| + const std::vector<blink::WebCompositionUnderline>& underlines,
|
| + int selection_start,
|
| + int selection_end) {
|
| + Send(new ViewMsg_ImeSetComposition(routing_id(),
|
| + UTF8ToUTF16(text), underlines,
|
| + selection_start, selection_end));
|
| +}
|
| +
|
| +void BrowserPluginGuest::OnImeConfirmComposition(
|
| + int instance_id,
|
| + const std::string& text,
|
| + bool keep_selection) {
|
| + Send(new ViewMsg_ImeConfirmComposition(routing_id(),
|
| + UTF8ToUTF16(text),
|
| + gfx::Range::InvalidRange(),
|
| + keep_selection));
|
| +}
|
| +
|
| void BrowserPluginGuest::OnReclaimCompositorResources(
|
| int instance_id,
|
| int route_id,
|
| @@ -1744,6 +1779,31 @@ void BrowserPluginGuest::OnUpdateRect(
|
| new BrowserPluginMsg_UpdateRect(instance_id(), relay_params));
|
| }
|
|
|
| +void BrowserPluginGuest::OnTextInputTypeChanged(ui::TextInputType type,
|
| + ui::TextInputMode input_mode,
|
| + bool can_compose_inline) {
|
| + RenderWidgetHostImpl* render_widget_host =
|
| +
|
| + RenderWidgetHostImpl::From(GetWebContents()->GetRenderViewHost());
|
| + render_widget_host->ChangeTextInputType(type, input_mode, can_compose_inline);
|
| +}
|
| +
|
| +void BrowserPluginGuest::OnImeCancelComposition() {
|
| + RenderWidgetHostImpl* render_widget_host =
|
| + RenderWidgetHostImpl::From(GetWebContents()->GetRenderViewHost());
|
| + render_widget_host->CancelImeComposition();
|
| +}
|
| +
|
| +#if defined(OS_MACOSX) || defined(OS_WIN) || defined(USE_AURA)
|
| +void BrowserPluginGuest::OnImeCompositionRangeChanged(
|
| + const gfx::Range& range,
|
| + const std::vector<gfx::Rect>& character_bounds) {
|
| + RenderWidgetHostImpl* render_widget_host =
|
| + RenderWidgetHostImpl::From(GetWebContents()->GetRenderViewHost());
|
| + render_widget_host->ChangeImeCompositionRange(range, character_bounds);
|
| +}
|
| +#endif
|
| +
|
| void BrowserPluginGuest::DidRetrieveDownloadURLFromRequestId(
|
| const std::string& request_method,
|
| const base::Callback<void(bool)>& callback,
|
|
|