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

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

Issue 1418493003: Let LayerTreeHostImpl::ScrollAnimated scroll the outer viewport. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rename IsCurrentlyScrollingRoot Created 5 years, 2 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
« no previous file with comments | « no previous file | cc/layers/layer_impl.cc » ('j') | cc/trees/layer_tree_host_impl.cc » ('J')
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/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "base/time/time.h" 10 #include "base/time/time.h"
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
77 // Note these are used in a histogram. Do not reorder or delete existing 77 // Note these are used in a histogram. Do not reorder or delete existing
78 // entries. 78 // entries.
79 enum ScrollStatus { 79 enum ScrollStatus {
80 SCROLL_ON_MAIN_THREAD = 0, 80 SCROLL_ON_MAIN_THREAD = 0,
81 SCROLL_STARTED, 81 SCROLL_STARTED,
82 SCROLL_IGNORED, 82 SCROLL_IGNORED,
83 SCROLL_UNKNOWN, 83 SCROLL_UNKNOWN,
84 // This must be the last entry. 84 // This must be the last entry.
85 ScrollStatusCount 85 ScrollStatusCount
86 }; 86 };
87 enum ScrollInputType { GESTURE, WHEEL, NON_BUBBLING_GESTURE }; 87 enum ScrollInputType { GESTURE, WHEEL, ANIMATED_WHEEL, NON_BUBBLING_GESTURE };
88 88
89 // Binds a client to this handler to receive notifications. Only one client 89 // Binds a client to this handler to receive notifications. Only one client
90 // can be bound to an InputHandler. The client must live at least until the 90 // can be bound to an InputHandler. The client must live at least until the
91 // handler calls WillShutdown() on the client. 91 // handler calls WillShutdown() on the client.
92 virtual void BindToClient(InputHandlerClient* client) = 0; 92 virtual void BindToClient(InputHandlerClient* client) = 0;
93 93
94 // Selects a layer to be scrolled at a given point in viewport (logical 94 // Selects a layer to be scrolled at a given point in viewport (logical
95 // pixel) coordinates. Returns SCROLL_STARTED if the layer at the coordinates 95 // pixel) coordinates. Returns SCROLL_STARTED if the layer at the coordinates
96 // can be scrolled, SCROLL_ON_MAIN_THREAD if the scroll event should instead 96 // can be scrolled, SCROLL_ON_MAIN_THREAD if the scroll event should instead
97 // be delegated to the main thread, or SCROLL_IGNORED if there is nothing to 97 // be delegated to the main thread, or SCROLL_IGNORED if there is nothing to
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
145 145
146 virtual void PinchGestureBegin() = 0; 146 virtual void PinchGestureBegin() = 0;
147 virtual void PinchGestureUpdate(float magnify_delta, 147 virtual void PinchGestureUpdate(float magnify_delta,
148 const gfx::Point& anchor) = 0; 148 const gfx::Point& anchor) = 0;
149 virtual void PinchGestureEnd() = 0; 149 virtual void PinchGestureEnd() = 0;
150 150
151 // Request another callback to InputHandlerClient::Animate(). 151 // Request another callback to InputHandlerClient::Animate().
152 virtual void SetNeedsAnimateInput() = 0; 152 virtual void SetNeedsAnimateInput() = 0;
153 153
154 // If there is a scroll active, this reports whether the scroll is on the 154 // If there is a scroll active, this reports whether the scroll is on the
155 // root layer, or on some other sublayer. 155 // root layer, or on some other sublayer.
tdresser 2015/10/20 12:29:40 Should we update this comment?
skobes 2015/10/20 18:28:15 Done.
156 virtual bool IsCurrentlyScrollingRoot() const = 0; 156 virtual bool IsCurrentlyScrollingInnerViewport() const = 0;
157 157
158 // Whether the layer under |viewport_point| is the currently scrolling layer. 158 // Whether the layer under |viewport_point| is the currently scrolling layer.
159 virtual bool IsCurrentlyScrollingLayerAt(const gfx::Point& viewport_point, 159 virtual bool IsCurrentlyScrollingLayerAt(const gfx::Point& viewport_point,
160 ScrollInputType type) const = 0; 160 ScrollInputType type) const = 0;
161 161
162 virtual bool HaveWheelEventHandlersAt(const gfx::Point& viewport_point) = 0; 162 virtual bool HaveWheelEventHandlersAt(const gfx::Point& viewport_point) = 0;
163 163
164 // Whether the page should be given the opportunity to suppress scrolling by 164 // Whether the page should be given the opportunity to suppress scrolling by
165 // consuming touch events that started at |viewport_point|. 165 // consuming touch events that started at |viewport_point|.
166 virtual bool DoTouchEventsBlockScrollAt(const gfx::Point& viewport_point) = 0; 166 virtual bool DoTouchEventsBlockScrollAt(const gfx::Point& viewport_point) = 0;
(...skipping 12 matching lines...) Expand all
179 InputHandler() {} 179 InputHandler() {}
180 virtual ~InputHandler() {} 180 virtual ~InputHandler() {}
181 181
182 private: 182 private:
183 DISALLOW_COPY_AND_ASSIGN(InputHandler); 183 DISALLOW_COPY_AND_ASSIGN(InputHandler);
184 }; 184 };
185 185
186 } // namespace cc 186 } // namespace cc
187 187
188 #endif // CC_INPUT_INPUT_HANDLER_H_ 188 #endif // CC_INPUT_INPUT_HANDLER_H_
OLDNEW
« no previous file with comments | « no previous file | cc/layers/layer_impl.cc » ('j') | cc/trees/layer_tree_host_impl.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698