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

Side by Side Diff: content/browser/renderer_host/render_widget_host_view_base.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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/renderer_host/render_widget_host_view_base.h" 5 #include "content/browser/renderer_host/render_widget_host_view_base.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "build/build_config.h" 8 #include "build/build_config.h"
9 #include "content/browser/accessibility/browser_accessibility_manager.h" 9 #include "content/browser/accessibility/browser_accessibility_manager.h"
10 #include "content/browser/gpu/gpu_data_manager_impl.h" 10 #include "content/browser/gpu/gpu_data_manager_impl.h"
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after
128 128
129 bool RenderWidgetHostViewBase::IsShowingContextMenu() const { 129 bool RenderWidgetHostViewBase::IsShowingContextMenu() const {
130 return showing_context_menu_; 130 return showing_context_menu_;
131 } 131 }
132 132
133 void RenderWidgetHostViewBase::SetShowingContextMenu(bool showing) { 133 void RenderWidgetHostViewBase::SetShowingContextMenu(bool showing) {
134 DCHECK_NE(showing_context_menu_, showing); 134 DCHECK_NE(showing_context_menu_, showing);
135 showing_context_menu_ = showing; 135 showing_context_menu_ = showing;
136 } 136 }
137 137
138 base::string16 RenderWidgetHostViewBase::GetSelectedText() const {
139 if (!selection_range_.IsValid())
140 return base::string16();
141 return selection_text_.substr(
142 selection_range_.GetMin() - selection_text_offset_,
143 selection_range_.length());
144 }
145
146 bool RenderWidgetHostViewBase::IsMouseLocked() { 138 bool RenderWidgetHostViewBase::IsMouseLocked() {
147 return mouse_locked_; 139 return mouse_locked_;
148 } 140 }
149 141
150 InputEventAckState RenderWidgetHostViewBase::FilterInputEvent( 142 InputEventAckState RenderWidgetHostViewBase::FilterInputEvent(
151 const blink::WebInputEvent& input_event) { 143 const blink::WebInputEvent& input_event) {
152 // By default, input events are simply forwarded to the renderer. 144 // By default, input events are simply forwarded to the renderer.
153 return INPUT_EVENT_ACK_STATE_NOT_CONSUMED; 145 return INPUT_EVENT_ACK_STATE_NOT_CONSUMED;
154 } 146 }
155 147
(...skipping 309 matching lines...) Expand 10 before | Expand all | Expand 10 after
465 } 457 }
466 458
467 bool RenderWidgetHostViewBase::IsChildFrameForTesting() const { 459 bool RenderWidgetHostViewBase::IsChildFrameForTesting() const {
468 return false; 460 return false;
469 } 461 }
470 462
471 cc::SurfaceId RenderWidgetHostViewBase::SurfaceIdForTesting() const { 463 cc::SurfaceId RenderWidgetHostViewBase::SurfaceIdForTesting() const {
472 return cc::SurfaceId(); 464 return cc::SurfaceId();
473 } 465 }
474 466
467 base::string16 RenderWidgetHostViewBase::GetSelectedTextForTesting() {
468 if (!selection_range_.IsValid())
469 return base::string16();
470 return selection_text_.substr(
471 selection_range_.GetMin() - selection_text_offset_,
472 selection_range_.length());
473 }
474
475 } // namespace content 475 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698