| 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 2373 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2384 | 2384 |
| 2385 if (!new_size.IsEmpty()) { | 2385 if (!new_size.IsEmpty()) { |
| 2386 ResizeParams resize_params; | 2386 ResizeParams resize_params; |
| 2387 resize_params.screen_info = screen_info_; | 2387 resize_params.screen_info = screen_info_; |
| 2388 resize_params.new_size = new_size; | 2388 resize_params.new_size = new_size; |
| 2389 resize_params.physical_backing_size = physical_backing_size_; | 2389 resize_params.physical_backing_size = physical_backing_size_; |
| 2390 resize_params.top_controls_shrink_blink_size = | 2390 resize_params.top_controls_shrink_blink_size = |
| 2391 top_controls_shrink_blink_size_; | 2391 top_controls_shrink_blink_size_; |
| 2392 resize_params.top_controls_height = top_controls_height_; | 2392 resize_params.top_controls_height = top_controls_height_; |
| 2393 resize_params.visible_viewport_size = visible_viewport_size_; | 2393 resize_params.visible_viewport_size = visible_viewport_size_; |
| 2394 resize_params.resizer_rect = resizer_rect_; | |
| 2395 resize_params.is_fullscreen_granted = is_fullscreen_granted(); | 2394 resize_params.is_fullscreen_granted = is_fullscreen_granted(); |
| 2396 resize_params.display_mode = display_mode_; | 2395 resize_params.display_mode = display_mode_; |
| 2397 resize_params.needs_resize_ack = false; | 2396 resize_params.needs_resize_ack = false; |
| 2398 Resize(resize_params); | 2397 Resize(resize_params); |
| 2399 } | 2398 } |
| 2400 } | 2399 } |
| 2401 | 2400 |
| 2402 void RenderViewImpl::OnEnablePreferredSizeChangedMode() { | 2401 void RenderViewImpl::OnEnablePreferredSizeChangedMode() { |
| 2403 if (send_preferred_size_changes_) | 2402 if (send_preferred_size_changes_) |
| 2404 return; | 2403 return; |
| (...skipping 537 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2942 | 2941 |
| 2943 void RenderViewImpl::SetDeviceScaleFactorForTesting(float factor) { | 2942 void RenderViewImpl::SetDeviceScaleFactorForTesting(float factor) { |
| 2944 ResizeParams params; | 2943 ResizeParams params; |
| 2945 params.screen_info = screen_info_; | 2944 params.screen_info = screen_info_; |
| 2946 params.screen_info.device_scale_factor = factor; | 2945 params.screen_info.device_scale_factor = factor; |
| 2947 params.new_size = size(); | 2946 params.new_size = size(); |
| 2948 params.visible_viewport_size = visible_viewport_size_; | 2947 params.visible_viewport_size = visible_viewport_size_; |
| 2949 params.physical_backing_size = gfx::ScaleToCeiledSize(size(), factor); | 2948 params.physical_backing_size = gfx::ScaleToCeiledSize(size(), factor); |
| 2950 params.top_controls_shrink_blink_size = false; | 2949 params.top_controls_shrink_blink_size = false; |
| 2951 params.top_controls_height = 0.f; | 2950 params.top_controls_height = 0.f; |
| 2952 params.resizer_rect = WebRect(); | |
| 2953 params.is_fullscreen_granted = is_fullscreen_granted(); | 2951 params.is_fullscreen_granted = is_fullscreen_granted(); |
| 2954 params.display_mode = display_mode_; | 2952 params.display_mode = display_mode_; |
| 2955 OnResize(params); | 2953 OnResize(params); |
| 2956 } | 2954 } |
| 2957 | 2955 |
| 2958 void RenderViewImpl::ForceResizeForTesting(const gfx::Size& new_size) { | 2956 void RenderViewImpl::ForceResizeForTesting(const gfx::Size& new_size) { |
| 2959 gfx::Rect new_window_rect(rootWindowRect().x, | 2957 gfx::Rect new_window_rect(rootWindowRect().x, |
| 2960 rootWindowRect().y, | 2958 rootWindowRect().y, |
| 2961 new_size.width(), | 2959 new_size.width(), |
| 2962 new_size.height()); | 2960 new_size.height()); |
| (...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3024 if (IsUseZoomForDSFEnabled()) { | 3022 if (IsUseZoomForDSFEnabled()) { |
| 3025 webview()->setZoomFactorForDeviceScaleFactor(device_scale_factor_); | 3023 webview()->setZoomFactorForDeviceScaleFactor(device_scale_factor_); |
| 3026 } else { | 3024 } else { |
| 3027 webview()->setDeviceScaleFactor(device_scale_factor_); | 3025 webview()->setDeviceScaleFactor(device_scale_factor_); |
| 3028 } | 3026 } |
| 3029 webview()->settings()->setPreferCompositingToLCDTextEnabled( | 3027 webview()->settings()->setPreferCompositingToLCDTextEnabled( |
| 3030 PreferCompositingToLCDText(compositor_deps_, device_scale_factor_)); | 3028 PreferCompositingToLCDText(compositor_deps_, device_scale_factor_)); |
| 3031 } | 3029 } |
| 3032 | 3030 |
| 3033 } // namespace content | 3031 } // namespace content |
| OLD | NEW |