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

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

Issue 2149493004: [refactor] Removing the dead method RenderWidgetHostView::GetSelectedText() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Call method on correct view 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/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 82c0da905fed88467e9c5d96f56e124db41b464c..1f0e19240bfe54a0da208f1c6af58ae88489f6c9 100644
--- a/content/browser/frame_host/render_widget_host_view_guest.cc
+++ b/content/browser/frame_host/render_widget_host_view_guest.cc
@@ -246,10 +246,6 @@ 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) {
if (guest_)
@@ -437,6 +433,13 @@ void RenderWidgetHostViewGuest::ImeCompositionRangeChanged(
void RenderWidgetHostViewGuest::SelectionChanged(const base::string16& text,
size_t offset,
const gfx::Range& range) {
+ // TODO(ekaramad): For the test WebViewInteractiveTest.TextSelection, we need
+ // to test the value of |selection_text_| by using the base class method
+ // GetSelectedTextForTesting(). This update makes sure we have the right
+ // value. This line along with the test method should be removed when issue
+ // crbug.com/578168 is fixed.
+ RenderWidgetHostViewBase::SelectionChanged(text, offset, range);
Charlie Reis 2016/07/14 22:45:06 I don't think we should add this, if we can avoid
+
platform_view_->SelectionChanged(text, offset, range);
}

Powered by Google App Engine
This is Rietveld 408576698