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

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

Issue 2132633002: Tracking composition range on the browser side (Aura) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressing comments 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..d3b59b2a6406056dedf8d935c60bc2854b2517b7 100644
--- a/content/public/test/text_input_test_utils.h
+++ b/content/public/test/text_input_test_utils.h
@@ -11,6 +11,11 @@
#include "ui/base/ime/text_input_mode.h"
#include "ui/base/ime/text_input_type.h"
+namespace ui {
+
Charlie Reis 2016/07/11 23:56:19 nit: No blank line here, as in text_input_manager.
EhsanK 2016/07/12 18:31:14 Acknowledged.
+struct CompositionText;
+} // namespace ui
Charlie Reis 2016/07/11 23:56:19 nit: No close comment needed on something this sim
EhsanK 2016/07/12 18:31:14 Acknowledged.
+
namespace content {
class RenderWidgetHostView;
@@ -38,6 +43,13 @@ size_t GetRegisteredViewsCountFromTextInputManager(WebContents* web_contents);
// given WebContents.
RenderWidgetHostView* GetActiveViewFromWebContents(WebContents* web_contents);
+// This method will use |web_contents| to find the tab's RenderWidgetHostView
+// and then uses that to send an IPC to set composition to the currently
Charlie Reis 2016/07/11 23:56:19 nit: s/uses/use/
EhsanK 2016/07/12 18:31:14 Done.
+// active RenderWidgetHost.
+void SetCompositionTextForFocusedTextInputClient(
+ WebContents* web_contents,
+ const ui::CompositionText& composition);
+
// This class provides the necessary API for accessing the state of and also
// observing the TextInputManager for WebContents.
class TextInputManagerTester {
@@ -53,6 +65,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
+ // ImeCompositionRangeChanged on the TextInputManager that is being observed.
+ void SetOnImeCompositionRangeChangedCallback(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);

Powered by Google App Engine
This is Rietveld 408576698