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

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

Issue 2235283003: Track composition range and character bounds on the browser side (Mac) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased to fix some crashing tests 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 side-by-side diff with in-line comments
Download patch
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 2aaa6a7873810473b5229917a6629e94c97bebe2..6af828f83c1e8136f76b87b96e739cfa07f11b5d 100644
--- a/content/browser/renderer_host/text_input_manager.h
+++ b/content/browser/renderer_host/text_input_manager.h
@@ -79,6 +79,16 @@ class CONTENT_EXPORT TextInputManager {
base::string16 text;
};
+ // Composition range information.
+ struct CompositionRangeInfo {
+ CompositionRangeInfo();
+ CompositionRangeInfo(const CompositionRangeInfo& other);
+ ~CompositionRangeInfo();
+
+ std::vector<gfx::Rect> character_bounds;
+ gfx::Range range;
+ };
+
TextInputManager();
~TextInputManager();
@@ -100,8 +110,11 @@ class CONTENT_EXPORT TextInputManager {
// Returns the rect between selection bounds.
gfx::Rect GetSelectionBoundsRect() const;
- // Returns a vector of rects representing the character bounds.
- const std::vector<gfx::Rect>* GetCompositionCharacterBounds() const;
+ // Returns the composition range and character bounds information for the
+ // |view|. If |view| == nullptr, it will assume |active_view_| and return its
+ // state. If |active_view_| == nullptr, this method will return nullptr.
+ const TextInputManager::CompositionRangeInfo* GetCompositionRangeInfo(
+ RenderWidgetHostViewBase* view = nullptr) const;
// The following method returns the text selection state for the given |view|.
// If |view| == nullptr, it will assume |active_view_| and return its state.
@@ -180,15 +193,6 @@ class CONTENT_EXPORT TextInputManager {
gfx::SelectionBound focus;
};
- // Ccomposition range information.
- struct CompositionRangeInfo {
- CompositionRangeInfo();
- CompositionRangeInfo(const CompositionRangeInfo& other);
- ~CompositionRangeInfo();
-
- std::vector<gfx::Rect> character_bounds;
- };
-
// This class is used to create maps which hold specific IME state for a
// view.
template <class Value>

Powered by Google App Engine
This is Rietveld 408576698