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

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

Issue 11967015: Hide location bar on WebKit programmatic scroll. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Route requestHideTopControls through browser. Created 7 years, 9 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 | Annotate | Revision Log
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 "base/bind.h" 7 #include "base/bind.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/debug/trace_event.h" 9 #include "base/debug/trace_event.h"
10 #include "base/message_loop.h" 10 #include "base/message_loop.h"
(...skipping 953 matching lines...) Expand 10 before | Expand all | Expand 10 after
964 964
965 void LayerTreeHost::EnableHidingTopControls(bool enable) { 965 void LayerTreeHost::EnableHidingTopControls(bool enable) {
966 if (!settings_.calculate_top_controls_position) 966 if (!settings_.calculate_top_controls_position)
967 return; 967 return;
968 968
969 proxy_->ImplThread()->PostTask( 969 proxy_->ImplThread()->PostTask(
970 base::Bind(&TopControlsManager::EnableHidingTopControls, 970 base::Bind(&TopControlsManager::EnableHidingTopControls,
971 top_controls_manager_weak_ptr_, enable)); 971 top_controls_manager_weak_ptr_, enable));
972 } 972 }
973 973
974 void LayerTreeHost::ShowTopControls(bool show)
975 {
John Knottenbelt 2013/03/25 15:29:48 To previous line.
976 proxy_->ImplThread()->PostTask(
John Knottenbelt 2013/03/25 15:29:48 Add if (!settings_.calculate_top_controls_positio
977 base::Bind(&TopControlsManager::ShowTopControls,
978 top_controls_manager_weak_ptr_, show));
979 }
980
974 bool LayerTreeHost::BlocksPendingCommit() const { 981 bool LayerTreeHost::BlocksPendingCommit() const {
975 if (!root_layer_) 982 if (!root_layer_)
976 return false; 983 return false;
977 return root_layer_->BlocksPendingCommitRecursive(); 984 return root_layer_->BlocksPendingCommitRecursive();
978 } 985 }
979 986
980 scoped_ptr<base::Value> LayerTreeHost::AsValue() const { 987 scoped_ptr<base::Value> LayerTreeHost::AsValue() const {
981 scoped_ptr<base::DictionaryValue> state(new base::DictionaryValue()); 988 scoped_ptr<base::DictionaryValue> state(new base::DictionaryValue());
982 state->Set("proxy", proxy_->AsValue().release()); 989 state->Set("proxy", proxy_->AsValue().release());
983 return state.PassAs<base::Value>(); 990 return state.PassAs<base::Value>();
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
1037 SetAnimationEventsRecursive(events, 1044 SetAnimationEventsRecursive(events,
1038 layer->children()[child_index].get(), 1045 layer->children()[child_index].get(),
1039 wall_clock_time); 1046 wall_clock_time);
1040 } 1047 }
1041 1048
1042 skia::RefPtr<SkPicture> LayerTreeHost::CapturePicture() { 1049 skia::RefPtr<SkPicture> LayerTreeHost::CapturePicture() {
1043 return proxy_->CapturePicture(); 1050 return proxy_->CapturePicture();
1044 } 1051 }
1045 1052
1046 } // namespace cc 1053 } // namespace cc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698