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 2171 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2182 top_controls_height_, | 2182 top_controls_height_, |
2183 browser_controls_shrink_blink_size_); | 2183 browser_controls_shrink_blink_size_); |
2184 } | 2184 } |
2185 | 2185 |
2186 void RenderViewImpl::OnResize(const ResizeParams& params) { | 2186 void RenderViewImpl::OnResize(const ResizeParams& params) { |
2187 TRACE_EVENT0("renderer", "RenderViewImpl::OnResize"); | 2187 TRACE_EVENT0("renderer", "RenderViewImpl::OnResize"); |
2188 if (webview()) { | 2188 if (webview()) { |
2189 webview()->HidePopups(); | 2189 webview()->HidePopups(); |
2190 if (send_preferred_size_changes_ && | 2190 if (send_preferred_size_changes_ && |
2191 webview()->MainFrame()->IsWebLocalFrame()) { | 2191 webview()->MainFrame()->IsWebLocalFrame()) { |
2192 webview()->MainFrame()->SetCanHaveScrollbars(ShouldDisplayScrollbars( | 2192 webview()->MainFrame()->ToWebLocalFrame()->SetCanHaveScrollbars( |
dcheng
2017/06/02 16:29:37
The downcast is a bit unfortunate but I don't have
| |
2193 params.new_size.width(), params.new_size.height())); | 2193 ShouldDisplayScrollbars(params.new_size.width(), |
2194 params.new_size.height())); | |
2194 } | 2195 } |
2195 if (display_mode_ != params.display_mode) { | 2196 if (display_mode_ != params.display_mode) { |
2196 display_mode_ = params.display_mode; | 2197 display_mode_ = params.display_mode; |
2197 webview()->SetDisplayMode(display_mode_); | 2198 webview()->SetDisplayMode(display_mode_); |
2198 } | 2199 } |
2199 } | 2200 } |
2200 | 2201 |
2201 gfx::Size old_visible_viewport_size = visible_viewport_size_; | 2202 gfx::Size old_visible_viewport_size = visible_viewport_size_; |
2202 | 2203 |
2203 browser_controls_shrink_blink_size_ = | 2204 browser_controls_shrink_blink_size_ = |
(...skipping 458 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2662 input_event.GetCoalescedEventsPointers(), latency_info, | 2663 input_event.GetCoalescedEventsPointers(), latency_info, |
2663 dispatch_type); | 2664 dispatch_type); |
2664 return INPUT_EVENT_ACK_STATE_NOT_CONSUMED; | 2665 return INPUT_EVENT_ACK_STATE_NOT_CONSUMED; |
2665 } | 2666 } |
2666 idle_user_detector_->ActivityDetected(); | 2667 idle_user_detector_->ActivityDetected(); |
2667 return RenderWidget::HandleInputEvent(input_event, latency_info, | 2668 return RenderWidget::HandleInputEvent(input_event, latency_info, |
2668 dispatch_type); | 2669 dispatch_type); |
2669 } | 2670 } |
2670 | 2671 |
2671 } // namespace content | 2672 } // namespace content |
OLD | NEW |