| 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/renderer/render_view_impl.h" | 5 #include "content/renderer/render_view_impl.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <cmath> | 8 #include <cmath> |
| 9 #include <memory> | 9 #include <memory> |
| 10 | 10 |
| (...skipping 1171 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1182 #endif // ENABLE_PLUGINS | 1182 #endif // ENABLE_PLUGINS |
| 1183 | 1183 |
| 1184 void RenderViewImpl::TransferActiveWheelFlingAnimation( | 1184 void RenderViewImpl::TransferActiveWheelFlingAnimation( |
| 1185 const blink::WebActiveWheelFlingParameters& params) { | 1185 const blink::WebActiveWheelFlingParameters& params) { |
| 1186 if (webview()) | 1186 if (webview()) |
| 1187 webview()->transferActiveWheelFlingAnimation(params); | 1187 webview()->transferActiveWheelFlingAnimation(params); |
| 1188 } | 1188 } |
| 1189 | 1189 |
| 1190 // RenderWidgetInputHandlerDelegate ----------------------------------------- | 1190 // RenderWidgetInputHandlerDelegate ----------------------------------------- |
| 1191 | 1191 |
| 1192 void RenderViewImpl::RenderWidgetFocusChangeComplete() { | |
| 1193 for (auto& observer : observers_) | |
| 1194 observer.FocusChangeComplete(); | |
| 1195 } | |
| 1196 | |
| 1197 bool RenderViewImpl::DoesRenderWidgetHaveTouchEventHandlersAt( | 1192 bool RenderViewImpl::DoesRenderWidgetHaveTouchEventHandlersAt( |
| 1198 const gfx::Point& point) const { | 1193 const gfx::Point& point) const { |
| 1199 if (!webview()) | 1194 if (!webview()) |
| 1200 return false; | 1195 return false; |
| 1201 return webview()->hasTouchEventHandlersAt(point); | 1196 return webview()->hasTouchEventHandlersAt(point); |
| 1202 } | 1197 } |
| 1203 | 1198 |
| 1204 bool RenderViewImpl::RenderWidgetWillHandleMouseEvent( | 1199 bool RenderViewImpl::RenderWidgetWillHandleMouseEvent( |
| 1205 const blink::WebMouseEvent& event) { | 1200 const blink::WebMouseEvent& event) { |
| 1206 // If the mouse is locked, only the current owner of the mouse lock can | 1201 // If the mouse is locked, only the current owner of the mouse lock can |
| (...skipping 607 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1814 void RenderViewImpl::show(WebNavigationPolicy policy) { | 1809 void RenderViewImpl::show(WebNavigationPolicy policy) { |
| 1815 if (did_show_ && !webkit_preferences_.supports_multiple_windows) { | 1810 if (did_show_ && !webkit_preferences_.supports_multiple_windows) { |
| 1816 // When supports_multiple_windows is disabled, popups are reusing | 1811 // When supports_multiple_windows is disabled, popups are reusing |
| 1817 // the same view. In some scenarios, this makes WebKit to call show() twice. | 1812 // the same view. In some scenarios, this makes WebKit to call show() twice. |
| 1818 return; | 1813 return; |
| 1819 } | 1814 } |
| 1820 | 1815 |
| 1821 RenderWidget::show(policy); | 1816 RenderWidget::show(policy); |
| 1822 } | 1817 } |
| 1823 | 1818 |
| 1824 void RenderViewImpl::onMouseDown(const WebNode& mouse_down_node) { | |
| 1825 for (auto& observer : observers_) | |
| 1826 observer.OnMouseDown(mouse_down_node); | |
| 1827 } | |
| 1828 | |
| 1829 void RenderViewImpl::didHandleGestureEvent( | 1819 void RenderViewImpl::didHandleGestureEvent( |
| 1830 const WebGestureEvent& event, | 1820 const WebGestureEvent& event, |
| 1831 bool event_cancelled) { | 1821 bool event_cancelled) { |
| 1832 RenderWidget::didHandleGestureEvent(event, event_cancelled); | 1822 RenderWidget::didHandleGestureEvent(event, event_cancelled); |
| 1833 | 1823 |
| 1834 if (!event_cancelled) { | 1824 if (!event_cancelled) { |
| 1835 for (auto& observer : observers_) | 1825 for (auto& observer : observers_) |
| 1836 observer.DidHandleGestureEvent(event); | 1826 observer.DidHandleGestureEvent(event); |
| 1837 } | 1827 } |
| 1838 } | 1828 } |
| (...skipping 873 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2712 INPUT_EVENT_ACK_STATE_NOT_CONSUMED); | 2702 INPUT_EVENT_ACK_STATE_NOT_CONSUMED); |
| 2713 } | 2703 } |
| 2714 | 2704 |
| 2715 std::unique_ptr<InputEventAck> ack( | 2705 std::unique_ptr<InputEventAck> ack( |
| 2716 new InputEventAck(InputEventAckSource::MAIN_THREAD, input_event->type(), | 2706 new InputEventAck(InputEventAckSource::MAIN_THREAD, input_event->type(), |
| 2717 INPUT_EVENT_ACK_STATE_NOT_CONSUMED)); | 2707 INPUT_EVENT_ACK_STATE_NOT_CONSUMED)); |
| 2718 OnInputEventAck(std::move(ack)); | 2708 OnInputEventAck(std::move(ack)); |
| 2719 } | 2709 } |
| 2720 | 2710 |
| 2721 } // namespace content | 2711 } // namespace content |
| OLD | NEW |