OLD | NEW |
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 963 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
974 | 974 |
975 void LayerTreeHost::EnableHidingTopControls(bool enable) { | 975 void LayerTreeHost::EnableHidingTopControls(bool enable) { |
976 if (!settings_.calculate_top_controls_position) | 976 if (!settings_.calculate_top_controls_position) |
977 return; | 977 return; |
978 | 978 |
979 proxy_->ImplThread()->PostTask( | 979 proxy_->ImplThread()->PostTask( |
980 base::Bind(&TopControlsManager::EnableHidingTopControls, | 980 base::Bind(&TopControlsManager::EnableHidingTopControls, |
981 top_controls_manager_weak_ptr_, enable)); | 981 top_controls_manager_weak_ptr_, enable)); |
982 } | 982 } |
983 | 983 |
| 984 void LayerTreeHost::ShowTopControls(bool show) { |
| 985 if (!settings_.calculate_top_controls_position) |
| 986 return; |
| 987 |
| 988 proxy_->ImplThread()->PostTask( |
| 989 base::Bind(&TopControlsManager::ShowTopControls, |
| 990 top_controls_manager_weak_ptr_, show)); |
| 991 } |
| 992 |
984 bool LayerTreeHost::BlocksPendingCommit() const { | 993 bool LayerTreeHost::BlocksPendingCommit() const { |
985 if (!root_layer_) | 994 if (!root_layer_) |
986 return false; | 995 return false; |
987 return root_layer_->BlocksPendingCommitRecursive(); | 996 return root_layer_->BlocksPendingCommitRecursive(); |
988 } | 997 } |
989 | 998 |
990 scoped_ptr<base::Value> LayerTreeHost::AsValue() const { | 999 scoped_ptr<base::Value> LayerTreeHost::AsValue() const { |
991 scoped_ptr<base::DictionaryValue> state(new base::DictionaryValue()); | 1000 scoped_ptr<base::DictionaryValue> state(new base::DictionaryValue()); |
992 state->Set("proxy", proxy_->AsValue().release()); | 1001 state->Set("proxy", proxy_->AsValue().release()); |
993 return state.PassAs<base::Value>(); | 1002 return state.PassAs<base::Value>(); |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1047 SetAnimationEventsRecursive(events, | 1056 SetAnimationEventsRecursive(events, |
1048 layer->children()[child_index].get(), | 1057 layer->children()[child_index].get(), |
1049 wall_clock_time); | 1058 wall_clock_time); |
1050 } | 1059 } |
1051 | 1060 |
1052 skia::RefPtr<SkPicture> LayerTreeHost::CapturePicture() { | 1061 skia::RefPtr<SkPicture> LayerTreeHost::CapturePicture() { |
1053 return proxy_->CapturePicture(); | 1062 return proxy_->CapturePicture(); |
1054 } | 1063 } |
1055 | 1064 |
1056 } // namespace cc | 1065 } // namespace cc |
OLD | NEW |