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