| 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 586 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 597 } | 597 } |
| 598 | 598 |
| 599 bool BrowserPlugin::FinishComposingText( | 599 bool BrowserPlugin::FinishComposingText( |
| 600 blink::WebInputMethodController::ConfirmCompositionBehavior | 600 blink::WebInputMethodController::ConfirmCompositionBehavior |
| 601 selection_behavior) { | 601 selection_behavior) { |
| 602 if (!attached()) | 602 if (!attached()) |
| 603 return false; | 603 return false; |
| 604 bool keep_selection = | 604 bool keep_selection = |
| 605 (selection_behavior == blink::WebInputMethodController::kKeepSelection); | 605 (selection_behavior == blink::WebInputMethodController::kKeepSelection); |
| 606 BrowserPluginManager::Get()->Send( | 606 BrowserPluginManager::Get()->Send( |
| 607 new BrowserPluginHostMsg_ImeFinishComposingText(keep_selection)); | 607 new BrowserPluginHostMsg_ImeFinishComposingText( |
| 608 browser_plugin_instance_id_, keep_selection)); |
| 608 // TODO(kochi): This assumes the IPC handling always succeeds. | 609 // TODO(kochi): This assumes the IPC handling always succeeds. |
| 609 return true; | 610 return true; |
| 610 } | 611 } |
| 611 | 612 |
| 612 void BrowserPlugin::ExtendSelectionAndDelete(int before, int after) { | 613 void BrowserPlugin::ExtendSelectionAndDelete(int before, int after) { |
| 613 if (!attached()) | 614 if (!attached()) |
| 614 return; | 615 return; |
| 615 BrowserPluginManager::Get()->Send( | 616 BrowserPluginManager::Get()->Send( |
| 616 new BrowserPluginHostMsg_ExtendSelectionAndDelete( | 617 new BrowserPluginHostMsg_ExtendSelectionAndDelete( |
| 617 browser_plugin_instance_id_, | 618 browser_plugin_instance_id_, |
| (...skipping 16 matching lines...) Expand all Loading... |
| 634 | 635 |
| 635 bool BrowserPlugin::HandleMouseLockedInputEvent( | 636 bool BrowserPlugin::HandleMouseLockedInputEvent( |
| 636 const blink::WebMouseEvent& event) { | 637 const blink::WebMouseEvent& event) { |
| 637 BrowserPluginManager::Get()->Send( | 638 BrowserPluginManager::Get()->Send( |
| 638 new BrowserPluginHostMsg_HandleInputEvent(browser_plugin_instance_id_, | 639 new BrowserPluginHostMsg_HandleInputEvent(browser_plugin_instance_id_, |
| 639 &event)); | 640 &event)); |
| 640 return true; | 641 return true; |
| 641 } | 642 } |
| 642 | 643 |
| 643 } // namespace content | 644 } // namespace content |
| OLD | NEW |