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 858 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
869 Send(new InputMsg_ImeConfirmComposition(routing_id(), | 869 Send(new InputMsg_ImeConfirmComposition(routing_id(), |
870 base::UTF8ToUTF16(text), | 870 base::UTF8ToUTF16(text), |
871 gfx::Range::InvalidRange(), | 871 gfx::Range::InvalidRange(), |
872 keep_selection)); | 872 keep_selection)); |
873 } | 873 } |
874 | 874 |
875 void BrowserPluginGuest::OnExtendSelectionAndDelete( | 875 void BrowserPluginGuest::OnExtendSelectionAndDelete( |
876 int browser_plugin_instance_id, | 876 int browser_plugin_instance_id, |
877 int before, | 877 int before, |
878 int after) { | 878 int after) { |
879 RenderFrameHostImpl* rfh = static_cast<RenderFrameHostImpl*>( | 879 Send(new InputMsg_ImeExtendSelectionAndDelete(routing_id(), before, after)); |
880 web_contents()->GetFocusedFrame()); | |
881 if (rfh) | |
882 rfh->ExtendSelectionAndDelete(before, after); | |
883 } | 880 } |
884 | 881 |
885 void BrowserPluginGuest::OnLockMouse(bool user_gesture, | 882 void BrowserPluginGuest::OnLockMouse(bool user_gesture, |
886 bool last_unlocked_by_target, | 883 bool last_unlocked_by_target, |
887 bool privileged) { | 884 bool privileged) { |
888 if (pending_lock_request_) { | 885 if (pending_lock_request_) { |
889 // Immediately reject the lock because only one pointerLock may be active | 886 // Immediately reject the lock because only one pointerLock may be active |
890 // at a time. | 887 // at a time. |
891 Send(new ViewMsg_LockMouse_ACK(routing_id(), false)); | 888 Send(new ViewMsg_LockMouse_ACK(routing_id(), false)); |
892 return; | 889 return; |
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1017 range, character_bounds); | 1014 range, character_bounds); |
1018 } | 1015 } |
1019 #endif | 1016 #endif |
1020 | 1017 |
1021 void BrowserPluginGuest::SetContextMenuPosition(const gfx::Point& position) { | 1018 void BrowserPluginGuest::SetContextMenuPosition(const gfx::Point& position) { |
1022 if (delegate_) | 1019 if (delegate_) |
1023 delegate_->SetContextMenuPosition(position); | 1020 delegate_->SetContextMenuPosition(position); |
1024 } | 1021 } |
1025 | 1022 |
1026 } // namespace content | 1023 } // namespace content |
OLD | NEW |