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

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: vector->float in IPC Created 4 years, 4 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 577 matching lines...) Expand 10 before | Expand all | Expand 10 after
588 resize_params->is_fullscreen_granted = false; 588 resize_params->is_fullscreen_granted = false;
589 resize_params->display_mode = blink::WebDisplayModeBrowser; 589 resize_params->display_mode = blink::WebDisplayModeBrowser;
590 } 590 }
591 591
592 if (view_) { 592 if (view_) {
593 resize_params->new_size = view_->GetRequestedRendererSize(); 593 resize_params->new_size = view_->GetRequestedRendererSize();
594 resize_params->physical_backing_size = view_->GetPhysicalBackingSize(); 594 resize_params->physical_backing_size = view_->GetPhysicalBackingSize();
595 resize_params->top_controls_height = view_->GetTopControlsHeight(); 595 resize_params->top_controls_height = view_->GetTopControlsHeight();
596 resize_params->top_controls_shrink_blink_size = 596 resize_params->top_controls_shrink_blink_size =
597 view_->DoTopControlsShrinkBlinkSize(); 597 view_->DoTopControlsShrinkBlinkSize();
598 resize_params->bottom_controls_height = view_->GetBottomControlsHeight();
598 resize_params->visible_viewport_size = view_->GetVisibleViewportSize(); 599 resize_params->visible_viewport_size = view_->GetVisibleViewportSize();
599 } 600 }
600 601
601 const bool size_changed = 602 const bool size_changed =
602 !old_resize_params_ || 603 !old_resize_params_ ||
603 old_resize_params_->new_size != resize_params->new_size || 604 old_resize_params_->new_size != resize_params->new_size ||
604 (old_resize_params_->physical_backing_size.IsEmpty() && 605 (old_resize_params_->physical_backing_size.IsEmpty() &&
605 !resize_params->physical_backing_size.IsEmpty()); 606 !resize_params->physical_backing_size.IsEmpty());
606 bool dirty = size_changed || 607 bool dirty = size_changed ||
607 old_resize_params_->screen_info != resize_params->screen_info || 608 old_resize_params_->screen_info != resize_params->screen_info ||
608 old_resize_params_->physical_backing_size != 609 old_resize_params_->physical_backing_size !=
609 resize_params->physical_backing_size || 610 resize_params->physical_backing_size ||
610 old_resize_params_->is_fullscreen_granted != 611 old_resize_params_->is_fullscreen_granted !=
611 resize_params->is_fullscreen_granted || 612 resize_params->is_fullscreen_granted ||
612 old_resize_params_->display_mode != resize_params->display_mode || 613 old_resize_params_->display_mode != resize_params->display_mode ||
613 old_resize_params_->top_controls_height != 614 old_resize_params_->top_controls_height !=
614 resize_params->top_controls_height || 615 resize_params->top_controls_height ||
615 old_resize_params_->top_controls_shrink_blink_size != 616 old_resize_params_->top_controls_shrink_blink_size !=
616 resize_params->top_controls_shrink_blink_size || 617 resize_params->top_controls_shrink_blink_size ||
618 old_resize_params_->bottom_controls_height !=
619 resize_params->bottom_controls_height ||
617 old_resize_params_->visible_viewport_size != 620 old_resize_params_->visible_viewport_size !=
618 resize_params->visible_viewport_size; 621 resize_params->visible_viewport_size;
619 622
620 // We don't expect to receive an ACK when the requested size or the physical 623 // We don't expect to receive an ACK when the requested size or the physical
621 // backing size is empty, or when the main viewport size didn't change. 624 // backing size is empty, or when the main viewport size didn't change.
622 resize_params->needs_resize_ack = 625 resize_params->needs_resize_ack =
623 g_check_for_pending_resize_ack && !resize_params->new_size.IsEmpty() && 626 g_check_for_pending_resize_ack && !resize_params->new_size.IsEmpty() &&
624 !resize_params->physical_backing_size.IsEmpty() && size_changed; 627 !resize_params->physical_backing_size.IsEmpty() && size_changed;
625 628
626 return dirty; 629 return dirty;
(...skipping 1539 matching lines...) Expand 10 before | Expand all | Expand 10 after
2166 return delegate_ ? delegate_->GetRootBrowserAccessibilityManager() : NULL; 2169 return delegate_ ? delegate_->GetRootBrowserAccessibilityManager() : NULL;
2167 } 2170 }
2168 2171
2169 BrowserAccessibilityManager* 2172 BrowserAccessibilityManager*
2170 RenderWidgetHostImpl::GetOrCreateRootBrowserAccessibilityManager() { 2173 RenderWidgetHostImpl::GetOrCreateRootBrowserAccessibilityManager() {
2171 return delegate_ ? 2174 return delegate_ ?
2172 delegate_->GetOrCreateRootBrowserAccessibilityManager() : NULL; 2175 delegate_->GetOrCreateRootBrowserAccessibilityManager() : NULL;
2173 } 2176 }
2174 2177
2175 } // namespace content 2178 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698