Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef CONTENT_BROWSER_RENDERER_HOST_TEXT_INPUT_MANAGER_H__ | 5 #ifndef CONTENT_BROWSER_RENDERER_HOST_TEXT_INPUT_MANAGER_H__ |
| 6 #define CONTENT_BROWSER_RENDERER_HOST_TEXT_INPUT_MANAGER_H__ | 6 #define CONTENT_BROWSER_RENDERER_HOST_TEXT_INPUT_MANAGER_H__ |
| 7 | 7 |
| 8 #include <unordered_map> | 8 #include <unordered_map> |
| 9 #include <utility> | 9 #include <utility> |
| 10 | 10 |
| (...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 117 // |active_view_|. | 117 // |active_view_|. |
| 118 RenderWidgetHostImpl* GetActiveWidget() const; | 118 RenderWidgetHostImpl* GetActiveWidget() const; |
| 119 | 119 |
| 120 // --------------------------------------------------------------------------- | 120 // --------------------------------------------------------------------------- |
| 121 // The following methods can be used to obtain information about IME-related | 121 // The following methods can be used to obtain information about IME-related |
| 122 // state for the active RenderWidgetHost. If the active widget is nullptr, the | 122 // state for the active RenderWidgetHost. If the active widget is nullptr, the |
| 123 // methods below will return nullptr as well. | 123 // methods below will return nullptr as well. |
| 124 // Users of these methods should not hold on to the pointers as they become | 124 // Users of these methods should not hold on to the pointers as they become |
| 125 // dangling if the TextInputManager or |active_view_| are destroyed. | 125 // dangling if the TextInputManager or |active_view_| are destroyed. |
| 126 | 126 |
| 127 // Returns the currently stored TextInputState. An state of nullptr can be | 127 // Returns the currently stored TextInputState for |view|. An state of nullptr |
|
Charlie Reis
2016/11/02 22:23:13
nit: A state
EhsanK
2016/11/18 19:55:59
Done.
| |
| 128 // interpreted as a ui::TextInputType of ui::TEXT_INPUT_TYPE_NONE. | 128 // can be interpreted as a ui::TextInputType of ui::TEXT_INPUT_TYPE_NONE for |
| 129 const TextInputState* GetTextInputState() const; | 129 // the view. If |view| is null, and there is an |active_view_|, the state for |
|
Charlie Reis
2016/11/02 22:23:13
nit: No comma after null
EhsanK
2016/11/18 19:55:59
Acknowledged.
| |
| 130 // |active_view_| is returned. | |
| 131 const TextInputState* GetTextInputState( | |
| 132 RenderWidgetHostViewBase* view = nullptr) const; | |
| 130 | 133 |
| 131 // Returns the selection bounds information for |view|. If |view| == nullptr, | 134 // Returns the selection bounds information for |view|. If |view| == nullptr, |
| 132 // it will return the corresponding information for |active_view_| or nullptr | 135 // it will return the corresponding information for |active_view_| or nullptr |
| 133 // if there are no active views. | 136 // if there are no active views. |
| 134 const SelectionRegion* GetSelectionRegion( | 137 const SelectionRegion* GetSelectionRegion( |
| 135 RenderWidgetHostViewBase* view = nullptr) const; | 138 RenderWidgetHostViewBase* view = nullptr) const; |
| 136 | 139 |
| 137 // Returns the composition range and character bounds information for the | 140 // Returns the composition range and character bounds information for the |
| 138 // |view|. If |view| == nullptr, it will assume |active_view_| and return its | 141 // |view|. If |view| == nullptr, it will assume |active_view_| and return its |
| 139 // state. If |active_view_| == nullptr, this method will return nullptr. | 142 // state. If |active_view_| == nullptr, this method will return nullptr. |
| (...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 228 ViewMap<CompositionRangeInfo> composition_range_info_map_; | 231 ViewMap<CompositionRangeInfo> composition_range_info_map_; |
| 229 ViewMap<TextSelection> text_selection_map_; | 232 ViewMap<TextSelection> text_selection_map_; |
| 230 | 233 |
| 231 base::ObserverList<Observer> observer_list_; | 234 base::ObserverList<Observer> observer_list_; |
| 232 | 235 |
| 233 DISALLOW_COPY_AND_ASSIGN(TextInputManager); | 236 DISALLOW_COPY_AND_ASSIGN(TextInputManager); |
| 234 }; | 237 }; |
| 235 } | 238 } |
| 236 | 239 |
| 237 #endif // CONTENT_BROWSER_RENDERER_HOST_TEXT_INPUT_MANAGER_H__ | 240 #endif // CONTENT_BROWSER_RENDERER_HOST_TEXT_INPUT_MANAGER_H__ |
| OLD | NEW |