| 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 143 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 154 bool IsRegistered(RenderWidgetHostViewBase* view) const; | 154 bool IsRegistered(RenderWidgetHostViewBase* view) const; |
| 155 | 155 |
| 156 // Add and remove observers for notifications regarding updates in the | 156 // Add and remove observers for notifications regarding updates in the |
| 157 // TextInputState. Clients must be sure to remove themselves before they go | 157 // TextInputState. Clients must be sure to remove themselves before they go |
| 158 // away. | 158 // away. |
| 159 // Only the tab's RWHV should observer TextInputManager. In tests, however, | 159 // Only the tab's RWHV should observer TextInputManager. In tests, however, |
| 160 // in addition to the tab's RWHV, one or more test observers might observe | 160 // in addition to the tab's RWHV, one or more test observers might observe |
| 161 // TextInputManager. | 161 // TextInputManager. |
| 162 void AddObserver(Observer* observer); | 162 void AddObserver(Observer* observer); |
| 163 void RemoveObserver(Observer* observer); | 163 void RemoveObserver(Observer* observer); |
| 164 bool HasObserver(Observer* observer) const; |
| 164 | 165 |
| 165 RenderWidgetHostViewBase* active_view_for_testing() { return active_view_; } | 166 RenderWidgetHostViewBase* active_view_for_testing() { return active_view_; } |
| 166 size_t GetRegisteredViewsCountForTesting(); | 167 size_t GetRegisteredViewsCountForTesting(); |
| 167 ui::TextInputType GetTextInputTypeForViewForTesting( | 168 ui::TextInputType GetTextInputTypeForViewForTesting( |
| 168 RenderWidgetHostViewBase* view); | 169 RenderWidgetHostViewBase* view); |
| 169 | 170 |
| 170 private: | 171 private: |
| 171 // Text selection bounds. | 172 // Text selection bounds. |
| 172 struct SelectionRegion { | 173 struct SelectionRegion { |
| 173 SelectionRegion(); | 174 SelectionRegion(); |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 210 ViewMap<CompositionRangeInfo> composition_range_info_map_; | 211 ViewMap<CompositionRangeInfo> composition_range_info_map_; |
| 211 ViewMap<TextSelection> text_selection_map_; | 212 ViewMap<TextSelection> text_selection_map_; |
| 212 | 213 |
| 213 base::ObserverList<Observer> observer_list_; | 214 base::ObserverList<Observer> observer_list_; |
| 214 | 215 |
| 215 DISALLOW_COPY_AND_ASSIGN(TextInputManager); | 216 DISALLOW_COPY_AND_ASSIGN(TextInputManager); |
| 216 }; | 217 }; |
| 217 } | 218 } |
| 218 | 219 |
| 219 #endif // CONTENT_BROWSER_RENDERER_HOST_TEXT_INPUT_MANAGER_H__ | 220 #endif // CONTENT_BROWSER_RENDERER_HOST_TEXT_INPUT_MANAGER_H__ |
| OLD | NEW |