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

Side by Side 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/browser/frame_host/render_widget_host_view_guest.h" 5 #include "content/browser/frame_host/render_widget_host_view_guest.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/bind_helpers.h" 9 #include "base/bind_helpers.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 228 matching lines...) Expand 10 before | Expand all | Expand 10 after
239 RenderWidgetHostViewChildFrame::Destroy(); 239 RenderWidgetHostViewChildFrame::Destroy();
240 240
241 if (platform_view_) // The platform view might have been destroyed already. 241 if (platform_view_) // The platform view might have been destroyed already.
242 platform_view_->Destroy(); 242 platform_view_->Destroy();
243 } 243 }
244 244
245 gfx::Size RenderWidgetHostViewGuest::GetPhysicalBackingSize() const { 245 gfx::Size RenderWidgetHostViewGuest::GetPhysicalBackingSize() const {
246 return RenderWidgetHostViewBase::GetPhysicalBackingSize(); 246 return RenderWidgetHostViewBase::GetPhysicalBackingSize();
247 } 247 }
248 248
249 base::string16 RenderWidgetHostViewGuest::GetSelectedText() const {
250 return platform_view_->GetSelectedText();
251 }
252
253 void RenderWidgetHostViewGuest::SetTooltipText( 249 void RenderWidgetHostViewGuest::SetTooltipText(
254 const base::string16& tooltip_text) { 250 const base::string16& tooltip_text) {
255 if (guest_) 251 if (guest_)
256 guest_->SetTooltipText(tooltip_text); 252 guest_->SetTooltipText(tooltip_text);
257 } 253 }
258 254
259 void RenderWidgetHostViewGuest::OnSwapCompositorFrame( 255 void RenderWidgetHostViewGuest::OnSwapCompositorFrame(
260 uint32_t output_surface_id, 256 uint32_t output_surface_id,
261 cc::CompositorFrame frame) { 257 cc::CompositorFrame frame) {
262 TRACE_EVENT0("content", "RenderWidgetHostViewGuest::OnSwapCompositorFrame"); 258 TRACE_EVENT0("content", "RenderWidgetHostViewGuest::OnSwapCompositorFrame");
(...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after
430 character_bounds[i].size())); 426 character_bounds[i].size()));
431 } 427 }
432 // Forward the information to embedding RWHV. 428 // Forward the information to embedding RWHV.
433 rwhv->ImeCompositionRangeChanged(range, guest_character_bounds); 429 rwhv->ImeCompositionRangeChanged(range, guest_character_bounds);
434 } 430 }
435 #endif 431 #endif
436 432
437 void RenderWidgetHostViewGuest::SelectionChanged(const base::string16& text, 433 void RenderWidgetHostViewGuest::SelectionChanged(const base::string16& text,
438 size_t offset, 434 size_t offset,
439 const gfx::Range& range) { 435 const gfx::Range& range) {
436 // TODO(ekaramad): For the test WebViewInteractiveTest.TextSelection, we need
437 // to test the value of |selection_text_| by using the base class method
438 // GetSelectedTextForTesting(). This update makes sure we have the right
439 // value. This line along with the test method should be removed when issue
440 // crbug.com/578168 is fixed.
441 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
442
440 platform_view_->SelectionChanged(text, offset, range); 443 platform_view_->SelectionChanged(text, offset, range);
441 } 444 }
442 445
443 void RenderWidgetHostViewGuest::SelectionBoundsChanged( 446 void RenderWidgetHostViewGuest::SelectionBoundsChanged(
444 const ViewHostMsg_SelectionBounds_Params& params) { 447 const ViewHostMsg_SelectionBounds_Params& params) {
445 if (!guest_) 448 if (!guest_)
446 return; 449 return;
447 450
448 RenderWidgetHostViewBase* rwhv = GetOwnerRenderWidgetHostView(); 451 RenderWidgetHostViewBase* rwhv = GetOwnerRenderWidgetHostView();
449 if (!rwhv) 452 if (!rwhv)
(...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after
620 gesture_event.data.scrollUpdate.inertialPhase == 623 gesture_event.data.scrollUpdate.inertialPhase ==
621 blink::WebGestureEvent::MomentumPhase) { 624 blink::WebGestureEvent::MomentumPhase) {
622 return; 625 return;
623 } 626 }
624 host_->ForwardGestureEvent(gesture_event); 627 host_->ForwardGestureEvent(gesture_event);
625 return; 628 return;
626 } 629 }
627 } 630 }
628 631
629 } // namespace content 632 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698