| 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 3049 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3060 void RenderViewImpl::OnDisableAutoResize(const gfx::Size& new_size) { | 3060 void RenderViewImpl::OnDisableAutoResize(const gfx::Size& new_size) { |
| 3061 DCHECK(disable_scrollbars_size_limit_.IsEmpty()); | 3061 DCHECK(disable_scrollbars_size_limit_.IsEmpty()); |
| 3062 if (!webview()) | 3062 if (!webview()) |
| 3063 return; | 3063 return; |
| 3064 auto_resize_mode_ = false; | 3064 auto_resize_mode_ = false; |
| 3065 webview()->disableAutoResizeMode(); | 3065 webview()->disableAutoResizeMode(); |
| 3066 | 3066 |
| 3067 if (!new_size.IsEmpty()) { | 3067 if (!new_size.IsEmpty()) { |
| 3068 Resize(new_size, | 3068 Resize(new_size, |
| 3069 physical_backing_size_, | 3069 physical_backing_size_, |
| 3070 top_controls_layout_height_, | 3070 top_controls_shrink_blink_size_, |
| 3071 top_controls_height_, |
| 3071 visible_viewport_size_, | 3072 visible_viewport_size_, |
| 3072 resizer_rect_, | 3073 resizer_rect_, |
| 3073 is_fullscreen_, | 3074 is_fullscreen_, |
| 3074 NO_RESIZE_ACK); | 3075 NO_RESIZE_ACK); |
| 3075 } | 3076 } |
| 3076 } | 3077 } |
| 3077 | 3078 |
| 3078 void RenderViewImpl::OnEnablePreferredSizeChangedMode() { | 3079 void RenderViewImpl::OnEnablePreferredSizeChangedMode() { |
| 3079 if (send_preferred_size_changes_) | 3080 if (send_preferred_size_changes_) |
| 3080 return; | 3081 return; |
| (...skipping 1039 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4120 } | 4121 } |
| 4121 | 4122 |
| 4122 void RenderViewImpl::SetDeviceScaleFactorForTesting(float factor) { | 4123 void RenderViewImpl::SetDeviceScaleFactorForTesting(float factor) { |
| 4123 ViewMsg_Resize_Params params; | 4124 ViewMsg_Resize_Params params; |
| 4124 params.screen_info = screen_info_; | 4125 params.screen_info = screen_info_; |
| 4125 params.screen_info.deviceScaleFactor = factor; | 4126 params.screen_info.deviceScaleFactor = factor; |
| 4126 params.new_size = size(); | 4127 params.new_size = size(); |
| 4127 params.visible_viewport_size = visible_viewport_size_; | 4128 params.visible_viewport_size = visible_viewport_size_; |
| 4128 params.physical_backing_size = | 4129 params.physical_backing_size = |
| 4129 gfx::ToCeiledSize(gfx::ScaleSize(size(), factor)); | 4130 gfx::ToCeiledSize(gfx::ScaleSize(size(), factor)); |
| 4130 params.top_controls_layout_height = 0.f; | 4131 params.top_controls_shrink_blink_size = false; |
| 4132 params.top_controls_height = 0.f; |
| 4131 params.resizer_rect = WebRect(); | 4133 params.resizer_rect = WebRect(); |
| 4132 params.is_fullscreen = is_fullscreen(); | 4134 params.is_fullscreen = is_fullscreen(); |
| 4133 OnResize(params); | 4135 OnResize(params); |
| 4134 } | 4136 } |
| 4135 | 4137 |
| 4136 void RenderViewImpl::SetDeviceColorProfileForTesting( | 4138 void RenderViewImpl::SetDeviceColorProfileForTesting( |
| 4137 const std::vector<char>& color_profile) { | 4139 const std::vector<char>& color_profile) { |
| 4138 SetDeviceColorProfile(color_profile); | 4140 SetDeviceColorProfile(color_profile); |
| 4139 } | 4141 } |
| 4140 | 4142 |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4196 std::vector<gfx::Size> sizes; | 4198 std::vector<gfx::Size> sizes; |
| 4197 ConvertToFaviconSizes(icon_urls[i].sizes(), &sizes); | 4199 ConvertToFaviconSizes(icon_urls[i].sizes(), &sizes); |
| 4198 if (!url.isEmpty()) | 4200 if (!url.isEmpty()) |
| 4199 urls.push_back( | 4201 urls.push_back( |
| 4200 FaviconURL(url, ToFaviconType(icon_urls[i].iconType()), sizes)); | 4202 FaviconURL(url, ToFaviconType(icon_urls[i].iconType()), sizes)); |
| 4201 } | 4203 } |
| 4202 SendUpdateFaviconURL(urls); | 4204 SendUpdateFaviconURL(urls); |
| 4203 } | 4205 } |
| 4204 | 4206 |
| 4205 } // namespace content | 4207 } // namespace content |
| OLD | NEW |