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

Unified Diff: content/renderer/browser_plugin/browser_plugin.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 side-by-side diff with in-line comments
Download patch
Index: content/renderer/browser_plugin/browser_plugin.cc
diff --git a/content/renderer/browser_plugin/browser_plugin.cc b/content/renderer/browser_plugin/browser_plugin.cc
index ed9dafb029dd572b18cc6a88673e264d0e75f381..d8eb0bb7eca1f5b9f71fa7b5745fb06ce544a46c 100644
--- a/content/renderer/browser_plugin/browser_plugin.cc
+++ b/content/renderer/browser_plugin/browser_plugin.cc
@@ -554,17 +554,24 @@ bool BrowserPlugin::setComposition(
return true;
}
-bool BrowserPlugin::confirmComposition(
- const blink::WebString& text,
- blink::WebWidget::ConfirmCompositionBehavior selectionBehavior) {
+bool BrowserPlugin::commitText(const blink::WebString& text,
+ int relative_cursor_pos) {
if (!attached())
return false;
- bool keep_selection = (selectionBehavior == blink::WebWidget::KeepSelection);
+
+ BrowserPluginManager::Get()->Send(new BrowserPluginHostMsg_ImeCommitText(
+ browser_plugin_instance_id_, text.utf8(), relative_cursor_pos));
+ // TODO(kochi): This assumes the IPC handling always succeeds.
+ return true;
+}
+
+bool BrowserPlugin::finishComposingText(
+ blink::WebWidget::ConfirmCompositionBehavior selection_behavior) {
+ if (!attached())
+ return false;
+ bool keep_selection = (selection_behavior == blink::WebWidget::KeepSelection);
BrowserPluginManager::Get()->Send(
- new BrowserPluginHostMsg_ImeConfirmComposition(
- browser_plugin_instance_id_,
- text.utf8(),
- keep_selection));
+ new BrowserPluginHostMsg_ImeFinishComposingText(keep_selection));
// TODO(kochi): This assumes the IPC handling always succeeds.
return true;
}
« no previous file with comments | « content/renderer/browser_plugin/browser_plugin.h ('k') | content/renderer/pepper/pepper_plugin_instance_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698