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

Unified Diff: content/browser/frame_host/render_widget_host_view_guest.cc

Issue 149803008: Reland r247589:<webview>: Fix text selection features in mac. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 10 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 | « content/browser/frame_host/render_widget_host_view_guest.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/frame_host/render_widget_host_view_guest.cc
diff --git a/content/browser/frame_host/render_widget_host_view_guest.cc b/content/browser/frame_host/render_widget_host_view_guest.cc
index 59d1af6794e25a6122e82cc1761596a1ac0f3482..47663753e074401c168d30bbea4d8ffc8336025a 100644
--- a/content/browser/frame_host/render_widget_host_view_guest.cc
+++ b/content/browser/frame_host/render_widget_host_view_guest.cc
@@ -161,6 +161,10 @@ gfx::Size RenderWidgetHostViewGuest::GetPhysicalBackingSize() const {
return RenderWidgetHostViewBase::GetPhysicalBackingSize();
}
+base::string16 RenderWidgetHostViewGuest::GetSelectedText() const {
+ return platform_view_->GetSelectedText();
+}
+
void RenderWidgetHostViewGuest::SetTooltipText(
const base::string16& tooltip_text) {
platform_view_->SetTooltipText(tooltip_text);
@@ -332,12 +336,7 @@ void RenderWidgetHostViewGuest::DidUpdateBackingStore(
void RenderWidgetHostViewGuest::SelectionChanged(const base::string16& text,
size_t offset,
const gfx::Range& range) {
- RenderWidgetHostViewPort* rwhv = RenderWidgetHostViewPort::FromRWHV(
- guest_->GetEmbedderRenderWidgetHostView());
- if (!rwhv)
- return;
- // Forward the information to embedding RWHV.
- rwhv->SelectionChanged(text, offset, range);
+ platform_view_->SelectionChanged(text, offset, range);
}
void RenderWidgetHostViewGuest::SelectionBoundsChanged(
« no previous file with comments | « content/browser/frame_host/render_widget_host_view_guest.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698