Index: content/browser/renderer_host/text_input_manager.h |
diff --git a/content/browser/renderer_host/text_input_manager.h b/content/browser/renderer_host/text_input_manager.h |
index 7dcbdfc2e82fcfc0078e75b3a8f52228d2193411..400d1e59ad4deccebdd77fd1e724d7f1399111ee 100644 |
--- a/content/browser/renderer_host/text_input_manager.h |
+++ b/content/browser/renderer_host/text_input_manager.h |
@@ -13,6 +13,7 @@ |
namespace content { |
+class RenderWidgetHostImpl; |
class RenderWidgetHostView; |
class RenderWidgetHostViewBase; |
class WebContents; |
@@ -40,16 +41,23 @@ class CONTENT_EXPORT TextInputManager { |
TextInputManager(); |
~TextInputManager(); |
- // Returns the currently active view (i.e., the RWHV with a focused <input> |
- // element), or nullptr if none exist. The |active_view_| cannot have a |
- // |TextInputState.type| of ui::TEXT_INPUT_TYPE_NONE. |
Charlie Reis
2016/06/21 21:13:56
We've lost the last sentence of the comment. Shou
EhsanK
2016/06/22 18:26:33
Yes and thanks for noticing this.
|
- RenderWidgetHostViewBase* GetActiveView() const; |
+ // --------------------------------------------------------------------------- |
+ // The following methods can be used to obtain information about IME-related |
+ // state for the active RenderWidget. |
+ |
+ // Returns the currently active widget, i.e., the RWH which is associated with |
+ // |active_view_|. |
+ RenderWidgetHostImpl* GetActiveWidget() const; |
// Returns the TextInputState corresponding to |active_view_|. |
// Users of this method should not hold on to the pointer as it might become |
// dangling if the TextInputManager or |active_view_| might go away. |
const TextInputState* GetTextInputState(); |
+ // --------------------------------------------------------------------------- |
+ // The following methods are called by RWHVs on the tab to update their IME- |
+ // related state. |
+ |
// Updates the TextInputState for |view|. |
void UpdateTextInputState(RenderWidgetHostViewBase* view, |
const TextInputState& state); |
@@ -85,7 +93,7 @@ class CONTENT_EXPORT TextInputManager { |
void NotifyObserversAboutInputStateUpdate(RenderWidgetHostViewBase* view, |
bool did_update_state); |
- // The view with active text input state. |
+ // The view with active text input state, i.e., a focused <input> element. |
RenderWidgetHostViewBase* active_view_; |
std::unordered_map<RenderWidgetHostViewBase*, TextInputState> |