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

Unified Diff: content/browser/renderer_host/text_input_manager.h

Issue 2170463002: [refactor] content::TextInputManager - Make some methods const and initialize/cleanup IME maps (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Adding a comment to .h file Created 4 years, 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | content/browser/renderer_host/text_input_manager.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/renderer_host/text_input_manager.h
diff --git a/content/browser/renderer_host/text_input_manager.h b/content/browser/renderer_host/text_input_manager.h
index bef6e813cffacadb550a8593ac6df16f5bb69d11..7f50d089887d2555c85fd5e32562c2e2eb96d9a9 100644
--- a/content/browser/renderer_host/text_input_manager.h
+++ b/content/browser/renderer_host/text_input_manager.h
@@ -76,13 +76,13 @@ class CONTENT_EXPORT TextInputManager {
// Returns the currently stored TextInputState. An state of nullptr can be
// interpreted as a ui::TextInputType of ui::TEXT_INPUT_TYPE_NONE.
- const TextInputState* GetTextInputState();
+ const TextInputState* GetTextInputState() const;
// Returns the rect between selection bounds.
- gfx::Rect GetSelectionBoundsRect();
+ gfx::Rect GetSelectionBoundsRect() const;
// Returns a vector of rects representing the character bounds.
- const std::vector<gfx::Rect>* GetCompositionCharacterBounds();
+ const std::vector<gfx::Rect>* GetCompositionCharacterBounds() const;
// ---------------------------------------------------------------------------
// The following methods are called by RWHVs on the tab to update their IME-
@@ -171,9 +171,10 @@ class CONTENT_EXPORT TextInputManager {
// cannot have a |TextInputState.type| of ui::TEXT_INPUT_TYPE_NONE.
RenderWidgetHostViewBase* active_view_;
+ // The following maps track corresponding IME state for views. For each view,
+ // the values in the map are initialized and cleared in Register and
+ // Unregister methods, respectively.
ViewMap<TextInputState> text_input_state_map_;
-
- // Text selection bounds information for registered views.
ViewMap<SelectionRegion> selection_region_map_;
ViewMap<CompositionRangeInfo> composition_range_info_map_;
« no previous file with comments | « no previous file | content/browser/renderer_host/text_input_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698