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

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: 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 563 matching lines...) Expand 10 before | Expand all | Expand 10 after
574 resize_params->is_fullscreen_granted = false; 574 resize_params->is_fullscreen_granted = false;
575 resize_params->display_mode = blink::WebDisplayModeBrowser; 575 resize_params->display_mode = blink::WebDisplayModeBrowser;
576 } 576 }
577 577
578 if (view_) { 578 if (view_) {
579 resize_params->new_size = view_->GetRequestedRendererSize(); 579 resize_params->new_size = view_->GetRequestedRendererSize();
580 resize_params->physical_backing_size = view_->GetPhysicalBackingSize(); 580 resize_params->physical_backing_size = view_->GetPhysicalBackingSize();
581 resize_params->top_controls_height = view_->GetTopControlsHeight(); 581 resize_params->top_controls_height = view_->GetTopControlsHeight();
582 resize_params->top_controls_shrink_blink_size = 582 resize_params->top_controls_shrink_blink_size =
583 view_->DoTopControlsShrinkBlinkSize(); 583 view_->DoTopControlsShrinkBlinkSize();
584 resize_params->bottom_controls_height = view_->GetBottomControlsHeight();
584 resize_params->visible_viewport_size = view_->GetVisibleViewportSize(); 585 resize_params->visible_viewport_size = view_->GetVisibleViewportSize();
585 } 586 }
586 587
587 const bool size_changed = 588 const bool size_changed =
588 !old_resize_params_ || 589 !old_resize_params_ ||
589 old_resize_params_->new_size != resize_params->new_size || 590 old_resize_params_->new_size != resize_params->new_size ||
590 (old_resize_params_->physical_backing_size.IsEmpty() && 591 (old_resize_params_->physical_backing_size.IsEmpty() &&
591 !resize_params->physical_backing_size.IsEmpty()); 592 !resize_params->physical_backing_size.IsEmpty());
592 bool dirty = size_changed || 593 bool dirty = size_changed ||
593 old_resize_params_->screen_info != resize_params->screen_info || 594 old_resize_params_->screen_info != resize_params->screen_info ||
594 old_resize_params_->physical_backing_size != 595 old_resize_params_->physical_backing_size !=
595 resize_params->physical_backing_size || 596 resize_params->physical_backing_size ||
596 old_resize_params_->is_fullscreen_granted != 597 old_resize_params_->is_fullscreen_granted !=
597 resize_params->is_fullscreen_granted || 598 resize_params->is_fullscreen_granted ||
598 old_resize_params_->display_mode != resize_params->display_mode || 599 old_resize_params_->display_mode != resize_params->display_mode ||
599 old_resize_params_->top_controls_height != 600 old_resize_params_->top_controls_height !=
600 resize_params->top_controls_height || 601 resize_params->top_controls_height ||
601 old_resize_params_->top_controls_shrink_blink_size != 602 old_resize_params_->top_controls_shrink_blink_size !=
602 resize_params->top_controls_shrink_blink_size || 603 resize_params->top_controls_shrink_blink_size ||
604 old_resize_params_->bottom_controls_height !=
605 resize_params->bottom_controls_height ||
603 old_resize_params_->visible_viewport_size != 606 old_resize_params_->visible_viewport_size !=
604 resize_params->visible_viewport_size; 607 resize_params->visible_viewport_size;
605 608
606 // We don't expect to receive an ACK when the requested size or the physical 609 // We don't expect to receive an ACK when the requested size or the physical
607 // backing size is empty, or when the main viewport size didn't change. 610 // backing size is empty, or when the main viewport size didn't change.
608 resize_params->needs_resize_ack = 611 resize_params->needs_resize_ack =
609 g_check_for_pending_resize_ack && !resize_params->new_size.IsEmpty() && 612 g_check_for_pending_resize_ack && !resize_params->new_size.IsEmpty() &&
610 !resize_params->physical_backing_size.IsEmpty() && size_changed; 613 !resize_params->physical_backing_size.IsEmpty() && size_changed;
611 614
612 return dirty; 615 return dirty;
(...skipping 1531 matching lines...) Expand 10 before | Expand all | Expand 10 after
2144 return delegate_ ? delegate_->GetRootBrowserAccessibilityManager() : NULL; 2147 return delegate_ ? delegate_->GetRootBrowserAccessibilityManager() : NULL;
2145 } 2148 }
2146 2149
2147 BrowserAccessibilityManager* 2150 BrowserAccessibilityManager*
2148 RenderWidgetHostImpl::GetOrCreateRootBrowserAccessibilityManager() { 2151 RenderWidgetHostImpl::GetOrCreateRootBrowserAccessibilityManager() {
2149 return delegate_ ? 2152 return delegate_ ?
2150 delegate_->GetOrCreateRootBrowserAccessibilityManager() : NULL; 2153 delegate_->GetOrCreateRootBrowserAccessibilityManager() : NULL;
2151 } 2154 }
2152 2155
2153 } // namespace content 2156 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698