Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(313)

Side by Side Diff: content/browser/renderer_host/text_input_manager.h

Issue 2354793003: Browser Side TextInputState Tracking for Android (Closed)
Patch Set: Rebased + Removed unused Forward Dec Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
116 // |active_view_|. 116 // |active_view_|.
117 RenderWidgetHostImpl* GetActiveWidget() const; 117 RenderWidgetHostImpl* GetActiveWidget() const;
118 118
119 // --------------------------------------------------------------------------- 119 // ---------------------------------------------------------------------------
120 // The following methods can be used to obtain information about IME-related 120 // The following methods can be used to obtain information about IME-related
121 // state for the active RenderWidgetHost. If the active widget is nullptr, the 121 // state for the active RenderWidgetHost. If the active widget is nullptr, the
122 // methods below will return nullptr as well. 122 // methods below will return nullptr as well.
123 // Users of these methods should not hold on to the pointers as they become 123 // Users of these methods should not hold on to the pointers as they become
124 // dangling if the TextInputManager or |active_view_| are destroyed. 124 // dangling if the TextInputManager or |active_view_| are destroyed.
125 125
126 // Returns the currently stored TextInputState. An state of nullptr can be 126 // Returns the currently stored TextInputState for |view|. A state of nullptr
127 // interpreted as a ui::TextInputType of ui::TEXT_INPUT_TYPE_NONE. 127 // can be interpreted as a ui::TextInputType of ui::TEXT_INPUT_TYPE_NONE for
128 const TextInputState* GetTextInputState() const; 128 // the view. If |view| is null and there is an |active_view_|, the state for
129 // |active_view_| is returned.
130 const TextInputState* GetTextInputState(
131 RenderWidgetHostViewBase* view = nullptr) const;
129 132
130 // Returns the selection bounds information for |view|. If |view| == nullptr, 133 // Returns the selection bounds information for |view|. If |view| == nullptr,
131 // it will return the corresponding information for |active_view_| or nullptr 134 // it will return the corresponding information for |active_view_| or nullptr
132 // if there are no active views. 135 // if there are no active views.
133 const SelectionRegion* GetSelectionRegion( 136 const SelectionRegion* GetSelectionRegion(
134 RenderWidgetHostViewBase* view = nullptr) const; 137 RenderWidgetHostViewBase* view = nullptr) const;
135 138
136 // Returns the composition range and character bounds information for the 139 // Returns the composition range and character bounds information for the
137 // |view|. If |view| == nullptr, it will assume |active_view_| and return its 140 // |view|. If |view| == nullptr, it will assume |active_view_| and return its
138 // state. If |active_view_| == nullptr, this method will return nullptr. 141 // state. If |active_view_| == nullptr, this method will return nullptr.
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
227 ViewMap<CompositionRangeInfo> composition_range_info_map_; 230 ViewMap<CompositionRangeInfo> composition_range_info_map_;
228 ViewMap<TextSelection> text_selection_map_; 231 ViewMap<TextSelection> text_selection_map_;
229 232
230 base::ObserverList<Observer> observer_list_; 233 base::ObserverList<Observer> observer_list_;
231 234
232 DISALLOW_COPY_AND_ASSIGN(TextInputManager); 235 DISALLOW_COPY_AND_ASSIGN(TextInputManager);
233 }; 236 };
234 } 237 }
235 238
236 #endif // CONTENT_BROWSER_RENDERER_HOST_TEXT_INPUT_MANAGER_H__ 239 #endif // CONTENT_BROWSER_RENDERER_HOST_TEXT_INPUT_MANAGER_H__
OLDNEW
« no previous file with comments | « content/browser/renderer_host/render_widget_host_view_base.cc ('k') | content/browser/renderer_host/text_input_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698