Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(171)

Side by Side Diff: content/browser/browser_plugin/browser_plugin_guest.cc

Issue 2884243003: Add a mojo channel for frame messages. (Closed)
Patch Set: Fix presubmit warning I ignored Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « content/browser/android/ime_adapter_android.cc ('k') | content/browser/frame_host/input/OWNERS » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 880 matching lines...) Expand 10 before | Expand all | Expand 10 after
891 last_drag_status_ = drag_status; 891 last_drag_status_ = drag_status;
892 EndSystemDragIfApplicable(); 892 EndSystemDragIfApplicable();
893 } 893 }
894 894
895 void BrowserPluginGuest::OnExecuteEditCommand(int browser_plugin_instance_id, 895 void BrowserPluginGuest::OnExecuteEditCommand(int browser_plugin_instance_id,
896 const std::string& name) { 896 const std::string& name) {
897 RenderFrameHost* focused_frame = web_contents()->GetFocusedFrame(); 897 RenderFrameHost* focused_frame = web_contents()->GetFocusedFrame();
898 if (!focused_frame) 898 if (!focused_frame)
899 return; 899 return;
900 900
901 focused_frame->Send(new InputMsg_ExecuteNoValueEditCommand( 901 focused_frame->GetFrameInputHandler()->ExecuteEditCommand(name,
902 focused_frame->GetRoutingID(), name)); 902 base::nullopt);
903 } 903 }
904 904
905 void BrowserPluginGuest::OnImeSetComposition( 905 void BrowserPluginGuest::OnImeSetComposition(
906 int browser_plugin_instance_id, 906 int browser_plugin_instance_id,
907 const BrowserPluginHostMsg_SetComposition_Params& params) { 907 const BrowserPluginHostMsg_SetComposition_Params& params) {
908 Send(new InputMsg_ImeSetComposition( 908 Send(new InputMsg_ImeSetComposition(
909 routing_id(), params.text, params.underlines, params.replacement_range, 909 routing_id(), params.text, params.underlines, params.replacement_range,
910 params.selection_start, params.selection_end)); 910 params.selection_start, params.selection_end));
911 } 911 }
912 912
(...skipping 14 matching lines...) Expand all
927 Send(new InputMsg_ImeFinishComposingText(routing_id(), keep_selection)); 927 Send(new InputMsg_ImeFinishComposingText(routing_id(), keep_selection));
928 } 928 }
929 929
930 void BrowserPluginGuest::OnExtendSelectionAndDelete( 930 void BrowserPluginGuest::OnExtendSelectionAndDelete(
931 int browser_plugin_instance_id, 931 int browser_plugin_instance_id,
932 int before, 932 int before,
933 int after) { 933 int after) {
934 RenderFrameHostImpl* rfh = static_cast<RenderFrameHostImpl*>( 934 RenderFrameHostImpl* rfh = static_cast<RenderFrameHostImpl*>(
935 web_contents()->GetFocusedFrame()); 935 web_contents()->GetFocusedFrame());
936 if (rfh) 936 if (rfh)
937 rfh->ExtendSelectionAndDelete(before, after); 937 rfh->GetFrameInputHandler()->ExtendSelectionAndDelete(before, after);
938 } 938 }
939 939
940 void BrowserPluginGuest::OnLockMouse(bool user_gesture, 940 void BrowserPluginGuest::OnLockMouse(bool user_gesture,
941 bool last_unlocked_by_target, 941 bool last_unlocked_by_target,
942 bool privileged) { 942 bool privileged) {
943 if (pending_lock_request_) { 943 if (pending_lock_request_) {
944 // Immediately reject the lock because only one pointerLock may be active 944 // Immediately reject the lock because only one pointerLock may be active
945 // at a time. 945 // at a time.
946 Send(new ViewMsg_LockMouse_ACK(routing_id(), false)); 946 Send(new ViewMsg_LockMouse_ACK(routing_id(), false));
947 return; 947 return;
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after
1072 range, character_bounds); 1072 range, character_bounds);
1073 } 1073 }
1074 #endif 1074 #endif
1075 1075
1076 void BrowserPluginGuest::SetContextMenuPosition(const gfx::Point& position) { 1076 void BrowserPluginGuest::SetContextMenuPosition(const gfx::Point& position) {
1077 if (delegate_) 1077 if (delegate_)
1078 delegate_->SetContextMenuPosition(position); 1078 delegate_->SetContextMenuPosition(position);
1079 } 1079 }
1080 1080
1081 } // namespace content 1081 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/android/ime_adapter_android.cc ('k') | content/browser/frame_host/input/OWNERS » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698