Index: content/browser/renderer_host/render_widget_host_view_base.h |
diff --git a/content/browser/renderer_host/render_widget_host_view_base.h b/content/browser/renderer_host/render_widget_host_view_base.h |
index 8eb96897ecc8dc2feca83d74474372a6cdcf1550..73f590e2b40b02d13f62675ef9ad137783abc336 100644 |
--- a/content/browser/renderer_host/render_widget_host_view_base.h |
+++ b/content/browser/renderer_host/render_widget_host_view_base.h |
@@ -66,6 +66,7 @@ class BrowserAccessibilityManager; |
class RenderWidgetHostViewBaseObserver; |
class SyntheticGesture; |
class SyntheticGestureTarget; |
+class TextInputManager; |
class WebCursor; |
struct DidOverscrollParams; |
struct NativeWebKeyboardEvent; |
@@ -240,6 +241,9 @@ class CONTENT_EXPORT RenderWidgetHostViewBase : public RenderWidgetHostView, |
cc::SurfaceId original_surface, |
gfx::Point* transformed_point); |
+ // Updates the state of the input method attached to the view. |
+ virtual void TextInputStateChanged(const TextInputState& text_input_state); |
+ |
//---------------------------------------------------------------------------- |
// The following static methods are implemented by each platform. |
@@ -265,9 +269,6 @@ class CONTENT_EXPORT RenderWidgetHostViewBase : public RenderWidgetHostView, |
// Indicates whether the page has finished loading. |
virtual void SetIsLoading(bool is_loading) = 0; |
- // Updates the state of the input method attached to the view. |
- virtual void TextInputStateChanged(const TextInputState& params) = 0; |
- |
// Cancel the ongoing composition of the input method attached to the view. |
virtual void ImeCancelComposition() = 0; |
@@ -385,6 +386,13 @@ class CONTENT_EXPORT RenderWidgetHostViewBase : public RenderWidgetHostView, |
void NotifyObserversAboutShutdown(); |
+ // Returns a reference to the current instance of TextInputManager. If no |
+ // no reference is found, this method tries to obtain one from the |
+ // RenderWidgetHostDelegate. Returns nullptr if no reference exists or |
+ // can be obtained. Unless not possible, this method should be used internally |
+ // to obtain TextInputManager. |
+ TextInputManager* GetTextInputManager(); |
+ |
// Whether this view is a popup and what kind of popup it is (select, |
// autofill...). |
blink::WebPopupType popup_type_; |
@@ -412,7 +420,6 @@ class CONTENT_EXPORT RenderWidgetHostViewBase : public RenderWidgetHostView, |
// The current selection range relative to the start of the web page. |
gfx::Range selection_range_; |
- protected: |
// The scale factor of the display the renderer is currently on. |
float current_device_scale_factor_; |
@@ -423,6 +430,10 @@ class CONTENT_EXPORT RenderWidgetHostViewBase : public RenderWidgetHostView, |
// renderer. |
bool pinch_zoom_enabled_; |
+ // A reference to current TextInputManager instance this RWHV is registered |
+ // with. |
kenrb
2016/05/12 16:16:36
Explicitly state that this can be nullptr, with a
EhsanK
2016/05/13 16:00:56
Acknowledged.
kenrb
2016/05/13 20:37:41
Can you please adjust the comment to that affect?
EhsanK
2016/05/24 20:42:44
Sorry I missed this one. Done!
|
+ TextInputManager* text_input_manager_; |
+ |
private: |
void FlushInput(); |