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 834 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
845 const std::string& text, | 845 const std::string& text, |
846 const std::vector<blink::WebCompositionUnderline>& underlines, | 846 const std::vector<blink::WebCompositionUnderline>& underlines, |
847 int selection_start, | 847 int selection_start, |
848 int selection_end) { | 848 int selection_end) { |
849 Send(new InputMsg_ImeSetComposition(routing_id(), | 849 Send(new InputMsg_ImeSetComposition(routing_id(), |
850 base::UTF8ToUTF16(text), underlines, | 850 base::UTF8ToUTF16(text), underlines, |
851 gfx::Range::InvalidRange(), | 851 gfx::Range::InvalidRange(), |
852 selection_start, selection_end)); | 852 selection_start, selection_end)); |
853 } | 853 } |
854 | 854 |
855 void BrowserPluginGuest::OnImeConfirmComposition( | 855 void BrowserPluginGuest::OnImeConfirmComposition(int browser_plugin_instance_id, |
856 int browser_plugin_instance_id, | 856 const std::string& text, |
857 const std::string& text, | 857 bool keep_selection, |
858 bool keep_selection) { | 858 int newCursorPosition) { |
859 Send(new InputMsg_ImeConfirmComposition(routing_id(), | 859 Send(new InputMsg_ImeConfirmComposition(routing_id(), |
860 base::UTF8ToUTF16(text), | 860 base::UTF8ToUTF16(text), |
861 gfx::Range::InvalidRange(), | 861 gfx::Range::InvalidRange(), |
862 keep_selection)); | 862 keep_selection, |
| 863 newCursorPosition)); |
863 } | 864 } |
864 | 865 |
865 void BrowserPluginGuest::OnExtendSelectionAndDelete( | 866 void BrowserPluginGuest::OnExtendSelectionAndDelete( |
866 int browser_plugin_instance_id, | 867 int browser_plugin_instance_id, |
867 int before, | 868 int before, |
868 int after) { | 869 int after) { |
869 RenderFrameHostImpl* rfh = static_cast<RenderFrameHostImpl*>( | 870 RenderFrameHostImpl* rfh = static_cast<RenderFrameHostImpl*>( |
870 web_contents()->GetFocusedFrame()); | 871 web_contents()->GetFocusedFrame()); |
871 if (rfh) | 872 if (rfh) |
872 rfh->ExtendSelectionAndDelete(before, after); | 873 rfh->ExtendSelectionAndDelete(before, after); |
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1006 range, character_bounds); | 1007 range, character_bounds); |
1007 } | 1008 } |
1008 #endif | 1009 #endif |
1009 | 1010 |
1010 void BrowserPluginGuest::SetContextMenuPosition(const gfx::Point& position) { | 1011 void BrowserPluginGuest::SetContextMenuPosition(const gfx::Point& position) { |
1011 if (delegate_) | 1012 if (delegate_) |
1012 delegate_->SetContextMenuPosition(position); | 1013 delegate_->SetContextMenuPosition(position); |
1013 } | 1014 } |
1014 | 1015 |
1015 } // namespace content | 1016 } // namespace content |
OLD | NEW |