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

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: Created 7 years, 8 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 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 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 1032 matching lines...) Expand 10 before | Expand all | Expand 10 after
1043 return; 1043 return;
1044 1044
1045 proxy_->ImplThread()->PostTask( 1045 proxy_->ImplThread()->PostTask(
1046 base::Bind(&TopControlsManager::UpdateTopControlsState, 1046 base::Bind(&TopControlsManager::UpdateTopControlsState,
1047 top_controls_manager_weak_ptr_, 1047 top_controls_manager_weak_ptr_,
1048 enable_hiding, 1048 enable_hiding,
1049 enable_showing, 1049 enable_showing,
1050 animate)); 1050 animate));
1051 } 1051 }
1052 1052
1053 void LayerTreeHost::ShowTopControls(bool show) {
1054 if (!settings_.calculate_top_controls_position)
1055 return;
1056
1057 proxy_->ImplThread()->PostTask(
1058 base::Bind(&TopControlsManager::ShowTopControls,
1059 top_controls_manager_weak_ptr_, show));
1060 }
1061
1053 bool LayerTreeHost::BlocksPendingCommit() const { 1062 bool LayerTreeHost::BlocksPendingCommit() const {
1054 if (!root_layer_) 1063 if (!root_layer_)
1055 return false; 1064 return false;
1056 return root_layer_->BlocksPendingCommitRecursive(); 1065 return root_layer_->BlocksPendingCommitRecursive();
1057 } 1066 }
1058 1067
1059 scoped_ptr<base::Value> LayerTreeHost::AsValue() const { 1068 scoped_ptr<base::Value> LayerTreeHost::AsValue() const {
1060 scoped_ptr<base::DictionaryValue> state(new base::DictionaryValue()); 1069 scoped_ptr<base::DictionaryValue> state(new base::DictionaryValue());
1061 state->Set("proxy", proxy_->AsValue().release()); 1070 state->Set("proxy", proxy_->AsValue().release());
1062 return state.PassAs<base::Value>(); 1071 return state.PassAs<base::Value>();
(...skipping 17 matching lines...) Expand all
1080 bool start_ready_animations = true; 1089 bool start_ready_animations = true;
1081 (*iter).second->UpdateState(start_ready_animations, NULL); 1090 (*iter).second->UpdateState(start_ready_animations, NULL);
1082 } 1091 }
1083 } 1092 }
1084 1093
1085 skia::RefPtr<SkPicture> LayerTreeHost::CapturePicture() { 1094 skia::RefPtr<SkPicture> LayerTreeHost::CapturePicture() {
1086 return proxy_->CapturePicture(); 1095 return proxy_->CapturePicture();
1087 } 1096 }
1088 1097
1089 } // namespace cc 1098 } // namespace cc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698