| 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 3076 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3087 void RenderViewImpl::OnDisableAutoResize(const gfx::Size& new_size) { | 3087 void RenderViewImpl::OnDisableAutoResize(const gfx::Size& new_size) { |
| 3088 DCHECK(disable_scrollbars_size_limit_.IsEmpty()); | 3088 DCHECK(disable_scrollbars_size_limit_.IsEmpty()); |
| 3089 if (!webview()) | 3089 if (!webview()) |
| 3090 return; | 3090 return; |
| 3091 auto_resize_mode_ = false; | 3091 auto_resize_mode_ = false; |
| 3092 webview()->disableAutoResizeMode(); | 3092 webview()->disableAutoResizeMode(); |
| 3093 | 3093 |
| 3094 if (!new_size.IsEmpty()) { | 3094 if (!new_size.IsEmpty()) { |
| 3095 Resize(new_size, | 3095 Resize(new_size, |
| 3096 physical_backing_size_, | 3096 physical_backing_size_, |
| 3097 overdraw_bottom_height_, | 3097 top_controls_layout_height_, |
| 3098 visible_viewport_size_, | 3098 visible_viewport_size_, |
| 3099 resizer_rect_, | 3099 resizer_rect_, |
| 3100 is_fullscreen_, | 3100 is_fullscreen_, |
| 3101 NO_RESIZE_ACK); | 3101 NO_RESIZE_ACK); |
| 3102 } | 3102 } |
| 3103 } | 3103 } |
| 3104 | 3104 |
| 3105 void RenderViewImpl::OnEnablePreferredSizeChangedMode() { | 3105 void RenderViewImpl::OnEnablePreferredSizeChangedMode() { |
| 3106 if (send_preferred_size_changes_) | 3106 if (send_preferred_size_changes_) |
| 3107 return; | 3107 return; |
| (...skipping 1096 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4204 } | 4204 } |
| 4205 } | 4205 } |
| 4206 | 4206 |
| 4207 void RenderViewImpl::SetDeviceScaleFactorForTesting(float factor) { | 4207 void RenderViewImpl::SetDeviceScaleFactorForTesting(float factor) { |
| 4208 ViewMsg_Resize_Params params; | 4208 ViewMsg_Resize_Params params; |
| 4209 params.screen_info = screen_info_; | 4209 params.screen_info = screen_info_; |
| 4210 params.screen_info.deviceScaleFactor = factor; | 4210 params.screen_info.deviceScaleFactor = factor; |
| 4211 params.new_size = size(); | 4211 params.new_size = size(); |
| 4212 params.physical_backing_size = | 4212 params.physical_backing_size = |
| 4213 gfx::ToCeiledSize(gfx::ScaleSize(size(), factor)); | 4213 gfx::ToCeiledSize(gfx::ScaleSize(size(), factor)); |
| 4214 params.overdraw_bottom_height = 0.f; | 4214 params.top_controls_layout_height = 0.f; |
| 4215 params.resizer_rect = WebRect(); | 4215 params.resizer_rect = WebRect(); |
| 4216 params.is_fullscreen = is_fullscreen(); | 4216 params.is_fullscreen = is_fullscreen(); |
| 4217 OnResize(params); | 4217 OnResize(params); |
| 4218 } | 4218 } |
| 4219 | 4219 |
| 4220 void RenderViewImpl::SetDeviceColorProfileForTesting( | 4220 void RenderViewImpl::SetDeviceColorProfileForTesting( |
| 4221 const std::vector<char>& color_profile) { | 4221 const std::vector<char>& color_profile) { |
| 4222 SetDeviceColorProfile(color_profile); | 4222 SetDeviceColorProfile(color_profile); |
| 4223 } | 4223 } |
| 4224 | 4224 |
| (...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4275 std::vector<gfx::Size> sizes; | 4275 std::vector<gfx::Size> sizes; |
| 4276 ConvertToFaviconSizes(icon_urls[i].sizes(), &sizes); | 4276 ConvertToFaviconSizes(icon_urls[i].sizes(), &sizes); |
| 4277 if (!url.isEmpty()) | 4277 if (!url.isEmpty()) |
| 4278 urls.push_back( | 4278 urls.push_back( |
| 4279 FaviconURL(url, ToFaviconType(icon_urls[i].iconType()), sizes)); | 4279 FaviconURL(url, ToFaviconType(icon_urls[i].iconType()), sizes)); |
| 4280 } | 4280 } |
| 4281 SendUpdateFaviconURL(urls); | 4281 SendUpdateFaviconURL(urls); |
| 4282 } | 4282 } |
| 4283 | 4283 |
| 4284 } // namespace content | 4284 } // namespace content |
| OLD | NEW |