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 b09ae5069420f5c96af8b022c118a5a5e52fc008..76265fecefc92bc07f33e24f9f53653c797e1cdf 100644 |
| --- a/content/browser/renderer_host/text_input_manager.h |
| +++ b/content/browser/renderer_host/text_input_manager.h |
| @@ -97,9 +97,6 @@ class CONTENT_EXPORT TextInputManager { |
| // interpreted as a ui::TextInputType of ui::TEXT_INPUT_TYPE_NONE. |
| const TextInputState* GetTextInputState() const; |
| - // Returns the rect between selection bounds. |
| - gfx::Rect GetSelectionBoundsRect() const; |
| - |
| // Returns a vector of rects representing the character bounds. |
| const std::vector<gfx::Rect>* GetCompositionCharacterBounds() const; |
| @@ -109,6 +106,17 @@ class CONTENT_EXPORT TextInputManager { |
| const TextSelection* GetTextSelection( |
| RenderWidgetHostViewBase* view = nullptr) const; |
| +#if defined(USE_AURA) |
| + // Returns the rect between selection bounds. |
| + gfx::Rect GetSelectionBoundsRect() const; |
| +#elif defined(OS_MACOSX) |
|
Charlie Reis
2016/08/04 18:44:51
Hmm, this seems unfortunate to need different sele
EhsanK
2016/08/04 23:53:02
There is more in the .cc file for each specific me
kenrb
2016/08/08 22:03:04
What if we just store (more or less) the raw conte
|
| + // Returns the first caret bound for the view corresponding to |widget|. |
| + const gfx::Rect* GetCaretRect(RenderWidgetHostImpl* widget) const; |
| + |
| + // Returns the first selection bound for the view corresponding to |widget|. |
| + const gfx::Rect* GetFirstSelectionRect(RenderWidgetHostImpl* widget) const; |
| +#endif |
| + |
| // --------------------------------------------------------------------------- |
| // The following methods are called by RWHVs on the tab to update their IME- |
| // related state. |
| @@ -168,16 +176,24 @@ class CONTENT_EXPORT TextInputManager { |
| RenderWidgetHostViewBase* view); |
| private: |
| +#if !defined(OS_ANDROID) |
| // Text selection bounds. |
| struct SelectionRegion { |
| SelectionRegion(); |
| SelectionRegion(const SelectionRegion& other); |
| - |
| +#if defined(USE_AURA) |
| // The begining of the selection region. |
| gfx::SelectionBound anchor; |
| // The end of the selection region (caret position). |
| gfx::SelectionBound focus; |
| +#else // OS_MACOSX |
|
Charlie Reis
2016/08/04 18:44:51
Same here, and more so. This will be difficult to
EhsanK
2016/08/04 23:53:02
Let me think about this. Meanwhile, all suggestion
|
| + // The current caret bounds. |
| + gfx::Rect caret_rect; |
| + // The current first selection bounds. |
| + gfx::Rect first_selection_rect; |
| +#endif // USE_AURA |
| }; |
| +#endif |
| // Ccomposition range information. |
| struct CompositionRangeInfo { |