| Index: content/renderer/browser_plugin/browser_plugin.cc
|
| diff --git a/content/renderer/browser_plugin/browser_plugin.cc b/content/renderer/browser_plugin/browser_plugin.cc
|
| index 0bc0f04e9e05cc27ef665189b1e7c15276a19882..ce2ebc045234c37beb5ac0c0cc2729ad3517f377 100644
|
| --- a/content/renderer/browser_plugin/browser_plugin.cc
|
| +++ b/content/renderer/browser_plugin/browser_plugin.cc
|
| @@ -37,6 +37,7 @@
|
| #include "third_party/WebKit/public/web/WebPluginParams.h"
|
| #include "third_party/WebKit/public/web/WebScriptSource.h"
|
| #include "third_party/WebKit/public/web/WebView.h"
|
| +#include "third_party/WebKit/public/web/WebWidget.h"
|
| #include "ui/events/keycodes/keyboard_codes.h"
|
|
|
| #if defined (OS_WIN)
|
| @@ -965,6 +966,10 @@ bool BrowserPlugin::supportsEditCommands() const {
|
| return true;
|
| }
|
|
|
| +bool BrowserPlugin::supportsInputMethod() const {
|
| + return true;
|
| +}
|
| +
|
| bool BrowserPlugin::canProcessDrag() const {
|
| return true;
|
| }
|
| @@ -1317,6 +1322,43 @@ bool BrowserPlugin::executeEditCommand(const blink::WebString& name,
|
| return true;
|
| }
|
|
|
| +bool BrowserPlugin::setComposition(
|
| + const blink::WebString& text,
|
| + const blink::WebVector<blink::WebCompositionUnderline>& underlines,
|
| + int selectionStart,
|
| + int selectionEnd) {
|
| + if (!HasGuestInstanceID())
|
| + return false;
|
| + std::vector<blink::WebCompositionUnderline> std_underlines;
|
| + for (size_t i = 0; i < underlines.size(); ++i) {
|
| + std_underlines.push_back(underlines[i]);
|
| + }
|
| + browser_plugin_manager()->Send(new BrowserPluginHostMsg_ImeSetComposition(
|
| + render_view_routing_id_,
|
| + guest_instance_id_,
|
| + text.utf8(),
|
| + std_underlines,
|
| + selectionStart,
|
| + selectionEnd));
|
| + // TODO(kochi): This assumes the IPC handling always succeeds.
|
| + return true;
|
| +}
|
| +
|
| +bool BrowserPlugin::confirmComposition(
|
| + const blink::WebString& text,
|
| + blink::WebWidget::ConfirmCompositionBehavior selectionBehavior) {
|
| + if (!HasGuestInstanceID())
|
| + return false;
|
| + bool keep_selection = (selectionBehavior == blink::WebWidget::KeepSelection);
|
| + browser_plugin_manager()->Send(new BrowserPluginHostMsg_ImeConfirmComposition(
|
| + render_view_routing_id_,
|
| + guest_instance_id_,
|
| + text.utf8(),
|
| + keep_selection));
|
| + // TODO(kochi): This assumes the IPC handling always succeeds.
|
| + return true;
|
| +}
|
| +
|
| void BrowserPlugin::OnLockMouseACK(bool succeeded) {
|
| mouse_locked_ = succeeded;
|
| browser_plugin_manager()->Send(new BrowserPluginHostMsg_LockMouse_ACK(
|
|
|