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

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

Issue 2208093004: Use focused RenderWidgetHostImpl instead of TextInputManager::GetActiveWidget() to obtain TextSelec… (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed some crashes Created 4 years, 4 months 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 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
99 99
100 // Returns the rect between selection bounds. 100 // Returns the rect between selection bounds.
101 gfx::Rect GetSelectionBoundsRect() const; 101 gfx::Rect GetSelectionBoundsRect() const;
102 102
103 // Returns a vector of rects representing the character bounds. 103 // Returns a vector of rects representing the character bounds.
104 const std::vector<gfx::Rect>* GetCompositionCharacterBounds() const; 104 const std::vector<gfx::Rect>* GetCompositionCharacterBounds() const;
105 105
106 // The following method returns the text selection state for the given |view|. 106 // The following method returns the text selection state for the given |view|.
107 // If |view| == nullptr, it will assume |active_view_| and return its state. 107 // If |view| == nullptr, it will assume |active_view_| and return its state.
108 // In the case of |active_view_| == nullptr, the method will return nullptr. 108 // In the case of |active_view_| == nullptr, the method will return nullptr.
109 // This method will not return nullptr when |view| != nullptr.
109 const TextSelection* GetTextSelection( 110 const TextSelection* GetTextSelection(
110 RenderWidgetHostViewBase* view = nullptr) const; 111 RenderWidgetHostViewBase* view = nullptr) const;
111 112
112 // --------------------------------------------------------------------------- 113 // ---------------------------------------------------------------------------
113 // The following methods are called by RWHVs on the tab to update their IME- 114 // The following methods are called by RWHVs on the tab to update their IME-
114 // related state. 115 // related state.
115 116
116 // Updates the TextInputState for |view|. 117 // Updates the TextInputState for |view|.
117 void UpdateTextInputState(RenderWidgetHostViewBase* view, 118 void UpdateTextInputState(RenderWidgetHostViewBase* view,
118 const TextInputState& state); 119 const TextInputState& state);
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
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__
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698