| 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 |
| 11 #include "base/observer_list.h" | 11 #include "base/observer_list.h" |
| 12 #include "base/strings/string16.h" | 12 #include "base/strings/string16.h" |
| 13 #include "content/common/content_export.h" | 13 #include "content/common/content_export.h" |
| 14 #include "content/common/text_input_state.h" | 14 #include "content/common/text_input_state.h" |
| 15 #include "ui/gfx/geometry/rect.h" | 15 #include "ui/gfx/geometry/rect.h" |
| 16 #include "ui/gfx/range/range.h" | 16 #include "ui/gfx/range/range.h" |
| 17 #include "ui/gfx/selection_bound.h" | 17 #include "ui/gfx/selection_bound.h" |
| 18 | 18 |
| 19 struct ViewHostMsg_SelectionBounds_Params; | 19 struct ViewHostMsg_SelectionBounds_Params; |
| 20 | 20 |
| 21 namespace content { | 21 namespace content { |
| 22 | 22 |
| 23 class RenderWidgetHostImpl; | 23 class RenderWidgetHostImpl; |
| 24 class RenderWidgetHostView; | 24 class RenderWidgetHostView; |
| 25 class RenderWidgetHostViewBase; | 25 class RenderWidgetHostViewBase; |
| 26 class WebContents; | |
| 27 | 26 |
| 28 // A class which receives updates of TextInputState from multiple sources and | 27 // A class which receives updates of TextInputState from multiple sources and |
| 29 // decides what the new TextInputState is. It also notifies the observers when | 28 // decides what the new TextInputState is. It also notifies the observers when |
| 30 // text input state is updated. | 29 // text input state is updated. |
| 31 class CONTENT_EXPORT TextInputManager { | 30 class CONTENT_EXPORT TextInputManager { |
| 32 public: | 31 public: |
| 33 // The tab's top-level RWHV should be an observer of TextInputManager to get | 32 // The tab's top-level RWHV should be an observer of TextInputManager to get |
| 34 // notifications about changes in TextInputState or other IME related state | 33 // notifications about changes in TextInputState or other IME related state |
| 35 // for child frames. | 34 // for child frames. |
| 36 class CONTENT_EXPORT Observer { | 35 class CONTENT_EXPORT Observer { |
| (...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 228 ViewMap<CompositionRangeInfo> composition_range_info_map_; | 227 ViewMap<CompositionRangeInfo> composition_range_info_map_; |
| 229 ViewMap<TextSelection> text_selection_map_; | 228 ViewMap<TextSelection> text_selection_map_; |
| 230 | 229 |
| 231 base::ObserverList<Observer> observer_list_; | 230 base::ObserverList<Observer> observer_list_; |
| 232 | 231 |
| 233 DISALLOW_COPY_AND_ASSIGN(TextInputManager); | 232 DISALLOW_COPY_AND_ASSIGN(TextInputManager); |
| 234 }; | 233 }; |
| 235 } | 234 } |
| 236 | 235 |
| 237 #endif // CONTENT_BROWSER_RENDERER_HOST_TEXT_INPUT_MANAGER_H__ | 236 #endif // CONTENT_BROWSER_RENDERER_HOST_TEXT_INPUT_MANAGER_H__ |
| OLD | NEW |