OLD | NEW |
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/gpu/gpu_data_manager_impl.h" | 9 #include "content/browser/gpu/gpu_data_manager_impl.h" |
10 #include "content/browser/renderer_host/input/synthetic_gesture_target_base.h" | 10 #include "content/browser/renderer_host/input/synthetic_gesture_target_base.h" |
(...skipping 427 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
438 return base::string16(); | 438 return base::string16(); |
439 return selection_text_.substr( | 439 return selection_text_.substr( |
440 selection_range_.GetMin() - selection_text_offset_, | 440 selection_range_.GetMin() - selection_text_offset_, |
441 selection_range_.length()); | 441 selection_range_.length()); |
442 } | 442 } |
443 | 443 |
444 bool RenderWidgetHostViewBase::IsMouseLocked() { | 444 bool RenderWidgetHostViewBase::IsMouseLocked() { |
445 return mouse_locked_; | 445 return mouse_locked_; |
446 } | 446 } |
447 | 447 |
448 void RenderWidgetHostViewBase::UnhandledWheelEvent( | |
449 const blink::WebMouseWheelEvent& event) { | |
450 // Most implementations don't need to do anything here. | |
451 } | |
452 | |
453 InputEventAckState RenderWidgetHostViewBase::FilterInputEvent( | 448 InputEventAckState RenderWidgetHostViewBase::FilterInputEvent( |
454 const blink::WebInputEvent& input_event) { | 449 const blink::WebInputEvent& input_event) { |
455 // By default, input events are simply forwarded to the renderer. | 450 // By default, input events are simply forwarded to the renderer. |
456 return INPUT_EVENT_ACK_STATE_NOT_CONSUMED; | 451 return INPUT_EVENT_ACK_STATE_NOT_CONSUMED; |
457 } | 452 } |
458 | 453 |
459 void RenderWidgetHostViewBase::OnDidFlushInput() { | 454 void RenderWidgetHostViewBase::OnDidFlushInput() { |
460 // The notification can safely be ignored by most implementations. | 455 // The notification can safely be ignored by most implementations. |
461 } | 456 } |
462 | 457 |
463 void RenderWidgetHostViewBase::OnSetNeedsFlushInput() { | 458 void RenderWidgetHostViewBase::OnSetNeedsFlushInput() { |
464 if (flush_input_timer_.IsRunning()) | 459 if (flush_input_timer_.IsRunning()) |
465 return; | 460 return; |
466 | 461 |
467 flush_input_timer_.Start( | 462 flush_input_timer_.Start( |
468 FROM_HERE, | 463 FROM_HERE, |
469 base::TimeDelta::FromMicroseconds(kFlushInputRateInUs), | 464 base::TimeDelta::FromMicroseconds(kFlushInputRateInUs), |
470 this, | 465 this, |
471 &RenderWidgetHostViewBase::FlushInput); | 466 &RenderWidgetHostViewBase::FlushInput); |
472 } | 467 } |
473 | 468 |
| 469 void RenderWidgetHostViewBase::WheelEventAck( |
| 470 const blink::WebMouseWheelEvent& event, |
| 471 InputEventAckState ack_result) { |
| 472 } |
| 473 |
474 void RenderWidgetHostViewBase::GestureEventAck( | 474 void RenderWidgetHostViewBase::GestureEventAck( |
475 const blink::WebGestureEvent& event, | 475 const blink::WebGestureEvent& event, |
476 InputEventAckState ack_result) { | 476 InputEventAckState ack_result) { |
477 } | 477 } |
478 | 478 |
479 void RenderWidgetHostViewBase::SetPopupType(blink::WebPopupType popup_type) { | 479 void RenderWidgetHostViewBase::SetPopupType(blink::WebPopupType popup_type) { |
480 popup_type_ = popup_type; | 480 popup_type_ = popup_type; |
481 } | 481 } |
482 | 482 |
483 blink::WebPopupType RenderWidgetHostViewBase::GetPopupType() { | 483 blink::WebPopupType RenderWidgetHostViewBase::GetPopupType() { |
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
602 | 602 |
603 gfx::Size RenderWidgetHostViewBase::GetVisibleViewportSize() const { | 603 gfx::Size RenderWidgetHostViewBase::GetVisibleViewportSize() const { |
604 return GetViewBounds().size(); | 604 return GetViewBounds().size(); |
605 } | 605 } |
606 | 606 |
607 void RenderWidgetHostViewBase::SetInsets(const gfx::Insets& insets) { | 607 void RenderWidgetHostViewBase::SetInsets(const gfx::Insets& insets) { |
608 NOTIMPLEMENTED(); | 608 NOTIMPLEMENTED(); |
609 } | 609 } |
610 | 610 |
611 } // namespace content | 611 } // namespace content |
OLD | NEW |