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 3130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3141 void RenderViewImpl::OnDisableAutoResize(const gfx::Size& new_size) { | 3141 void RenderViewImpl::OnDisableAutoResize(const gfx::Size& new_size) { |
3142 DCHECK(disable_scrollbars_size_limit_.IsEmpty()); | 3142 DCHECK(disable_scrollbars_size_limit_.IsEmpty()); |
3143 if (!webview()) | 3143 if (!webview()) |
3144 return; | 3144 return; |
3145 auto_resize_mode_ = false; | 3145 auto_resize_mode_ = false; |
3146 webview()->disableAutoResizeMode(); | 3146 webview()->disableAutoResizeMode(); |
3147 | 3147 |
3148 if (!new_size.IsEmpty()) { | 3148 if (!new_size.IsEmpty()) { |
3149 Resize(new_size, | 3149 Resize(new_size, |
3150 physical_backing_size_, | 3150 physical_backing_size_, |
3151 overdraw_bottom_height_, | 3151 top_controls_layout_height_, |
3152 visible_viewport_size_, | 3152 visible_viewport_size_, |
3153 resizer_rect_, | 3153 resizer_rect_, |
3154 is_fullscreen_, | 3154 is_fullscreen_, |
3155 NO_RESIZE_ACK); | 3155 NO_RESIZE_ACK); |
3156 } | 3156 } |
3157 } | 3157 } |
3158 | 3158 |
3159 void RenderViewImpl::OnEnablePreferredSizeChangedMode() { | 3159 void RenderViewImpl::OnEnablePreferredSizeChangedMode() { |
3160 if (send_preferred_size_changes_) | 3160 if (send_preferred_size_changes_) |
3161 return; | 3161 return; |
(...skipping 1104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4266 } | 4266 } |
4267 } | 4267 } |
4268 | 4268 |
4269 void RenderViewImpl::SetDeviceScaleFactorForTesting(float factor) { | 4269 void RenderViewImpl::SetDeviceScaleFactorForTesting(float factor) { |
4270 ViewMsg_Resize_Params params; | 4270 ViewMsg_Resize_Params params; |
4271 params.screen_info = screen_info_; | 4271 params.screen_info = screen_info_; |
4272 params.screen_info.deviceScaleFactor = factor; | 4272 params.screen_info.deviceScaleFactor = factor; |
4273 params.new_size = size(); | 4273 params.new_size = size(); |
4274 params.physical_backing_size = | 4274 params.physical_backing_size = |
4275 gfx::ToCeiledSize(gfx::ScaleSize(size(), factor)); | 4275 gfx::ToCeiledSize(gfx::ScaleSize(size(), factor)); |
4276 params.overdraw_bottom_height = 0.f; | 4276 params.top_controls_layout_height = 0.f; |
4277 params.resizer_rect = WebRect(); | 4277 params.resizer_rect = WebRect(); |
4278 params.is_fullscreen = is_fullscreen(); | 4278 params.is_fullscreen = is_fullscreen(); |
4279 OnResize(params); | 4279 OnResize(params); |
4280 } | 4280 } |
4281 | 4281 |
4282 void RenderViewImpl::SetDeviceColorProfileForTesting( | 4282 void RenderViewImpl::SetDeviceColorProfileForTesting( |
4283 const std::vector<char>& color_profile) { | 4283 const std::vector<char>& color_profile) { |
4284 SetDeviceColorProfile(color_profile); | 4284 SetDeviceColorProfile(color_profile); |
4285 } | 4285 } |
4286 | 4286 |
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4337 std::vector<gfx::Size> sizes; | 4337 std::vector<gfx::Size> sizes; |
4338 ConvertToFaviconSizes(icon_urls[i].sizes(), &sizes); | 4338 ConvertToFaviconSizes(icon_urls[i].sizes(), &sizes); |
4339 if (!url.isEmpty()) | 4339 if (!url.isEmpty()) |
4340 urls.push_back( | 4340 urls.push_back( |
4341 FaviconURL(url, ToFaviconType(icon_urls[i].iconType()), sizes)); | 4341 FaviconURL(url, ToFaviconType(icon_urls[i].iconType()), sizes)); |
4342 } | 4342 } |
4343 SendUpdateFaviconURL(urls); | 4343 SendUpdateFaviconURL(urls); |
4344 } | 4344 } |
4345 | 4345 |
4346 } // namespace content | 4346 } // namespace content |
OLD | NEW |