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

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

Issue 2130133004: Tracking text selection on the browser side in OOPIF. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Added an interactive ui test 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
Index: content/browser/renderer_host/render_widget_host_view_base.h
diff --git a/content/browser/renderer_host/render_widget_host_view_base.h b/content/browser/renderer_host/render_widget_host_view_base.h
index 756a7d834aa7155016516108d276c606b6723b6e..4b39b9ac3ef55c98b83db43f6eca5f703c21805b 100644
--- a/content/browser/renderer_host/render_widget_host_view_base.h
+++ b/content/browser/renderer_host/render_widget_host_view_base.h
@@ -432,6 +432,11 @@ class CONTENT_EXPORT RenderWidgetHostViewBase : public RenderWidgetHostView,
// Whether we are showing a context menu.
bool showing_context_menu_;
+// TODO(ekaramad): In aura, text selection tracking for IME is done through the
+// TextInputManager. We still need the following variables for other platforms.
+// Remove them when tracking is done by TextInputManager on all platforms
+// (https://crbug.com/578168).
+#if !defined(USE_AURA)
// A buffer containing the text inside and around the current selection range.
base::string16 selection_text_;
@@ -441,6 +446,7 @@ class CONTENT_EXPORT RenderWidgetHostViewBase : public RenderWidgetHostView,
// The current selection range relative to the start of the web page.
gfx::Range selection_range_;
+#endif
// The scale factor of the display the renderer is currently on.
float current_device_scale_factor_;
@@ -461,6 +467,9 @@ class CONTENT_EXPORT RenderWidgetHostViewBase : public RenderWidgetHostView,
private:
void FlushInput();
+ // The non-const implementation of RenderWidgetHostView::GetSelectedText().
kenrb 2016/07/12 19:15:25 Why is this needed? There is only one caller, whic
EhsanK 2016/07/12 19:33:48 The idea was to remove |selection_text_|, |selecti
kenrb 2016/07/12 20:15:17 Yeah, this isn't good. Basically it is trying to c
EhsanK 2016/07/18 15:21:29 So basically we ended up removing const from this
+ base::string16 GetSelectedTextFromTextInputManager();
+
gfx::Rect current_display_area_;
uint32_t renderer_frame_number_;

Powered by Google App Engine
This is Rietveld 408576698