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

Unified Diff: content/public/test/text_input_test_utils.h

Issue 2954963003: Request Composition Range Updates for Focused GuestViews based on BrowserPlugins (Closed)
Patch Set: Created 3 years, 6 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
« no previous file with comments | « content/browser/renderer_host/text_input_manager.cc ('k') | content/public/test/text_input_test_utils.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/public/test/text_input_test_utils.h
diff --git a/content/public/test/text_input_test_utils.h b/content/public/test/text_input_test_utils.h
index f377320e69d83d3b7911ee8ca2bb18584db48e57..ec3f13499d090105c445427ac26efc3dc8e3fc59 100644
--- a/content/public/test/text_input_test_utils.h
+++ b/content/public/test/text_input_test_utils.h
@@ -78,6 +78,16 @@ void SendImeCommitTextToWidget(
const gfx::Range& replacement_range,
int relative_cursor_pos);
+// Sends a request to RenderWidget corresponding to |rwh| to set the given
+// composition text and update the corresponding IME params.
+void SendImeSetCompositionTextToWidget(
+ RenderWidgetHost* rwh,
+ const base::string16& text,
+ const std::vector<ui::CompositionUnderline>& underlines,
+ const gfx::Range& replacement_range,
+ int selection_start,
+ int selection_end);
+
// This class provides the necessary API for accessing the state of and also
// observing the TextInputManager for WebContents.
class TextInputManagerTester {
@@ -113,6 +123,13 @@ class TextInputManagerTester {
// length of the selected text range in the focused view.
bool GetCurrentTextSelectionLength(size_t* length);
+ // This method sets |output| to the last value of composition range length
+ // reported by a renderer corresponding to WebContents. If no such update have
+ // been received, the method will leave |output| untouched and returns false.
+ // Returning true means an update has been received and the value of |output|
+ // has been updated accordingly.
+ bool GetLastCompositionRangeLength(uint32_t* output);
+
// Returns the RenderWidgetHostView with a focused <input> element or nullptr
// if none exists.
const RenderWidgetHostView* GetActiveView();
« no previous file with comments | « content/browser/renderer_host/text_input_manager.cc ('k') | content/public/test/text_input_test_utils.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698