Chromium Code Reviews| 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); |