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

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

Issue 2130133004: Tracking text selection on the browser side in OOPIF. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Added an interactive ui test Created 4 years, 5 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/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 f87e9fed0fd7b7fe0c04d4c44d51e78487515e38..8cdf0d7ae16146c48bf74e7a68dfda50772e5f4b 100644
--- a/content/public/test/text_input_test_utils.h
+++ b/content/public/test/text_input_test_utils.h
@@ -53,6 +53,10 @@ class TextInputManagerTester {
// on the TextInputManager which is being observed.
void SetOnSelectionBoundsChangedCallback(const base::Closure& callback);
+ // Sets a callback which is invoked when a RWHV calls SelectionChanged on the
+ // TextInputManager which is being observed.
+ void SetOnTextSelectionChangedCallback(const base::Closure& callback);
+
// Returns true if there is a focused <input> and populates |type| with
// |TextInputState.type| of the TextInputManager.
bool GetTextInputType(ui::TextInputType* type);
@@ -61,6 +65,10 @@ class TextInputManagerTester {
// |TextInputState.value| of the TextInputManager.
bool GetTextInputValue(std::string* value);
+ // Returns true if there is a focused <input> and populates |length| with the
+ // length of the selected text range in the focused view.
+ bool GetCurrentTextSelectionLength(size_t* length);
+
// Returns the RenderWidgetHostView with a focused <input> element or nullptr
// if none exists.
const RenderWidgetHostView* GetActiveView();

Powered by Google App Engine
This is Rietveld 408576698