Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(561)

Side by Side Diff: content/renderer/render_view_impl.cc

Issue 714003002: Allow changing top controls height (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased Created 6 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 3082 matching lines...) Expand 10 before | Expand all | Expand 10 after
3093 void RenderViewImpl::OnDisableAutoResize(const gfx::Size& new_size) { 3093 void RenderViewImpl::OnDisableAutoResize(const gfx::Size& new_size) {
3094 DCHECK(disable_scrollbars_size_limit_.IsEmpty()); 3094 DCHECK(disable_scrollbars_size_limit_.IsEmpty());
3095 if (!webview()) 3095 if (!webview())
3096 return; 3096 return;
3097 auto_resize_mode_ = false; 3097 auto_resize_mode_ = false;
3098 webview()->disableAutoResizeMode(); 3098 webview()->disableAutoResizeMode();
3099 3099
3100 if (!new_size.IsEmpty()) { 3100 if (!new_size.IsEmpty()) {
3101 Resize(new_size, 3101 Resize(new_size,
3102 physical_backing_size_, 3102 physical_backing_size_,
3103 top_controls_layout_height_, 3103 top_controls_shrink_blink_size_,
3104 top_controls_height_,
3104 visible_viewport_size_, 3105 visible_viewport_size_,
3105 resizer_rect_, 3106 resizer_rect_,
3106 is_fullscreen_, 3107 is_fullscreen_,
3107 NO_RESIZE_ACK); 3108 NO_RESIZE_ACK);
3108 } 3109 }
3109 } 3110 }
3110 3111
3111 void RenderViewImpl::OnEnablePreferredSizeChangedMode() { 3112 void RenderViewImpl::OnEnablePreferredSizeChangedMode() {
3112 if (send_preferred_size_changes_) 3113 if (send_preferred_size_changes_)
3113 return; 3114 return;
(...skipping 1039 matching lines...) Expand 10 before | Expand all | Expand 10 after
4153 } 4154 }
4154 4155
4155 void RenderViewImpl::SetDeviceScaleFactorForTesting(float factor) { 4156 void RenderViewImpl::SetDeviceScaleFactorForTesting(float factor) {
4156 ViewMsg_Resize_Params params; 4157 ViewMsg_Resize_Params params;
4157 params.screen_info = screen_info_; 4158 params.screen_info = screen_info_;
4158 params.screen_info.deviceScaleFactor = factor; 4159 params.screen_info.deviceScaleFactor = factor;
4159 params.new_size = size(); 4160 params.new_size = size();
4160 params.visible_viewport_size = visible_viewport_size_; 4161 params.visible_viewport_size = visible_viewport_size_;
4161 params.physical_backing_size = 4162 params.physical_backing_size =
4162 gfx::ToCeiledSize(gfx::ScaleSize(size(), factor)); 4163 gfx::ToCeiledSize(gfx::ScaleSize(size(), factor));
4163 params.top_controls_layout_height = 0.f; 4164 params.top_controls_shrink_blink_size = false;
4165 params.top_controls_height = 0.f;
4164 params.resizer_rect = WebRect(); 4166 params.resizer_rect = WebRect();
4165 params.is_fullscreen = is_fullscreen(); 4167 params.is_fullscreen = is_fullscreen();
4166 OnResize(params); 4168 OnResize(params);
4167 } 4169 }
4168 4170
4169 void RenderViewImpl::SetDeviceColorProfileForTesting( 4171 void RenderViewImpl::SetDeviceColorProfileForTesting(
4170 const std::vector<char>& color_profile) { 4172 const std::vector<char>& color_profile) {
4171 SetDeviceColorProfile(color_profile); 4173 SetDeviceColorProfile(color_profile);
4172 } 4174 }
4173 4175
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
4229 std::vector<gfx::Size> sizes; 4231 std::vector<gfx::Size> sizes;
4230 ConvertToFaviconSizes(icon_urls[i].sizes(), &sizes); 4232 ConvertToFaviconSizes(icon_urls[i].sizes(), &sizes);
4231 if (!url.isEmpty()) 4233 if (!url.isEmpty())
4232 urls.push_back( 4234 urls.push_back(
4233 FaviconURL(url, ToFaviconType(icon_urls[i].iconType()), sizes)); 4235 FaviconURL(url, ToFaviconType(icon_urls[i].iconType()), sizes));
4234 } 4236 }
4235 SendUpdateFaviconURL(urls); 4237 SendUpdateFaviconURL(urls);
4236 } 4238 }
4237 4239
4238 } // namespace content 4240 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698