OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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/browser/browser_plugin/browser_plugin_guest.h" | 5 #include "content/browser/browser_plugin/browser_plugin_guest.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 | 8 |
9 #include <algorithm> | 9 #include <algorithm> |
10 | 10 |
(...skipping 879 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
890 const std::string& text, | 890 const std::string& text, |
891 const std::vector<blink::WebCompositionUnderline>& underlines, | 891 const std::vector<blink::WebCompositionUnderline>& underlines, |
892 int selection_start, | 892 int selection_start, |
893 int selection_end) { | 893 int selection_end) { |
894 Send(new InputMsg_ImeSetComposition(routing_id(), | 894 Send(new InputMsg_ImeSetComposition(routing_id(), |
895 base::UTF8ToUTF16(text), underlines, | 895 base::UTF8ToUTF16(text), underlines, |
896 gfx::Range::InvalidRange(), | 896 gfx::Range::InvalidRange(), |
897 selection_start, selection_end)); | 897 selection_start, selection_end)); |
898 } | 898 } |
899 | 899 |
900 void BrowserPluginGuest::OnImeCommitText(int browser_plugin_instance_id, | 900 void BrowserPluginGuest::OnImeCommitText( |
901 const std::string& text, | 901 int browser_plugin_instance_id, |
902 int relative_cursor_pos) { | 902 const std::string& text, |
| 903 const std::vector<blink::WebCompositionUnderline>& underlines, |
| 904 int relative_cursor_pos) { |
903 Send(new InputMsg_ImeCommitText(routing_id(), base::UTF8ToUTF16(text), | 905 Send(new InputMsg_ImeCommitText(routing_id(), base::UTF8ToUTF16(text), |
904 gfx::Range::InvalidRange(), | 906 underlines, gfx::Range::InvalidRange(), |
905 relative_cursor_pos)); | 907 relative_cursor_pos)); |
906 } | 908 } |
907 | 909 |
908 void BrowserPluginGuest::OnImeFinishComposingText(bool keep_selection) { | 910 void BrowserPluginGuest::OnImeFinishComposingText(bool keep_selection) { |
909 Send(new InputMsg_ImeFinishComposingText(routing_id(), keep_selection)); | 911 Send(new InputMsg_ImeFinishComposingText(routing_id(), keep_selection)); |
910 } | 912 } |
911 | 913 |
912 void BrowserPluginGuest::OnExtendSelectionAndDelete( | 914 void BrowserPluginGuest::OnExtendSelectionAndDelete( |
913 int browser_plugin_instance_id, | 915 int browser_plugin_instance_id, |
914 int before, | 916 int before, |
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1054 range, character_bounds); | 1056 range, character_bounds); |
1055 } | 1057 } |
1056 #endif | 1058 #endif |
1057 | 1059 |
1058 void BrowserPluginGuest::SetContextMenuPosition(const gfx::Point& position) { | 1060 void BrowserPluginGuest::SetContextMenuPosition(const gfx::Point& position) { |
1059 if (delegate_) | 1061 if (delegate_) |
1060 delegate_->SetContextMenuPosition(position); | 1062 delegate_->SetContextMenuPosition(position); |
1061 } | 1063 } |
1062 | 1064 |
1063 } // namespace content | 1065 } // namespace content |
OLD | NEW |