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

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

Issue 14999010: Allows fullscreen to be triggered with the key events used for scrolling. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed comments Created 7 years, 6 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
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 <algorithm> 7 #include <algorithm>
8 #include <stack> 8 #include <stack>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 1023 matching lines...) Expand 10 before | Expand all | Expand 10 after
1034 1034
1035 SetNeedsCommit(); 1035 SetNeedsCommit();
1036 } 1036 }
1037 1037
1038 void LayerTreeHost::UpdateTopControlsState(TopControlsState constraints, 1038 void LayerTreeHost::UpdateTopControlsState(TopControlsState constraints,
1039 TopControlsState current, 1039 TopControlsState current,
1040 bool animate) { 1040 bool animate) {
1041 if (!settings_.calculate_top_controls_position) 1041 if (!settings_.calculate_top_controls_position)
1042 return; 1042 return;
1043 1043
1044 top_controls_constraints_ = constraints;
1044 // Top controls are only used in threaded mode. 1045 // Top controls are only used in threaded mode.
1045 proxy_->ImplThread()->PostTask( 1046 proxy_->ImplThread()->PostTask(
1046 base::Bind(&TopControlsManager::UpdateTopControlsState, 1047 base::Bind(&TopControlsManager::UpdateTopControlsState,
1047 top_controls_manager_weak_ptr_, 1048 top_controls_manager_weak_ptr_,
1048 constraints, 1049 constraints,
1049 current, 1050 current,
1050 animate)); 1051 animate));
1051 } 1052 }
1052 1053
1054 void LayerTreeHost::UpdateTopControlsStatePreservingConstraints(
1055 TopControlsState current,
1056 bool animate) {
1057 if (!settings_.calculate_top_controls_position)
1058 return;
1059 if (top_controls_constraints_ < 0)
jamesr 2013/06/10 23:48:31 top_controls_constraints_ is an enum. what does "<
Jinsuk Kim 2013/06/11 04:53:18 Added cc::NONE value to the enum list.
1060 return;
1061
1062 UpdateTopControlsState(top_controls_constraints_,
1063 current,
1064 animate);
1065 }
1066
1053 bool LayerTreeHost::BlocksPendingCommit() const { 1067 bool LayerTreeHost::BlocksPendingCommit() const {
1054 if (!root_layer_.get()) 1068 if (!root_layer_.get())
1055 return false; 1069 return false;
1056 return root_layer_->BlocksPendingCommitRecursive(); 1070 return root_layer_->BlocksPendingCommitRecursive();
1057 } 1071 }
1058 1072
1059 scoped_ptr<base::Value> LayerTreeHost::AsValue() const { 1073 scoped_ptr<base::Value> LayerTreeHost::AsValue() const {
1060 scoped_ptr<base::DictionaryValue> state(new base::DictionaryValue()); 1074 scoped_ptr<base::DictionaryValue> state(new base::DictionaryValue());
1061 state->Set("proxy", proxy_->AsValue().release()); 1075 state->Set("proxy", proxy_->AsValue().release());
1062 return state.PassAs<base::Value>(); 1076 return state.PassAs<base::Value>();
(...skipping 18 matching lines...) Expand all
1081 bool start_ready_animations = true; 1095 bool start_ready_animations = true;
1082 (*iter).second->UpdateState(start_ready_animations, NULL); 1096 (*iter).second->UpdateState(start_ready_animations, NULL);
1083 } 1097 }
1084 } 1098 }
1085 1099
1086 skia::RefPtr<SkPicture> LayerTreeHost::CapturePicture() { 1100 skia::RefPtr<SkPicture> LayerTreeHost::CapturePicture() {
1087 return proxy_->CapturePicture(); 1101 return proxy_->CapturePicture();
1088 } 1102 }
1089 1103
1090 } // namespace cc 1104 } // namespace cc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698