OLD | NEW |
1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "content/renderer/browser_plugin/browser_plugin.h" | 5 #include "content/renderer/browser_plugin/browser_plugin.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 #include <utility> | 8 #include <utility> |
9 | 9 |
10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
(...skipping 513 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
524 text.utf8(), | 524 text.utf8(), |
525 std_underlines, | 525 std_underlines, |
526 selectionStart, | 526 selectionStart, |
527 selectionEnd)); | 527 selectionEnd)); |
528 // TODO(kochi): This assumes the IPC handling always succeeds. | 528 // TODO(kochi): This assumes the IPC handling always succeeds. |
529 return true; | 529 return true; |
530 } | 530 } |
531 | 531 |
532 bool BrowserPlugin::confirmComposition( | 532 bool BrowserPlugin::confirmComposition( |
533 const blink::WebString& text, | 533 const blink::WebString& text, |
534 blink::WebWidget::ConfirmCompositionBehavior selectionBehavior) { | 534 blink::WebWidget::ConfirmCompositionBehavior selectionBehavior, |
| 535 int newCursorPosition) { |
535 if (!attached()) | 536 if (!attached()) |
536 return false; | 537 return false; |
537 bool keep_selection = (selectionBehavior == blink::WebWidget::KeepSelection); | 538 bool keep_selection = (selectionBehavior == blink::WebWidget::KeepSelection); |
538 BrowserPluginManager::Get()->Send( | 539 BrowserPluginManager::Get()->Send( |
539 new BrowserPluginHostMsg_ImeConfirmComposition( | 540 new BrowserPluginHostMsg_ImeConfirmComposition( |
540 browser_plugin_instance_id_, | 541 browser_plugin_instance_id_, |
541 text.utf8(), | 542 text.utf8(), |
542 keep_selection)); | 543 keep_selection, |
| 544 newCursorPosition)); |
543 // TODO(kochi): This assumes the IPC handling always succeeds. | 545 // TODO(kochi): This assumes the IPC handling always succeeds. |
544 return true; | 546 return true; |
545 } | 547 } |
546 | 548 |
547 void BrowserPlugin::extendSelectionAndDelete(int before, int after) { | 549 void BrowserPlugin::extendSelectionAndDelete(int before, int after) { |
548 if (!attached()) | 550 if (!attached()) |
549 return; | 551 return; |
550 BrowserPluginManager::Get()->Send( | 552 BrowserPluginManager::Get()->Send( |
551 new BrowserPluginHostMsg_ExtendSelectionAndDelete( | 553 new BrowserPluginHostMsg_ExtendSelectionAndDelete( |
552 browser_plugin_instance_id_, | 554 browser_plugin_instance_id_, |
(...skipping 16 matching lines...) Expand all Loading... |
569 | 571 |
570 bool BrowserPlugin::HandleMouseLockedInputEvent( | 572 bool BrowserPlugin::HandleMouseLockedInputEvent( |
571 const blink::WebMouseEvent& event) { | 573 const blink::WebMouseEvent& event) { |
572 BrowserPluginManager::Get()->Send( | 574 BrowserPluginManager::Get()->Send( |
573 new BrowserPluginHostMsg_HandleInputEvent(browser_plugin_instance_id_, | 575 new BrowserPluginHostMsg_HandleInputEvent(browser_plugin_instance_id_, |
574 &event)); | 576 &event)); |
575 return true; | 577 return true; |
576 } | 578 } |
577 | 579 |
578 } // namespace content | 580 } // namespace content |
OLD | NEW |