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

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

Issue 2240553003: Track text selection on the browser side (Mac) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Added #ifdef 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/render_widget_host_view_base.cc
diff --git a/content/browser/renderer_host/render_widget_host_view_base.cc b/content/browser/renderer_host/render_widget_host_view_base.cc
index 449fcd92927cd837b031cb869bfe84b213e09e2b..86d498c925a5603c2e9242af28de5562909f3b8d 100644
--- a/content/browser/renderer_host/render_widget_host_view_base.cc
+++ b/content/browser/renderer_host/render_widget_host_view_base.cc
@@ -64,6 +64,19 @@ RenderWidgetHostViewBase::~RenderWidgetHostViewBase() {
text_input_manager_->Unregister(this);
}
+RenderWidgetHostImpl* RenderWidgetHostViewBase::GetFocusedWidget() const {
+ RenderWidgetHostImpl* host =
+ RenderWidgetHostImpl::From(GetRenderWidgetHost());
+
+ return host && host->delegate()
+ ? host->delegate()->GetFocusedRenderWidgetHost(host)
+ : nullptr;
+}
+
+RenderWidgetHost* RenderWidgetHostViewBase::GetRenderWidgetHost() const {
+ return nullptr;
+}
+
void RenderWidgetHostViewBase::NotifyObserversAboutShutdown() {
// Note: RenderWidgetHostInputEventRouter is an observer, and uses the
// following notification to remove this view from its surface owners map.
@@ -117,7 +130,7 @@ void RenderWidgetHostViewBase::SelectionChanged(const base::string16& text,
// TODO(ekaramad): Use TextInputManager code paths for IME on other platforms.
// Also, remove the following local variables when that happens
// (https://crbug.com/578168 and https://crbug.com/602427).
-#if defined(USE_AURA)
+#if !defined(OS_ANDROID)
if (GetTextInputManager())
GetTextInputManager()->SelectionChanged(this, text, offset, range);
#else
@@ -150,7 +163,7 @@ base::string16 RenderWidgetHostViewBase::GetSelectedText() {
// TODO(ekaramad): Use TextInputManager code paths for IME on other platforms.
// Also, remove the following local variables when that happens
// (https://crbug.com/578168 and https://crbug.com/602427).
-#if defined(USE_AURA)
+#if !defined(OS_ANDROID)
if (!GetTextInputManager())
return base::string16();

Powered by Google App Engine
This is Rietveld 408576698