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

Side by Side Diff: cc/input/input_handler.h

Issue 361143002: Impl thread smooth scrolling. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase. Created 6 years, 5 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
« no previous file with comments | « cc/animation/layer_animation_controller_unittest.cc ('k') | cc/layers/layer_impl.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #ifndef CC_INPUT_INPUT_HANDLER_H_ 5 #ifndef CC_INPUT_INPUT_HANDLER_H_
6 #define CC_INPUT_INPUT_HANDLER_H_ 6 #define CC_INPUT_INPUT_HANDLER_H_
7 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "base/time/time.h" 9 #include "base/time/time.h"
10 #include "cc/base/cc_export.h" 10 #include "cc/base/cc_export.h"
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
69 virtual void BindToClient(InputHandlerClient* client) = 0; 69 virtual void BindToClient(InputHandlerClient* client) = 0;
70 70
71 // Selects a layer to be scrolled at a given point in viewport (logical 71 // Selects a layer to be scrolled at a given point in viewport (logical
72 // pixel) coordinates. Returns ScrollStarted if the layer at the coordinates 72 // pixel) coordinates. Returns ScrollStarted if the layer at the coordinates
73 // can be scrolled, ScrollOnMainThread if the scroll event should instead be 73 // can be scrolled, ScrollOnMainThread if the scroll event should instead be
74 // delegated to the main thread, or ScrollIgnored if there is nothing to be 74 // delegated to the main thread, or ScrollIgnored if there is nothing to be
75 // scrolled at the given coordinates. 75 // scrolled at the given coordinates.
76 virtual ScrollStatus ScrollBegin(const gfx::Point& viewport_point, 76 virtual ScrollStatus ScrollBegin(const gfx::Point& viewport_point,
77 ScrollInputType type) = 0; 77 ScrollInputType type) = 0;
78 78
79 virtual ScrollStatus ScrollAnimated(const gfx::Point& viewport_point,
80 const gfx::Vector2dF& scroll_delta) = 0;
81
79 // Scroll the selected layer starting at the given position. If the scroll 82 // Scroll the selected layer starting at the given position. If the scroll
80 // type given to ScrollBegin was a gesture, then the scroll point and delta 83 // type given to ScrollBegin was a gesture, then the scroll point and delta
81 // should be in viewport (logical pixel) coordinates. Otherwise they are in 84 // should be in viewport (logical pixel) coordinates. Otherwise they are in
82 // scrolling layer's (logical pixel) space. If there is no room to move the 85 // scrolling layer's (logical pixel) space. If there is no room to move the
83 // layer in the requested direction, its first ancestor layer that can be 86 // layer in the requested direction, its first ancestor layer that can be
84 // scrolled will be moved instead. If no layer can be moved in the requested 87 // scrolled will be moved instead. If no layer can be moved in the requested
85 // direction at all, then false is returned. If any layer is moved, then 88 // direction at all, then false is returned. If any layer is moved, then
86 // true is returned. 89 // true is returned.
87 // If the scroll delta hits the root layer, and the layer can no longer move, 90 // If the scroll delta hits the root layer, and the layer can no longer move,
88 // the root overscroll accumulated within this ScrollBegin() scope is reported 91 // the root overscroll accumulated within this ScrollBegin() scope is reported
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
145 InputHandler() {} 148 InputHandler() {}
146 virtual ~InputHandler() {} 149 virtual ~InputHandler() {}
147 150
148 private: 151 private:
149 DISALLOW_COPY_AND_ASSIGN(InputHandler); 152 DISALLOW_COPY_AND_ASSIGN(InputHandler);
150 }; 153 };
151 154
152 } // namespace cc 155 } // namespace cc
153 156
154 #endif // CC_INPUT_INPUT_HANDLER_H_ 157 #endif // CC_INPUT_INPUT_HANDLER_H_
OLDNEW
« no previous file with comments | « cc/animation/layer_animation_controller_unittest.cc ('k') | cc/layers/layer_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698