Chromium Code Reviews| 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 f240a1b9b7408130b72f6711ee0cd6cd15e76202..ccd3a6c6577ca48372faa85ff9d9e6a260c99b94 100644 |
| --- a/content/browser/renderer_host/text_input_manager.h |
| +++ b/content/browser/renderer_host/text_input_manager.h |
| @@ -16,6 +16,10 @@ |
| struct ViewHostMsg_SelectionBounds_Params; |
| +namespace gfx { |
|
EhsanK
2016/07/07 22:10:58
Not quite sure if space is needed.
kenrb
2016/07/08 18:13:42
It isn't.
EhsanK
2016/07/11 18:07:21
Acknowledged.
|
| +class Range; |
| +} |
| + |
| namespace content { |
|
EhsanK
2016/07/07 22:10:58
Same dilemma, but maybe a different case than abov
kenrb
2016/07/08 18:13:42
A blank line here is appropriate.
EhsanK
2016/07/11 18:07:21
Acknowledged.
|
| class RenderWidgetHostImpl; |
| class RenderWidgetHostView; |
| @@ -70,6 +74,9 @@ class CONTENT_EXPORT TextInputManager { |
| // Returns the rect between selection bounds for the |active_view_|. |
| gfx::Rect GetSelectionBoundsRect(); |
| + // Returns a vector of rects for the character bounds of the active widget. |
| + const std::vector<gfx::Rect>* GetCompositionCharacterBounds(); |
|
kenrb
2016/07/08 18:13:42
In RenderWidgetHostViewAura you call this without
EhsanK
2016/07/11 18:07:21
In RWHVAura we check if there is an active widget
|
| + |
| // --------------------------------------------------------------------------- |
| // The following methods are called by RWHVs on the tab to update their IME- |
| // related state. |
| @@ -88,6 +95,12 @@ class CONTENT_EXPORT TextInputManager { |
| void SelectionBoundsChanged(RenderWidgetHostViewBase* view, |
| const ViewHostMsg_SelectionBounds_Params& params); |
| + // Called when the composition range and/or character bounds have changed. |
| + void ImeCompositionRangeChanged( |
| + RenderWidgetHostViewBase* view, |
| + const gfx::Range& range, |
| + const std::vector<gfx::Rect>& character_bounds); |
| + |
| // Registers the given |view| for tracking its TextInputState. This is called |
| // by any view which has updates in its TextInputState (whether tab's RWHV or |
| // that of a child frame). The |view| must unregister itself before being |
| @@ -128,6 +141,15 @@ class CONTENT_EXPORT TextInputManager { |
| gfx::SelectionBound focus; |
| }; |
| + // Ccomposition range information. |
| + struct CompositionRangeInfo { |
|
EhsanK
2016/07/07 22:10:58
We do not store gfx::Range for Aura since it was n
|
| + CompositionRangeInfo(); |
| + CompositionRangeInfo(const CompositionRangeInfo& other); |
| + ~CompositionRangeInfo(); |
| + |
| + std::vector<gfx::Rect> character_bounds; |
| + }; |
| + |
| // This class is used to create maps which hold specific IME state for a |
| // view. |
| template <class Value> |
| @@ -146,6 +168,7 @@ class CONTENT_EXPORT TextInputManager { |
| // Text selection bounds information for registered views. |
| ViewMap<SelectionRegion> selection_region_map_; |
| + ViewMap<CompositionRangeInfo> composition_range_info_map_; |
| base::ObserverList<Observer> observer_list_; |