Chromium Code Reviews| 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 2004 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2015 GetRoutingID(), rwc->GetInputHandler(), AsWeakPtr(), | 2015 GetRoutingID(), rwc->GetInputHandler(), AsWeakPtr(), |
| 2016 webkit_preferences_.enable_scroll_animator); | 2016 webkit_preferences_.enable_scroll_animator); |
| 2017 has_added_input_handler_ = true; | 2017 has_added_input_handler_ = true; |
| 2018 } | 2018 } |
| 2019 } | 2019 } |
| 2020 | 2020 |
| 2021 void RenderViewImpl::closeWidgetSoon() { | 2021 void RenderViewImpl::closeWidgetSoon() { |
| 2022 RenderWidget::closeWidgetSoon(); | 2022 RenderWidget::closeWidgetSoon(); |
| 2023 } | 2023 } |
| 2024 | 2024 |
| 2025 void RenderViewImpl::convertViewportToWindow(blink::WebRect* rect) { | |
| 2026 RenderWidget::convertViewportToWindow(rect); | |
| 2027 } | |
| 2028 | |
| 2029 void RenderViewImpl::convertWindowToViewport(blink::WebFloatRect* rect) { | |
| 2030 RenderWidget::convertWindowToViewport(rect); | |
| 2031 } | |
| 2032 | |
| 2033 void RenderViewImpl::didAutoResize(const blink::WebSize& newSize) { | 2025 void RenderViewImpl::didAutoResize(const blink::WebSize& newSize) { |
| 2034 RenderWidget::DidAutoResize(newSize); | 2026 RenderWidget::DidAutoResize(newSize); |
| 2035 } | 2027 } |
| 2036 | 2028 |
| 2037 void RenderViewImpl::didOverscroll( | 2029 void RenderViewImpl::didOverscroll( |
| 2038 const blink::WebFloatSize& overscrollDelta, | 2030 const blink::WebFloatSize& overscrollDelta, |
| 2039 const blink::WebFloatSize& accumulatedOverscroll, | 2031 const blink::WebFloatSize& accumulatedOverscroll, |
| 2040 const blink::WebFloatPoint& positionInViewport, | 2032 const blink::WebFloatPoint& positionInViewport, |
| 2041 const blink::WebFloatSize& velocityInViewport) { | 2033 const blink::WebFloatSize& velocityInViewport) { |
| 2042 RenderWidget::didOverscroll(overscrollDelta, accumulatedOverscroll, | 2034 RenderWidget::didOverscroll(overscrollDelta, accumulatedOverscroll, |
| (...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2106 } | 2098 } |
| 2107 | 2099 |
| 2108 void RenderViewImpl::ClearEditCommands() { | 2100 void RenderViewImpl::ClearEditCommands() { |
| 2109 edit_commands_.clear(); | 2101 edit_commands_.clear(); |
| 2110 } | 2102 } |
| 2111 | 2103 |
| 2112 const std::string& RenderViewImpl::GetAcceptLanguages() const { | 2104 const std::string& RenderViewImpl::GetAcceptLanguages() const { |
| 2113 return renderer_preferences_.accept_languages; | 2105 return renderer_preferences_.accept_languages; |
| 2114 } | 2106 } |
| 2115 | 2107 |
| 2116 void RenderViewImpl::ConvertViewportToWindowViaWidget(blink::WebRect* rect) { | 2108 void RenderViewImpl::ConvertViewportToWindowViaWidget(blink::WebRect* rect) { |
|
dcheng
2016/09/02 08:57:39
These all need to move eventually as well, right?
lfg
2016/09/02 17:36:37
Yes, that's right. However, drag and drop depends
| |
| 2117 convertViewportToWindow(rect); | 2109 GetWidget()->convertViewportToWindow(rect); |
| 2118 } | 2110 } |
| 2119 | 2111 |
| 2120 gfx::RectF RenderViewImpl::ElementBoundsInWindow( | 2112 gfx::RectF RenderViewImpl::ElementBoundsInWindow( |
| 2121 const blink::WebElement& element) { | 2113 const blink::WebElement& element) { |
| 2122 blink::WebRect bounding_box_in_window = element.boundsInViewport(); | 2114 blink::WebRect bounding_box_in_window = element.boundsInViewport(); |
| 2123 ConvertViewportToWindowViaWidget(&bounding_box_in_window); | 2115 ConvertViewportToWindowViaWidget(&bounding_box_in_window); |
| 2124 return gfx::RectF(bounding_box_in_window); | 2116 return gfx::RectF(bounding_box_in_window); |
| 2125 } | 2117 } |
| 2126 | 2118 |
| 2127 bool RenderViewImpl::HasAddedInputHandler() const { | 2119 bool RenderViewImpl::HasAddedInputHandler() const { |
| 2128 return has_added_input_handler_; | 2120 return has_added_input_handler_; |
| 2129 } | 2121 } |
| 2130 | 2122 |
| 2131 gfx::Point RenderViewImpl::ConvertWindowPointToViewport( | 2123 gfx::Point RenderViewImpl::ConvertWindowPointToViewport( |
| 2132 const gfx::Point& point) { | 2124 const gfx::Point& point) { |
| 2133 blink::WebFloatRect point_in_viewport(point.x(), point.y(), 0, 0); | 2125 blink::WebFloatRect point_in_viewport(point.x(), point.y(), 0, 0); |
| 2134 convertWindowToViewport(&point_in_viewport); | 2126 GetWidget()->convertWindowToViewport(&point_in_viewport); |
| 2135 return gfx::Point(point_in_viewport.x, point_in_viewport.y); | 2127 return gfx::Point(point_in_viewport.x, point_in_viewport.y); |
| 2136 } | 2128 } |
| 2137 | 2129 |
| 2138 void RenderViewImpl::didChangeIcon(WebLocalFrame* frame, | 2130 void RenderViewImpl::didChangeIcon(WebLocalFrame* frame, |
| 2139 WebIconURL::Type icon_type) { | 2131 WebIconURL::Type icon_type) { |
| 2140 if (frame->parent()) | 2132 if (frame->parent()) |
| 2141 return; | 2133 return; |
| 2142 | 2134 |
| 2143 WebVector<WebIconURL> icon_urls = frame->iconURLs(icon_type); | 2135 WebVector<WebIconURL> icon_urls = frame->iconURLs(icon_type); |
| 2144 std::vector<FaviconURL> urls; | 2136 std::vector<FaviconURL> urls; |
| (...skipping 935 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 3080 return render_frame->focused_pepper_plugin(); | 3072 return render_frame->focused_pepper_plugin(); |
| 3081 } | 3073 } |
| 3082 frame = frame->traverseNext(false); | 3074 frame = frame->traverseNext(false); |
| 3083 } | 3075 } |
| 3084 | 3076 |
| 3085 return nullptr; | 3077 return nullptr; |
| 3086 } | 3078 } |
| 3087 #endif | 3079 #endif |
| 3088 | 3080 |
| 3089 } // namespace content | 3081 } // namespace content |
| OLD | NEW |