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 894 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
905 void BrowserPluginGuest::OnImeCommitText( | 905 void BrowserPluginGuest::OnImeCommitText( |
906 int browser_plugin_instance_id, | 906 int browser_plugin_instance_id, |
907 const base::string16& text, | 907 const base::string16& text, |
908 const std::vector<blink::WebCompositionUnderline>& underlines, | 908 const std::vector<blink::WebCompositionUnderline>& underlines, |
909 const gfx::Range& replacement_range, | 909 const gfx::Range& replacement_range, |
910 int relative_cursor_pos) { | 910 int relative_cursor_pos) { |
911 Send(new InputMsg_ImeCommitText(routing_id(), text, underlines, | 911 Send(new InputMsg_ImeCommitText(routing_id(), text, underlines, |
912 replacement_range, relative_cursor_pos)); | 912 replacement_range, relative_cursor_pos)); |
913 } | 913 } |
914 | 914 |
915 void BrowserPluginGuest::OnImeFinishComposingText(bool keep_selection) { | 915 void BrowserPluginGuest::OnImeFinishComposingText(int instance_id, |
nasko
2017/05/19 19:44:51
nit: I would've used browser_plugin_instance_id, t
EhsanK
2017/05/22 14:28:01
Thanks! Done.
| |
916 bool keep_selection) { | |
917 DCHECK_EQ(browser_plugin_instance_id_, instance_id); | |
916 Send(new InputMsg_ImeFinishComposingText(routing_id(), keep_selection)); | 918 Send(new InputMsg_ImeFinishComposingText(routing_id(), keep_selection)); |
917 } | 919 } |
918 | 920 |
919 void BrowserPluginGuest::OnExtendSelectionAndDelete( | 921 void BrowserPluginGuest::OnExtendSelectionAndDelete( |
920 int browser_plugin_instance_id, | 922 int browser_plugin_instance_id, |
921 int before, | 923 int before, |
922 int after) { | 924 int after) { |
923 RenderFrameHostImpl* rfh = static_cast<RenderFrameHostImpl*>( | 925 RenderFrameHostImpl* rfh = static_cast<RenderFrameHostImpl*>( |
924 web_contents()->GetFocusedFrame()); | 926 web_contents()->GetFocusedFrame()); |
925 if (rfh) | 927 if (rfh) |
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1061 range, character_bounds); | 1063 range, character_bounds); |
1062 } | 1064 } |
1063 #endif | 1065 #endif |
1064 | 1066 |
1065 void BrowserPluginGuest::SetContextMenuPosition(const gfx::Point& position) { | 1067 void BrowserPluginGuest::SetContextMenuPosition(const gfx::Point& position) { |
1066 if (delegate_) | 1068 if (delegate_) |
1067 delegate_->SetContextMenuPosition(position); | 1069 delegate_->SetContextMenuPosition(position); |
1068 } | 1070 } |
1069 | 1071 |
1070 } // namespace content | 1072 } // namespace content |
OLD | NEW |