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

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

Issue 14139013: Hide location bar on Javascript-initiated scroll. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Sync, merge, address style nits. Created 7 years, 7 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') | chrome/common/render_messages.h » ('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 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 953 matching lines...) Expand 10 before | Expand all | Expand 10 after
964 } 964 }
965 965
966 void LayerTreeHost::SetDeviceScaleFactor(float device_scale_factor) { 966 void LayerTreeHost::SetDeviceScaleFactor(float device_scale_factor) {
967 if (device_scale_factor == device_scale_factor_) 967 if (device_scale_factor == device_scale_factor_)
968 return; 968 return;
969 device_scale_factor_ = device_scale_factor; 969 device_scale_factor_ = device_scale_factor;
970 970
971 SetNeedsCommit(); 971 SetNeedsCommit();
972 } 972 }
973 973
974 void LayerTreeHost::UpdateTopControlsState(bool enable_hiding, 974 void LayerTreeHost::UpdateTopControlsState(TopControlsState constraints,
975 bool enable_showing, 975 TopControlsState current,
976 bool animate) { 976 bool animate) {
977 if (!settings_.calculate_top_controls_position) 977 if (!settings_.calculate_top_controls_position)
978 return; 978 return;
979 979
980 // Top controls are only used in threaded mode. 980 // Top controls are only used in threaded mode.
981 proxy_->ImplThread()->PostTask( 981 proxy_->ImplThread()->PostTask(
982 base::Bind(&TopControlsManager::UpdateTopControlsState, 982 base::Bind(&TopControlsManager::UpdateTopControlsState,
983 top_controls_manager_weak_ptr_, 983 top_controls_manager_weak_ptr_,
984 enable_hiding, 984 constraints,
985 enable_showing, 985 current,
986 animate)); 986 animate));
987 } 987 }
988 988
989 bool LayerTreeHost::BlocksPendingCommit() const { 989 bool LayerTreeHost::BlocksPendingCommit() const {
990 if (!root_layer_) 990 if (!root_layer_)
991 return false; 991 return false;
992 return root_layer_->BlocksPendingCommitRecursive(); 992 return root_layer_->BlocksPendingCommitRecursive();
993 } 993 }
994 994
995 scoped_ptr<base::Value> LayerTreeHost::AsValue() const { 995 scoped_ptr<base::Value> LayerTreeHost::AsValue() const {
(...skipping 21 matching lines...) Expand all
1017 bool start_ready_animations = true; 1017 bool start_ready_animations = true;
1018 (*iter).second->UpdateState(start_ready_animations, NULL); 1018 (*iter).second->UpdateState(start_ready_animations, NULL);
1019 } 1019 }
1020 } 1020 }
1021 1021
1022 skia::RefPtr<SkPicture> LayerTreeHost::CapturePicture() { 1022 skia::RefPtr<SkPicture> LayerTreeHost::CapturePicture() {
1023 return proxy_->CapturePicture(); 1023 return proxy_->CapturePicture();
1024 } 1024 }
1025 1025
1026 } // namespace cc 1026 } // namespace cc
OLDNEW
« no previous file with comments | « cc/trees/layer_tree_host.h ('k') | chrome/common/render_messages.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698