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

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

Issue 1999423002: tyrbot test for commitText (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: SetHasCompositionTextToTrue Created 4 years, 3 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
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 238 matching lines...) Expand 10 before | Expand all | Expand 10 after
249 249
250 bool handled = true; 250 bool handled = true;
251 IPC_BEGIN_MESSAGE_MAP(BrowserPluginGuest, message) 251 IPC_BEGIN_MESSAGE_MAP(BrowserPluginGuest, message)
252 IPC_MESSAGE_HANDLER(BrowserPluginHostMsg_Detach, OnDetach) 252 IPC_MESSAGE_HANDLER(BrowserPluginHostMsg_Detach, OnDetach)
253 IPC_MESSAGE_HANDLER(BrowserPluginHostMsg_DragStatusUpdate, 253 IPC_MESSAGE_HANDLER(BrowserPluginHostMsg_DragStatusUpdate,
254 OnDragStatusUpdate) 254 OnDragStatusUpdate)
255 IPC_MESSAGE_HANDLER(BrowserPluginHostMsg_ExecuteEditCommand, 255 IPC_MESSAGE_HANDLER(BrowserPluginHostMsg_ExecuteEditCommand,
256 OnExecuteEditCommand) 256 OnExecuteEditCommand)
257 IPC_MESSAGE_HANDLER(BrowserPluginHostMsg_ExtendSelectionAndDelete, 257 IPC_MESSAGE_HANDLER(BrowserPluginHostMsg_ExtendSelectionAndDelete,
258 OnExtendSelectionAndDelete) 258 OnExtendSelectionAndDelete)
259 IPC_MESSAGE_HANDLER(BrowserPluginHostMsg_ImeConfirmComposition, 259 IPC_MESSAGE_HANDLER(BrowserPluginHostMsg_ImeCommitText, OnImeCommitText)
260 OnImeConfirmComposition) 260
261 IPC_MESSAGE_HANDLER(BrowserPluginHostMsg_ImeFinishComposingText,
262 OnImeFinishComposingText)
263
261 IPC_MESSAGE_HANDLER(BrowserPluginHostMsg_ImeSetComposition, 264 IPC_MESSAGE_HANDLER(BrowserPluginHostMsg_ImeSetComposition,
262 OnImeSetComposition) 265 OnImeSetComposition)
263 IPC_MESSAGE_HANDLER(BrowserPluginHostMsg_LockMouse_ACK, OnLockMouseAck) 266 IPC_MESSAGE_HANDLER(BrowserPluginHostMsg_LockMouse_ACK, OnLockMouseAck)
264 IPC_MESSAGE_HANDLER(BrowserPluginHostMsg_SetEditCommandsForNextKeyEvent, 267 IPC_MESSAGE_HANDLER(BrowserPluginHostMsg_SetEditCommandsForNextKeyEvent,
265 OnSetEditCommandsForNextKeyEvent) 268 OnSetEditCommandsForNextKeyEvent)
266 IPC_MESSAGE_HANDLER(BrowserPluginHostMsg_SetFocus, OnSetFocus) 269 IPC_MESSAGE_HANDLER(BrowserPluginHostMsg_SetFocus, OnSetFocus)
267 IPC_MESSAGE_HANDLER(BrowserPluginHostMsg_SetVisibility, OnSetVisibility) 270 IPC_MESSAGE_HANDLER(BrowserPluginHostMsg_SetVisibility, OnSetVisibility)
268 IPC_MESSAGE_HANDLER(BrowserPluginHostMsg_UnlockMouse_ACK, OnUnlockMouseAck) 271 IPC_MESSAGE_HANDLER(BrowserPluginHostMsg_UnlockMouse_ACK, OnUnlockMouseAck)
269 IPC_MESSAGE_HANDLER(BrowserPluginHostMsg_UpdateGeometry, OnUpdateGeometry) 272 IPC_MESSAGE_HANDLER(BrowserPluginHostMsg_UpdateGeometry, OnUpdateGeometry)
270 IPC_MESSAGE_HANDLER(BrowserPluginHostMsg_SatisfySequence, OnSatisfySequence) 273 IPC_MESSAGE_HANDLER(BrowserPluginHostMsg_SatisfySequence, OnSatisfySequence)
(...skipping 584 matching lines...) Expand 10 before | Expand all | Expand 10 after
855 const std::string& text, 858 const std::string& text,
856 const std::vector<blink::WebCompositionUnderline>& underlines, 859 const std::vector<blink::WebCompositionUnderline>& underlines,
857 int selection_start, 860 int selection_start,
858 int selection_end) { 861 int selection_end) {
859 Send(new InputMsg_ImeSetComposition(routing_id(), 862 Send(new InputMsg_ImeSetComposition(routing_id(),
860 base::UTF8ToUTF16(text), underlines, 863 base::UTF8ToUTF16(text), underlines,
861 gfx::Range::InvalidRange(), 864 gfx::Range::InvalidRange(),
862 selection_start, selection_end)); 865 selection_start, selection_end));
863 } 866 }
864 867
865 void BrowserPluginGuest::OnImeConfirmComposition( 868 void BrowserPluginGuest::OnImeCommitText(int browser_plugin_instance_id,
866 int browser_plugin_instance_id, 869 const std::string& text,
867 const std::string& text, 870 int relative_cursor_pos) {
868 bool keep_selection) { 871 Send(new InputMsg_ImeCommitText(routing_id(), base::UTF8ToUTF16(text),
869 Send(new InputMsg_ImeConfirmComposition(routing_id(), 872 gfx::Range::InvalidRange(),
870 base::UTF8ToUTF16(text), 873 relative_cursor_pos));
871 gfx::Range::InvalidRange(), 874 }
872 keep_selection)); 875
876 void BrowserPluginGuest::OnImeFinishComposingText(bool keep_selection) {
877 Send(new InputMsg_ImeFinishComposingText(routing_id(), keep_selection));
873 } 878 }
874 879
875 void BrowserPluginGuest::OnExtendSelectionAndDelete( 880 void BrowserPluginGuest::OnExtendSelectionAndDelete(
876 int browser_plugin_instance_id, 881 int browser_plugin_instance_id,
877 int before, 882 int before,
878 int after) { 883 int after) {
879 RenderFrameHostImpl* rfh = static_cast<RenderFrameHostImpl*>( 884 RenderFrameHostImpl* rfh = static_cast<RenderFrameHostImpl*>(
880 web_contents()->GetFocusedFrame()); 885 web_contents()->GetFocusedFrame());
881 if (rfh) 886 if (rfh)
882 rfh->ExtendSelectionAndDelete(before, after); 887 rfh->ExtendSelectionAndDelete(before, after);
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after
1017 range, character_bounds); 1022 range, character_bounds);
1018 } 1023 }
1019 #endif 1024 #endif
1020 1025
1021 void BrowserPluginGuest::SetContextMenuPosition(const gfx::Point& position) { 1026 void BrowserPluginGuest::SetContextMenuPosition(const gfx::Point& position) {
1022 if (delegate_) 1027 if (delegate_)
1023 delegate_->SetContextMenuPosition(position); 1028 delegate_->SetContextMenuPosition(position);
1024 } 1029 }
1025 1030
1026 } // namespace content 1031 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/browser_plugin/browser_plugin_guest.h ('k') | content/browser/renderer_host/ime_adapter_android.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698