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 844 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
855 const std::string& text, | 855 const std::string& text, |
856 const std::vector<blink::WebCompositionUnderline>& underlines, | 856 const std::vector<blink::WebCompositionUnderline>& underlines, |
857 int selection_start, | 857 int selection_start, |
858 int selection_end) { | 858 int selection_end) { |
859 Send(new InputMsg_ImeSetComposition(routing_id(), | 859 Send(new InputMsg_ImeSetComposition(routing_id(), |
860 base::UTF8ToUTF16(text), underlines, | 860 base::UTF8ToUTF16(text), underlines, |
861 gfx::Range::InvalidRange(), | 861 gfx::Range::InvalidRange(), |
862 selection_start, selection_end)); | 862 selection_start, selection_end)); |
863 } | 863 } |
864 | 864 |
865 void BrowserPluginGuest::OnImeConfirmComposition( | 865 void BrowserPluginGuest::OnImeConfirmComposition(int browser_plugin_instance_id, |
866 int browser_plugin_instance_id, | 866 const std::string& text, |
867 const std::string& text, | 867 bool keep_selection, |
868 bool keep_selection) { | 868 int relative_cursor_pos) { |
869 Send(new InputMsg_ImeConfirmComposition(routing_id(), | 869 Send(new InputMsg_ImeConfirmComposition(routing_id(), base::UTF8ToUTF16(text), |
870 base::UTF8ToUTF16(text), | |
871 gfx::Range::InvalidRange(), | 870 gfx::Range::InvalidRange(), |
872 keep_selection)); | 871 keep_selection, relative_cursor_pos)); |
873 } | 872 } |
874 | 873 |
875 void BrowserPluginGuest::OnExtendSelectionAndDelete( | 874 void BrowserPluginGuest::OnExtendSelectionAndDelete( |
876 int browser_plugin_instance_id, | 875 int browser_plugin_instance_id, |
877 int before, | 876 int before, |
878 int after) { | 877 int after) { |
879 RenderFrameHostImpl* rfh = static_cast<RenderFrameHostImpl*>( | 878 RenderFrameHostImpl* rfh = static_cast<RenderFrameHostImpl*>( |
880 web_contents()->GetFocusedFrame()); | 879 web_contents()->GetFocusedFrame()); |
881 if (rfh) | 880 if (rfh) |
882 rfh->ExtendSelectionAndDelete(before, after); | 881 rfh->ExtendSelectionAndDelete(before, after); |
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1017 range, character_bounds); | 1016 range, character_bounds); |
1018 } | 1017 } |
1019 #endif | 1018 #endif |
1020 | 1019 |
1021 void BrowserPluginGuest::SetContextMenuPosition(const gfx::Point& position) { | 1020 void BrowserPluginGuest::SetContextMenuPosition(const gfx::Point& position) { |
1022 if (delegate_) | 1021 if (delegate_) |
1023 delegate_->SetContextMenuPosition(position); | 1022 delegate_->SetContextMenuPosition(position); |
1024 } | 1023 } |
1025 | 1024 |
1026 } // namespace content | 1025 } // namespace content |
OLD | NEW |