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

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

Issue 20990009: Handle root layer fling Java-side in android_webview. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix findbugs Created 7 years, 4 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_impl.h" 5 #include "cc/trees/layer_tree_host_impl.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/basictypes.h" 9 #include "base/basictypes.h"
10 #include "base/json/json_writer.h" 10 #include "base/json/json_writer.h"
(...skipping 2099 matching lines...) Expand 10 before | Expand all | Expand 10 after
2110 } 2110 }
2111 2111
2112 void LayerTreeHostImpl::ScrollEnd() { 2112 void LayerTreeHostImpl::ScrollEnd() {
2113 if (top_controls_manager_) 2113 if (top_controls_manager_)
2114 top_controls_manager_->ScrollEnd(); 2114 top_controls_manager_->ScrollEnd();
2115 ClearCurrentlyScrollingLayer(); 2115 ClearCurrentlyScrollingLayer();
2116 StartScrollbarAnimation(); 2116 StartScrollbarAnimation();
2117 } 2117 }
2118 2118
2119 InputHandler::ScrollStatus LayerTreeHostImpl::FlingScrollBegin() { 2119 InputHandler::ScrollStatus LayerTreeHostImpl::FlingScrollBegin() {
2120 if (active_tree_->CurrentlyScrollingLayer()) 2120 if (!active_tree_->CurrentlyScrollingLayer())
2121 return ScrollStarted; 2121 return ScrollIgnored;
2122 2122
2123 return ScrollIgnored; 2123 if (settings_.ignore_root_layer_flings &&
2124 active_tree_->CurrentlyScrollingLayer() ==
2125 active_tree_->RootScrollLayer()) {
2126 ClearCurrentlyScrollingLayer();
2127 return ScrollIgnored;
2128 }
2129
2130 return ScrollStarted;
2124 } 2131 }
2125 2132
2126 void LayerTreeHostImpl::NotifyCurrentFlingVelocity(gfx::Vector2dF velocity) { 2133 void LayerTreeHostImpl::NotifyCurrentFlingVelocity(gfx::Vector2dF velocity) {
2127 current_fling_velocity_ = velocity; 2134 current_fling_velocity_ = velocity;
2128 } 2135 }
2129 2136
2130 void LayerTreeHostImpl::PinchGestureBegin() { 2137 void LayerTreeHostImpl::PinchGestureBegin() {
2131 pinch_gesture_active_ = true; 2138 pinch_gesture_active_ = true;
2132 previous_pinch_anchor_ = gfx::Point(); 2139 previous_pinch_anchor_ = gfx::Point();
2133 client_->RenewTreePriority(); 2140 client_->RenewTreePriority();
(...skipping 356 matching lines...) Expand 10 before | Expand all | Expand 10 after
2490 2497
2491 ResourceProvider::ResourceId LayerTreeHostImpl::ResourceIdForUIResource( 2498 ResourceProvider::ResourceId LayerTreeHostImpl::ResourceIdForUIResource(
2492 UIResourceId uid) const { 2499 UIResourceId uid) const {
2493 UIResourceMap::const_iterator iter = ui_resource_map_.find(uid); 2500 UIResourceMap::const_iterator iter = ui_resource_map_.find(uid);
2494 if (iter != ui_resource_map_.end()) 2501 if (iter != ui_resource_map_.end())
2495 return iter->second; 2502 return iter->second;
2496 return 0; 2503 return 0;
2497 } 2504 }
2498 2505
2499 } // namespace cc 2506 } // namespace cc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698