| 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 1981 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1992 GetRoutingID(), rwc->GetInputHandler(), AsWeakPtr(), | 1992 GetRoutingID(), rwc->GetInputHandler(), AsWeakPtr(), |
| 1993 webkit_preferences_.enable_scroll_animator); | 1993 webkit_preferences_.enable_scroll_animator); |
| 1994 has_added_input_handler_ = true; | 1994 has_added_input_handler_ = true; |
| 1995 } | 1995 } |
| 1996 } | 1996 } |
| 1997 | 1997 |
| 1998 void RenderViewImpl::closeWidgetSoon() { | 1998 void RenderViewImpl::closeWidgetSoon() { |
| 1999 RenderWidget::closeWidgetSoon(); | 1999 RenderWidget::closeWidgetSoon(); |
| 2000 } | 2000 } |
| 2001 | 2001 |
| 2002 void RenderViewImpl::convertViewportToWindow(blink::WebRect* rect) { | |
| 2003 RenderWidget::convertViewportToWindow(rect); | |
| 2004 } | |
| 2005 | |
| 2006 void RenderViewImpl::convertWindowToViewport(blink::WebFloatRect* rect) { | |
| 2007 RenderWidget::convertWindowToViewport(rect); | |
| 2008 } | |
| 2009 | |
| 2010 void RenderViewImpl::didAutoResize(const blink::WebSize& newSize) { | 2002 void RenderViewImpl::didAutoResize(const blink::WebSize& newSize) { |
| 2011 RenderWidget::DidAutoResize(newSize); | 2003 RenderWidget::DidAutoResize(newSize); |
| 2012 } | 2004 } |
| 2013 | 2005 |
| 2014 void RenderViewImpl::didOverscroll( | 2006 void RenderViewImpl::didOverscroll( |
| 2015 const blink::WebFloatSize& overscrollDelta, | 2007 const blink::WebFloatSize& overscrollDelta, |
| 2016 const blink::WebFloatSize& accumulatedOverscroll, | 2008 const blink::WebFloatSize& accumulatedOverscroll, |
| 2017 const blink::WebFloatPoint& positionInViewport, | 2009 const blink::WebFloatPoint& positionInViewport, |
| 2018 const blink::WebFloatSize& velocityInViewport) { | 2010 const blink::WebFloatSize& velocityInViewport) { |
| 2019 RenderWidget::didOverscroll(overscrollDelta, accumulatedOverscroll, | 2011 RenderWidget::didOverscroll(overscrollDelta, accumulatedOverscroll, |
| (...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2074 | 2066 |
| 2075 void RenderViewImpl::ClearEditCommands() { | 2067 void RenderViewImpl::ClearEditCommands() { |
| 2076 GetWidget()->ClearEditCommands(); | 2068 GetWidget()->ClearEditCommands(); |
| 2077 } | 2069 } |
| 2078 | 2070 |
| 2079 const std::string& RenderViewImpl::GetAcceptLanguages() const { | 2071 const std::string& RenderViewImpl::GetAcceptLanguages() const { |
| 2080 return renderer_preferences_.accept_languages; | 2072 return renderer_preferences_.accept_languages; |
| 2081 } | 2073 } |
| 2082 | 2074 |
| 2083 void RenderViewImpl::ConvertViewportToWindowViaWidget(blink::WebRect* rect) { | 2075 void RenderViewImpl::ConvertViewportToWindowViaWidget(blink::WebRect* rect) { |
| 2084 convertViewportToWindow(rect); | 2076 GetWidget()->convertViewportToWindow(rect); |
| 2085 } | 2077 } |
| 2086 | 2078 |
| 2087 gfx::RectF RenderViewImpl::ElementBoundsInWindow( | 2079 gfx::RectF RenderViewImpl::ElementBoundsInWindow( |
| 2088 const blink::WebElement& element) { | 2080 const blink::WebElement& element) { |
| 2089 blink::WebRect bounding_box_in_window = element.boundsInViewport(); | 2081 blink::WebRect bounding_box_in_window = element.boundsInViewport(); |
| 2090 ConvertViewportToWindowViaWidget(&bounding_box_in_window); | 2082 ConvertViewportToWindowViaWidget(&bounding_box_in_window); |
| 2091 return gfx::RectF(bounding_box_in_window); | 2083 return gfx::RectF(bounding_box_in_window); |
| 2092 } | 2084 } |
| 2093 | 2085 |
| 2094 bool RenderViewImpl::HasAddedInputHandler() const { | 2086 bool RenderViewImpl::HasAddedInputHandler() const { |
| 2095 return has_added_input_handler_; | 2087 return has_added_input_handler_; |
| 2096 } | 2088 } |
| 2097 | 2089 |
| 2098 gfx::Point RenderViewImpl::ConvertWindowPointToViewport( | 2090 gfx::Point RenderViewImpl::ConvertWindowPointToViewport( |
| 2099 const gfx::Point& point) { | 2091 const gfx::Point& point) { |
| 2100 blink::WebFloatRect point_in_viewport(point.x(), point.y(), 0, 0); | 2092 blink::WebFloatRect point_in_viewport(point.x(), point.y(), 0, 0); |
| 2101 convertWindowToViewport(&point_in_viewport); | 2093 GetWidget()->convertWindowToViewport(&point_in_viewport); |
| 2102 return gfx::Point(point_in_viewport.x, point_in_viewport.y); | 2094 return gfx::Point(point_in_viewport.x, point_in_viewport.y); |
| 2103 } | 2095 } |
| 2104 | 2096 |
| 2105 void RenderViewImpl::didChangeIcon(WebLocalFrame* frame, | 2097 void RenderViewImpl::didChangeIcon(WebLocalFrame* frame, |
| 2106 WebIconURL::Type icon_type) { | 2098 WebIconURL::Type icon_type) { |
| 2107 if (frame->parent()) | 2099 if (frame->parent()) |
| 2108 return; | 2100 return; |
| 2109 | 2101 |
| 2110 WebVector<WebIconURL> icon_urls = frame->iconURLs(icon_type); | 2102 WebVector<WebIconURL> icon_urls = frame->iconURLs(icon_type); |
| 2111 std::vector<FaviconURL> urls; | 2103 std::vector<FaviconURL> urls; |
| (...skipping 921 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3033 return render_frame->focused_pepper_plugin(); | 3025 return render_frame->focused_pepper_plugin(); |
| 3034 } | 3026 } |
| 3035 frame = frame->traverseNext(false); | 3027 frame = frame->traverseNext(false); |
| 3036 } | 3028 } |
| 3037 | 3029 |
| 3038 return nullptr; | 3030 return nullptr; |
| 3039 } | 3031 } |
| 3040 #endif | 3032 #endif |
| 3041 | 3033 |
| 3042 } // namespace content | 3034 } // namespace content |
| OLD | NEW |