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 <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 1041 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1052 return; | 1052 return; |
1053 | 1053 |
1054 proxy_->ImplThread()->PostTask( | 1054 proxy_->ImplThread()->PostTask( |
1055 base::Bind(&TopControlsManager::UpdateTopControlsState, | 1055 base::Bind(&TopControlsManager::UpdateTopControlsState, |
1056 top_controls_manager_weak_ptr_, | 1056 top_controls_manager_weak_ptr_, |
1057 enable_hiding, | 1057 enable_hiding, |
1058 enable_showing, | 1058 enable_showing, |
1059 animate)); | 1059 animate)); |
1060 } | 1060 } |
1061 | 1061 |
| 1062 void LayerTreeHost::ShowTopControls(bool show) { |
| 1063 if (!settings_.calculate_top_controls_position) |
| 1064 return; |
| 1065 |
| 1066 proxy_->ImplThread()->PostTask( |
| 1067 base::Bind(&TopControlsManager::ShowTopControls, |
| 1068 top_controls_manager_weak_ptr_, show)); |
| 1069 } |
| 1070 |
1062 bool LayerTreeHost::BlocksPendingCommit() const { | 1071 bool LayerTreeHost::BlocksPendingCommit() const { |
1063 if (!root_layer_) | 1072 if (!root_layer_) |
1064 return false; | 1073 return false; |
1065 return root_layer_->BlocksPendingCommitRecursive(); | 1074 return root_layer_->BlocksPendingCommitRecursive(); |
1066 } | 1075 } |
1067 | 1076 |
1068 scoped_ptr<base::Value> LayerTreeHost::AsValue() const { | 1077 scoped_ptr<base::Value> LayerTreeHost::AsValue() const { |
1069 scoped_ptr<base::DictionaryValue> state(new base::DictionaryValue()); | 1078 scoped_ptr<base::DictionaryValue> state(new base::DictionaryValue()); |
1070 state->Set("proxy", proxy_->AsValue().release()); | 1079 state->Set("proxy", proxy_->AsValue().release()); |
1071 return state.PassAs<base::Value>(); | 1080 return state.PassAs<base::Value>(); |
(...skipping 17 matching lines...) Expand all Loading... |
1089 bool start_ready_animations = true; | 1098 bool start_ready_animations = true; |
1090 (*iter).second->UpdateState(start_ready_animations, NULL); | 1099 (*iter).second->UpdateState(start_ready_animations, NULL); |
1091 } | 1100 } |
1092 } | 1101 } |
1093 | 1102 |
1094 skia::RefPtr<SkPicture> LayerTreeHost::CapturePicture() { | 1103 skia::RefPtr<SkPicture> LayerTreeHost::CapturePicture() { |
1095 return proxy_->CapturePicture(); | 1104 return proxy_->CapturePicture(); |
1096 } | 1105 } |
1097 | 1106 |
1098 } // namespace cc | 1107 } // namespace cc |
OLD | NEW |