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

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: Remove semicolon from end of message declaration 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 972 matching lines...) Expand 10 before | Expand all | Expand 10 after
983 983
984 void LayerTreeHost::EnableHidingTopControls(bool enable) { 984 void LayerTreeHost::EnableHidingTopControls(bool enable) {
985 if (!settings_.calculate_top_controls_position) 985 if (!settings_.calculate_top_controls_position)
986 return; 986 return;
987 987
988 proxy_->ImplThread()->PostTask( 988 proxy_->ImplThread()->PostTask(
989 base::Bind(&TopControlsManager::EnableHidingTopControls, 989 base::Bind(&TopControlsManager::EnableHidingTopControls,
990 top_controls_manager_weak_ptr_, enable)); 990 top_controls_manager_weak_ptr_, enable));
991 } 991 }
992 992
993 void LayerTreeHost::ShowTopControls(bool show) {
994 if (!settings_.calculate_top_controls_position)
995 return;
996
997 proxy_->ImplThread()->PostTask(
998 base::Bind(&TopControlsManager::ShowTopControls,
999 top_controls_manager_weak_ptr_, show));
1000 }
1001
993 bool LayerTreeHost::BlocksPendingCommit() const { 1002 bool LayerTreeHost::BlocksPendingCommit() const {
994 if (!root_layer_) 1003 if (!root_layer_)
995 return false; 1004 return false;
996 return root_layer_->BlocksPendingCommitRecursive(); 1005 return root_layer_->BlocksPendingCommitRecursive();
997 } 1006 }
998 1007
999 scoped_ptr<base::Value> LayerTreeHost::AsValue() const { 1008 scoped_ptr<base::Value> LayerTreeHost::AsValue() const {
1000 scoped_ptr<base::DictionaryValue> state(new base::DictionaryValue()); 1009 scoped_ptr<base::DictionaryValue> state(new base::DictionaryValue());
1001 state->Set("proxy", proxy_->AsValue().release()); 1010 state->Set("proxy", proxy_->AsValue().release());
1002 return state.PassAs<base::Value>(); 1011 return state.PassAs<base::Value>();
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
1056 SetAnimationEventsRecursive(events, 1065 SetAnimationEventsRecursive(events,
1057 layer->children()[child_index].get(), 1066 layer->children()[child_index].get(),
1058 wall_clock_time); 1067 wall_clock_time);
1059 } 1068 }
1060 1069
1061 skia::RefPtr<SkPicture> LayerTreeHost::CapturePicture() { 1070 skia::RefPtr<SkPicture> LayerTreeHost::CapturePicture() {
1062 return proxy_->CapturePicture(); 1071 return proxy_->CapturePicture();
1063 } 1072 }
1064 1073
1065 } // namespace cc 1074 } // namespace cc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698