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

Side by Side Diff: content/browser/renderer_host/render_widget_host_impl.cc

Issue 2106753004: Introduce bottom controls to CC and let it respond to scrolling (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: change to height and ratio Created 4 years, 5 months 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/browser/renderer_host/render_widget_host_impl.h" 5 #include "content/browser/renderer_host/render_widget_host_impl.h"
6 6
7 #include <math.h> 7 #include <math.h>
8 8
9 #include <set> 9 #include <set>
10 #include <tuple> 10 #include <tuple>
(...skipping 574 matching lines...) Expand 10 before | Expand all | Expand 10 after
585 resize_params->is_fullscreen_granted = false; 585 resize_params->is_fullscreen_granted = false;
586 resize_params->display_mode = blink::WebDisplayModeBrowser; 586 resize_params->display_mode = blink::WebDisplayModeBrowser;
587 } 587 }
588 588
589 if (view_) { 589 if (view_) {
590 resize_params->new_size = view_->GetRequestedRendererSize(); 590 resize_params->new_size = view_->GetRequestedRendererSize();
591 resize_params->physical_backing_size = view_->GetPhysicalBackingSize(); 591 resize_params->physical_backing_size = view_->GetPhysicalBackingSize();
592 resize_params->top_controls_height = view_->GetTopControlsHeight(); 592 resize_params->top_controls_height = view_->GetTopControlsHeight();
593 resize_params->top_controls_shrink_blink_size = 593 resize_params->top_controls_shrink_blink_size =
594 view_->DoTopControlsShrinkBlinkSize(); 594 view_->DoTopControlsShrinkBlinkSize();
595 resize_params->bottom_controls_height = view_->GetBottomControlsHeight();
595 resize_params->visible_viewport_size = view_->GetVisibleViewportSize(); 596 resize_params->visible_viewport_size = view_->GetVisibleViewportSize();
596 } 597 }
597 598
598 const bool size_changed = 599 const bool size_changed =
599 !old_resize_params_ || 600 !old_resize_params_ ||
600 old_resize_params_->new_size != resize_params->new_size || 601 old_resize_params_->new_size != resize_params->new_size ||
601 (old_resize_params_->physical_backing_size.IsEmpty() && 602 (old_resize_params_->physical_backing_size.IsEmpty() &&
602 !resize_params->physical_backing_size.IsEmpty()); 603 !resize_params->physical_backing_size.IsEmpty());
603 bool dirty = size_changed || 604 bool dirty = size_changed ||
604 old_resize_params_->screen_info != resize_params->screen_info || 605 old_resize_params_->screen_info != resize_params->screen_info ||
605 old_resize_params_->physical_backing_size != 606 old_resize_params_->physical_backing_size !=
606 resize_params->physical_backing_size || 607 resize_params->physical_backing_size ||
607 old_resize_params_->is_fullscreen_granted != 608 old_resize_params_->is_fullscreen_granted !=
608 resize_params->is_fullscreen_granted || 609 resize_params->is_fullscreen_granted ||
609 old_resize_params_->display_mode != resize_params->display_mode || 610 old_resize_params_->display_mode != resize_params->display_mode ||
610 old_resize_params_->top_controls_height != 611 old_resize_params_->top_controls_height !=
611 resize_params->top_controls_height || 612 resize_params->top_controls_height ||
612 old_resize_params_->top_controls_shrink_blink_size != 613 old_resize_params_->top_controls_shrink_blink_size !=
613 resize_params->top_controls_shrink_blink_size || 614 resize_params->top_controls_shrink_blink_size ||
615 old_resize_params_->bottom_controls_height !=
616 resize_params->bottom_controls_height ||
614 old_resize_params_->visible_viewport_size != 617 old_resize_params_->visible_viewport_size !=
615 resize_params->visible_viewport_size; 618 resize_params->visible_viewport_size;
616 619
617 // We don't expect to receive an ACK when the requested size or the physical 620 // We don't expect to receive an ACK when the requested size or the physical
618 // backing size is empty, or when the main viewport size didn't change. 621 // backing size is empty, or when the main viewport size didn't change.
619 resize_params->needs_resize_ack = 622 resize_params->needs_resize_ack =
620 g_check_for_pending_resize_ack && !resize_params->new_size.IsEmpty() && 623 g_check_for_pending_resize_ack && !resize_params->new_size.IsEmpty() &&
621 !resize_params->physical_backing_size.IsEmpty() && size_changed; 624 !resize_params->physical_backing_size.IsEmpty() && size_changed;
622 625
623 return dirty; 626 return dirty;
(...skipping 1530 matching lines...) Expand 10 before | Expand all | Expand 10 after
2154 return delegate_ ? delegate_->GetRootBrowserAccessibilityManager() : NULL; 2157 return delegate_ ? delegate_->GetRootBrowserAccessibilityManager() : NULL;
2155 } 2158 }
2156 2159
2157 BrowserAccessibilityManager* 2160 BrowserAccessibilityManager*
2158 RenderWidgetHostImpl::GetOrCreateRootBrowserAccessibilityManager() { 2161 RenderWidgetHostImpl::GetOrCreateRootBrowserAccessibilityManager() {
2159 return delegate_ ? 2162 return delegate_ ?
2160 delegate_->GetOrCreateRootBrowserAccessibilityManager() : NULL; 2163 delegate_->GetOrCreateRootBrowserAccessibilityManager() : NULL;
2161 } 2164 }
2162 2165
2163 } // namespace content 2166 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698