| 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 ee32176a70ae9aa2bb1c0a9cb0555813d7545963..5f88fe142f983c74d932b0af5751c0780b168056 100644
|
| --- a/content/renderer/browser_plugin/browser_plugin.cc
|
| +++ b/content/renderer/browser_plugin/browser_plugin.cc
|
| @@ -984,6 +984,10 @@ bool BrowserPlugin::supportsEditCommands() const {
|
| return true;
|
| }
|
|
|
| +bool BrowserPlugin::supportsInputMethod() const {
|
| + return true;
|
| +}
|
| +
|
| bool BrowserPlugin::canProcessDrag() const {
|
| return true;
|
| }
|
| @@ -1337,6 +1341,54 @@ 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::extendSelectionAndDelete(int before, int after) {
|
| + if (!HasGuestInstanceID())
|
| + return;
|
| + browser_plugin_manager()->Send(
|
| + new BrowserPluginHostMsg_ExtendSelectionAndDelete(
|
| + render_view_routing_id_,
|
| + guest_instance_id_,
|
| + before,
|
| + after));
|
| +}
|
| +
|
| void BrowserPlugin::OnLockMouseACK(bool succeeded) {
|
| mouse_locked_ = succeeded;
|
| browser_plugin_manager()->Send(new BrowserPluginHostMsg_LockMouse_ACK(
|
|
|