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

Side by Side Diff: cc/input_handler.h

Issue 11365238: cc: Return whether any layer was scrolled from InputHandlerClient::scrollBy. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 8 years, 1 month 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 | « no previous file | cc/layer_tree_host_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_HANDLER_H_ 5 #ifndef CC_INPUT_HANDLER_H_
6 #define CC_INPUT_HANDLER_H_ 6 #define CC_INPUT_HANDLER_H_
7 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "base/time.h" 9 #include "base/time.h"
10 #include "cc/cc_export.h" 10 #include "cc/cc_export.h"
(...skipping 23 matching lines...) Expand all
34 // can be scrolled, ScrollOnMainThread if the scroll event should instead be 34 // can be scrolled, ScrollOnMainThread if the scroll event should instead be
35 // delegated to the main thread, or ScrollIgnored if there is nothing to be 35 // delegated to the main thread, or ScrollIgnored if there is nothing to be
36 // scrolled at the given coordinates. 36 // scrolled at the given coordinates.
37 virtual ScrollStatus scrollBegin(gfx::Point, ScrollInputType) = 0; 37 virtual ScrollStatus scrollBegin(gfx::Point, ScrollInputType) = 0;
38 38
39 // Scroll the selected layer starting at the given position. If the scroll 39 // Scroll the selected layer starting at the given position. If the scroll
40 // type given to scrollBegin was a gesture, then the scroll point and delta 40 // type given to scrollBegin was a gesture, then the scroll point and delta
41 // should be in viewport (logical pixel) coordinates. Otherwise they are in 41 // should be in viewport (logical pixel) coordinates. Otherwise they are in
42 // scrolling layer's (logical pixel) space. If there is no room to move the 42 // scrolling layer's (logical pixel) space. If there is no room to move the
43 // layer in the requested direction, its first ancestor layer that can be 43 // layer in the requested direction, its first ancestor layer that can be
44 // scrolled will be moved instead. Should only be called if scrollBegin() 44 // scrolled will be moved instead. If no layer can be moved in the requested
45 // returned ScrollStarted. 45 // direction at all, then false is returned. If any layer is moved, then
46 virtual void scrollBy(gfx::Point, gfx::Vector2d) = 0; 46 // true is returned.
47 // Should only be called if scrollBegin() returned ScrollStarted.
48 virtual bool scrollBy(const gfx::Point&, const gfx::Vector2d&) = 0;
47 49
48 // Stop scrolling the selected layer. Should only be called if scrollBegin() 50 // Stop scrolling the selected layer. Should only be called if scrollBegin()
49 // returned ScrollStarted. 51 // returned ScrollStarted.
50 virtual void scrollEnd() = 0; 52 virtual void scrollEnd() = 0;
51 53
52 virtual void pinchGestureBegin() = 0; 54 virtual void pinchGestureBegin() = 0;
53 virtual void pinchGestureUpdate(float magnifyDelta, gfx::Point anchor) = 0; 55 virtual void pinchGestureUpdate(float magnifyDelta, gfx::Point anchor) = 0;
54 virtual void pinchGestureEnd() = 0; 56 virtual void pinchGestureEnd() = 0;
55 57
56 virtual void startPageScaleAnimation(gfx::Vector2d targetOffset, 58 virtual void startPageScaleAnimation(gfx::Vector2d targetOffset,
(...skipping 23 matching lines...) Expand all
80 protected: 82 protected:
81 InputHandler() { } 83 InputHandler() { }
82 84
83 private: 85 private:
84 DISALLOW_COPY_AND_ASSIGN(InputHandler); 86 DISALLOW_COPY_AND_ASSIGN(InputHandler);
85 }; 87 };
86 88
87 } 89 }
88 90
89 #endif // CC_INPUT_HANDLER_H_ 91 #endif // CC_INPUT_HANDLER_H_
OLDNEW
« no previous file with comments | « no previous file | cc/layer_tree_host_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698