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 139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
150 // ui::TEXT_INPUT_TYPE_NONE. | 150 // ui::TEXT_INPUT_TYPE_NONE. |
151 const TextInputState* GetTextInputState() const; | 151 const TextInputState* GetTextInputState() const; |
152 | 152 |
153 // Returns the selection bounds information for |view|. If |view| == nullptr, | 153 // Returns the selection bounds information for |view|. If |view| == nullptr, |
154 // it will return the corresponding information for |active_view_| or nullptr | 154 // it will return the corresponding information for |active_view_| or nullptr |
155 // if there are no active views. | 155 // if there are no active views. |
156 const SelectionRegion* GetSelectionRegion( | 156 const SelectionRegion* GetSelectionRegion( |
157 RenderWidgetHostViewBase* view = nullptr) const; | 157 RenderWidgetHostViewBase* view = nullptr) const; |
158 | 158 |
159 // Returns the composition range and character bounds information for the | 159 // Returns the composition range and character bounds information for the |
160 // |view|. If |view| == nullptr, it will assume |active_view_| and return its | 160 // |active_view_|. Returns nullptr If |active_view_| == nullptr. |
161 // state. If |active_view_| == nullptr, this method will return nullptr. | 161 const TextInputManager::CompositionRangeInfo* GetCompositionRangeInfo() const; |
162 const TextInputManager::CompositionRangeInfo* GetCompositionRangeInfo( | |
163 RenderWidgetHostViewBase* view = nullptr) const; | |
164 | 162 |
165 // The following method returns the text selection state for the given |view|. | 163 // The following method returns the text selection state for the given |view|. |
166 // If |view| == nullptr, it will assume |active_view_| and return its state. | 164 // If |view| == nullptr, it will assume |active_view_| and return its state. |
167 // In the case of |active_view_| == nullptr, the method will return nullptr. | 165 // In the case of |active_view_| == nullptr, the method will return nullptr. |
168 const TextSelection* GetTextSelection( | 166 const TextSelection* GetTextSelection( |
169 RenderWidgetHostViewBase* view = nullptr) const; | 167 RenderWidgetHostViewBase* view = nullptr) const; |
170 | 168 |
171 // --------------------------------------------------------------------------- | 169 // --------------------------------------------------------------------------- |
172 // The following methods are called by RWHVs on the tab to update their IME- | 170 // The following methods are called by RWHVs on the tab to update their IME- |
173 // related state. | 171 // related state. |
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
250 ViewMap<CompositionRangeInfo> composition_range_info_map_; | 248 ViewMap<CompositionRangeInfo> composition_range_info_map_; |
251 ViewMap<TextSelection> text_selection_map_; | 249 ViewMap<TextSelection> text_selection_map_; |
252 | 250 |
253 base::ObserverList<Observer> observer_list_; | 251 base::ObserverList<Observer> observer_list_; |
254 | 252 |
255 DISALLOW_COPY_AND_ASSIGN(TextInputManager); | 253 DISALLOW_COPY_AND_ASSIGN(TextInputManager); |
256 }; | 254 }; |
257 } | 255 } |
258 | 256 |
259 #endif // CONTENT_BROWSER_RENDERER_HOST_TEXT_INPUT_MANAGER_H__ | 257 #endif // CONTENT_BROWSER_RENDERER_HOST_TEXT_INPUT_MANAGER_H__ |
OLD | NEW |