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

Side by Side Diff: cc/trees/layer_tree_host.cc

Issue 814083004: Notify main-thread of top controls state changes (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix compile error after rebase Created 5 years, 10 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
« no previous file with comments | « cc/trees/layer_tree_host.h ('k') | cc/trees/layer_tree_host_impl.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2011 The Chromium Authors. All rights reserved. 1 // Copyright 2011 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 "cc/trees/layer_tree_host.h" 5 #include "cc/trees/layer_tree_host.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <stack> 8 #include <stack>
9 #include <string> 9 #include <string>
10 10
(...skipping 650 matching lines...) Expand 10 before | Expand all | Expand 10 after
661 661
662 void LayerTreeHost::SetViewportSize(const gfx::Size& device_viewport_size) { 662 void LayerTreeHost::SetViewportSize(const gfx::Size& device_viewport_size) {
663 if (device_viewport_size == device_viewport_size_) 663 if (device_viewport_size == device_viewport_size_)
664 return; 664 return;
665 665
666 device_viewport_size_ = device_viewport_size; 666 device_viewport_size_ = device_viewport_size;
667 667
668 SetNeedsCommit(); 668 SetNeedsCommit();
669 } 669 }
670 670
671 void LayerTreeHost::SetTopControlsShrinkBlinkSize(bool shrink) { 671 void LayerTreeHost::SetTopControlsHeight(float height, bool shrink) {
672 if (top_controls_shrink_blink_size_ == shrink) 672 if (top_controls_height_ == height &&
673 top_controls_shrink_blink_size_ == shrink)
673 return; 674 return;
674 675
676 top_controls_height_ = height;
675 top_controls_shrink_blink_size_ = shrink; 677 top_controls_shrink_blink_size_ = shrink;
676 SetNeedsCommit(); 678 SetNeedsCommit();
677 } 679 }
678 680
679 void LayerTreeHost::SetTopControlsHeight(float height) {
680 if (top_controls_height_ == height)
681 return;
682
683 top_controls_height_ = height;
684 SetNeedsCommit();
685 }
686
687 void LayerTreeHost::SetTopControlsShownRatio(float ratio) { 681 void LayerTreeHost::SetTopControlsShownRatio(float ratio) {
688 if (top_controls_shown_ratio_ == ratio) 682 if (top_controls_shown_ratio_ == ratio)
689 return; 683 return;
690 684
691 top_controls_shown_ratio_ = ratio; 685 top_controls_shown_ratio_ = ratio;
692 SetNeedsCommit(); 686 SetNeedsCommit();
693 } 687 }
694 688
695 void LayerTreeHost::ApplyPageScaleDeltaFromImplSide(float page_scale_delta) { 689 void LayerTreeHost::ApplyPageScaleDeltaFromImplSide(float page_scale_delta) {
696 DCHECK(CommitRequested()); 690 DCHECK(CommitRequested());
(...skipping 639 matching lines...) Expand 10 before | Expand all | Expand 10 after
1336 bool children_need_begin_frames) const { 1330 bool children_need_begin_frames) const {
1337 proxy_->SetChildrenNeedBeginFrames(children_need_begin_frames); 1331 proxy_->SetChildrenNeedBeginFrames(children_need_begin_frames);
1338 } 1332 }
1339 1333
1340 void LayerTreeHost::SendBeginFramesToChildren( 1334 void LayerTreeHost::SendBeginFramesToChildren(
1341 const BeginFrameArgs& args) const { 1335 const BeginFrameArgs& args) const {
1342 client_->SendBeginFramesToChildren(args); 1336 client_->SendBeginFramesToChildren(args);
1343 } 1337 }
1344 1338
1345 } // namespace cc 1339 } // namespace cc
OLDNEW
« no previous file with comments | « cc/trees/layer_tree_host.h ('k') | cc/trees/layer_tree_host_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698