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

Side by Side Diff: content/browser/renderer_host/render_widget_host_view_base.cc

Issue 12262050: Send selected text and page title to pageLauncher.OnClicked. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 7 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 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 "content/browser/accessibility/browser_accessibility_manager.h" 8 #include "content/browser/accessibility/browser_accessibility_manager.h"
9 #include "content/browser/renderer_host/basic_mouse_wheel_smooth_scroll_gesture. h" 9 #include "content/browser/renderer_host/basic_mouse_wheel_smooth_scroll_gesture. h"
10 #include "content/browser/renderer_host/render_widget_host_impl.h" 10 #include "content/browser/renderer_host/render_widget_host_impl.h"
(...skipping 361 matching lines...) Expand 10 before | Expand all | Expand 10 after
372 372
373 bool RenderWidgetHostViewBase::IsShowingContextMenu() const { 373 bool RenderWidgetHostViewBase::IsShowingContextMenu() const {
374 return showing_context_menu_; 374 return showing_context_menu_;
375 } 375 }
376 376
377 void RenderWidgetHostViewBase::SetShowingContextMenu(bool showing) { 377 void RenderWidgetHostViewBase::SetShowingContextMenu(bool showing) {
378 DCHECK_NE(showing_context_menu_, showing); 378 DCHECK_NE(showing_context_menu_, showing);
379 showing_context_menu_ = showing; 379 showing_context_menu_ = showing;
380 } 380 }
381 381
382 string16 RenderWidgetHostViewBase::GetSelectedText() const {
383 if (!selection_range_.IsValid())
384 return string16();
385 return selection_text_.substr(
386 selection_range_.GetMin() - selection_text_offset_,
387 selection_range_.length());
388 }
389
382 bool RenderWidgetHostViewBase::IsMouseLocked() { 390 bool RenderWidgetHostViewBase::IsMouseLocked() {
383 return mouse_locked_; 391 return mouse_locked_;
384 } 392 }
385 393
386 void RenderWidgetHostViewBase::UnhandledWheelEvent( 394 void RenderWidgetHostViewBase::UnhandledWheelEvent(
387 const WebKit::WebMouseWheelEvent& event) { 395 const WebKit::WebMouseWheelEvent& event) {
388 // Most implementations don't need to do anything here. 396 // Most implementations don't need to do anything here.
389 } 397 }
390 398
391 void RenderWidgetHostViewBase::SetPopupType(WebKit::WebPopupType popup_type) { 399 void RenderWidgetHostViewBase::SetPopupType(WebKit::WebPopupType popup_type) {
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
431 int mouse_event_y) { 439 int mouse_event_y) {
432 return new BasicMouseWheelSmoothScrollGesture(scroll_down, pixels_to_scroll, 440 return new BasicMouseWheelSmoothScrollGesture(scroll_down, pixels_to_scroll,
433 mouse_event_x, mouse_event_y); 441 mouse_event_x, mouse_event_y);
434 } 442 }
435 443
436 void RenderWidgetHostViewBase::ProcessAckedTouchEvent( 444 void RenderWidgetHostViewBase::ProcessAckedTouchEvent(
437 const WebKit::WebTouchEvent& touch, InputEventAckState ack_result) { 445 const WebKit::WebTouchEvent& touch, InputEventAckState ack_result) {
438 } 446 }
439 447
440 } // namespace content 448 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/renderer_host/render_widget_host_view_base.h ('k') | content/public/browser/render_widget_host_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698