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

Unified Diff: content/browser/renderer_host/render_widget_host_impl.h

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/browser/renderer_host/render_widget_host_impl.h
diff --git a/content/browser/renderer_host/render_widget_host_impl.h b/content/browser/renderer_host/render_widget_host_impl.h
index 0999abfc8dc50bec67d819bb1e98e68d061448e7..83a4eb920370b7e692cb996fa36ba1fd9a525c3b 100644
--- a/content/browser/renderer_host/render_widget_host_impl.h
+++ b/content/browser/renderer_host/render_widget_host_impl.h
@@ -368,15 +368,24 @@ class CONTENT_EXPORT RenderWidgetHostImpl : public RenderWidgetHost,
int selection_start,
int selection_end);
- // Finishes an ongoing composition with the specified text.
- // A browser should call this function:
+ // Deletes the ongoing composition if any, inserts the specified text, and
+ // moves the cursor.
+ // A browser should call this function or ImeFinishComposingText:
+ // * when it receives a WM_IME_COMPOSITION message with a GCS_RESULTSTR flag
+ // (on Windows);
+ // * when it receives a "commit" signal of GtkIMContext (on Linux);
+ // * when insertText of NSTextInput is called (on Mac).
+ void ImeCommitText(const base::string16& text,
+ const gfx::Range& replacement_range,
+ int relative_cursor_pos);
+
+ // Finishes an ongoing composition.
+ // A browser should call this function or ImeCommitText:
// * when it receives a WM_IME_COMPOSITION message with a GCS_RESULTSTR flag
// (on Windows);
// * when it receives a "commit" signal of GtkIMContext (on Linux);
// * when insertText of NSTextInput is called (on Mac).
- void ImeConfirmComposition(const base::string16& text,
- const gfx::Range& replacement_range,
- bool keep_selection);
+ void ImeFinishComposingText(bool keep_selection);
// Cancels an ongoing composition.
void ImeCancelComposition();
« no previous file with comments | « content/browser/renderer_host/ime_adapter_android.cc ('k') | content/browser/renderer_host/render_widget_host_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698