| 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 | 9 |
| 10 #include "base/auto_reset.h" | 10 #include "base/auto_reset.h" |
| (...skipping 1993 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2004 | 2004 |
| 2005 void RenderViewImpl::requestPointerUnlock() { | 2005 void RenderViewImpl::requestPointerUnlock() { |
| 2006 mouse_lock_dispatcher_->UnlockMouse(webwidget_mouse_lock_target_.get()); | 2006 mouse_lock_dispatcher_->UnlockMouse(webwidget_mouse_lock_target_.get()); |
| 2007 } | 2007 } |
| 2008 | 2008 |
| 2009 bool RenderViewImpl::isPointerLocked() { | 2009 bool RenderViewImpl::isPointerLocked() { |
| 2010 return mouse_lock_dispatcher_->IsMouseLockedTo( | 2010 return mouse_lock_dispatcher_->IsMouseLockedTo( |
| 2011 webwidget_mouse_lock_target_.get()); | 2011 webwidget_mouse_lock_target_.get()); |
| 2012 } | 2012 } |
| 2013 | 2013 |
| 2014 void RenderViewImpl::onMouseDown(const WebNode& mouse_down_node) { |
| 2015 FOR_EACH_OBSERVER( |
| 2016 RenderViewObserver, observers_, OnMouseDown(mouse_down_node)); |
| 2017 } |
| 2018 |
| 2014 void RenderViewImpl::didHandleGestureEvent( | 2019 void RenderViewImpl::didHandleGestureEvent( |
| 2015 const WebGestureEvent& event, | 2020 const WebGestureEvent& event, |
| 2016 bool event_cancelled) { | 2021 bool event_cancelled) { |
| 2017 RenderWidget::didHandleGestureEvent(event, event_cancelled); | 2022 RenderWidget::didHandleGestureEvent(event, event_cancelled); |
| 2018 | 2023 |
| 2019 if (!event_cancelled) { | 2024 if (!event_cancelled) { |
| 2020 FOR_EACH_OBSERVER( | 2025 FOR_EACH_OBSERVER( |
| 2021 RenderViewObserver, observers_, DidHandleGestureEvent(event)); | 2026 RenderViewObserver, observers_, DidHandleGestureEvent(event)); |
| 2022 } | 2027 } |
| 2023 | 2028 |
| (...skipping 1053 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3077 | 3082 |
| 3078 bool RenderViewImpl::WillHandleGestureEvent( | 3083 bool RenderViewImpl::WillHandleGestureEvent( |
| 3079 const blink::WebGestureEvent& event) { | 3084 const blink::WebGestureEvent& event) { |
| 3080 possible_drag_event_info_.event_source = | 3085 possible_drag_event_info_.event_source = |
| 3081 ui::DragDropTypes::DRAG_EVENT_SOURCE_TOUCH; | 3086 ui::DragDropTypes::DRAG_EVENT_SOURCE_TOUCH; |
| 3082 possible_drag_event_info_.event_location = | 3087 possible_drag_event_info_.event_location = |
| 3083 gfx::Point(event.globalX, event.globalY); | 3088 gfx::Point(event.globalX, event.globalY); |
| 3084 return false; | 3089 return false; |
| 3085 } | 3090 } |
| 3086 | 3091 |
| 3087 void RenderViewImpl::DidHandleMouseEvent(const WebMouseEvent& event) { | |
| 3088 FOR_EACH_OBSERVER(RenderViewObserver, observers_, DidHandleMouseEvent(event)); | |
| 3089 } | |
| 3090 | |
| 3091 bool RenderViewImpl::HasTouchEventHandlersAt(const gfx::Point& point) const { | 3092 bool RenderViewImpl::HasTouchEventHandlersAt(const gfx::Point& point) const { |
| 3092 if (!webview()) | 3093 if (!webview()) |
| 3093 return false; | 3094 return false; |
| 3094 return webview()->hasTouchEventHandlersAt(point); | 3095 return webview()->hasTouchEventHandlersAt(point); |
| 3095 } | 3096 } |
| 3096 | 3097 |
| 3097 void RenderViewImpl::OnWasHidden() { | 3098 void RenderViewImpl::OnWasHidden() { |
| 3098 RenderWidget::OnWasHidden(); | 3099 RenderWidget::OnWasHidden(); |
| 3099 | 3100 |
| 3100 #if defined(OS_ANDROID) && defined(ENABLE_WEBRTC) | 3101 #if defined(OS_ANDROID) && defined(ENABLE_WEBRTC) |
| (...skipping 677 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3778 std::vector<gfx::Size> sizes; | 3779 std::vector<gfx::Size> sizes; |
| 3779 ConvertToFaviconSizes(icon_urls[i].sizes(), &sizes); | 3780 ConvertToFaviconSizes(icon_urls[i].sizes(), &sizes); |
| 3780 if (!url.isEmpty()) | 3781 if (!url.isEmpty()) |
| 3781 urls.push_back( | 3782 urls.push_back( |
| 3782 FaviconURL(url, ToFaviconType(icon_urls[i].iconType()), sizes)); | 3783 FaviconURL(url, ToFaviconType(icon_urls[i].iconType()), sizes)); |
| 3783 } | 3784 } |
| 3784 SendUpdateFaviconURL(urls); | 3785 SendUpdateFaviconURL(urls); |
| 3785 } | 3786 } |
| 3786 | 3787 |
| 3787 } // namespace content | 3788 } // namespace content |
| OLD | NEW |