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

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

Issue 2189583004: [not for review - epic CL] Adding Elastic+Momentum+Layered scrolling to views::ScrollView Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 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 | « cc/blink/web_layer_impl.cc ('k') | cc/input/scroll_elasticity_helper.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 <memory> 8 #include <memory>
9 9
10 #include "base/macros.h" 10 #include "base/macros.h"
11 #include "base/memory/weak_ptr.h"
11 #include "base/time/time.h" 12 #include "base/time/time.h"
12 #include "cc/base/cc_export.h" 13 #include "cc/base/cc_export.h"
13 #include "cc/input/event_listener_properties.h" 14 #include "cc/input/event_listener_properties.h"
14 #include "cc/input/main_thread_scrolling_reason.h" 15 #include "cc/input/main_thread_scrolling_reason.h"
15 #include "cc/input/scroll_state.h" 16 #include "cc/input/scroll_state.h"
16 #include "cc/input/scrollbar.h" 17 #include "cc/input/scrollbar.h"
17 #include "cc/trees/swap_promise_monitor.h" 18 #include "cc/trees/swap_promise_monitor.h"
18 19
19 namespace gfx { 20 namespace gfx {
20 class Point; 21 class Point;
(...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after
192 virtual bool DoTouchEventsBlockScrollAt(const gfx::Point& viewport_point) = 0; 193 virtual bool DoTouchEventsBlockScrollAt(const gfx::Point& viewport_point) = 0;
193 194
194 // Calling CreateLatencyInfoSwapPromiseMonitor() to get a scoped 195 // Calling CreateLatencyInfoSwapPromiseMonitor() to get a scoped
195 // LatencyInfoSwapPromiseMonitor. During the life time of the 196 // LatencyInfoSwapPromiseMonitor. During the life time of the
196 // LatencyInfoSwapPromiseMonitor, if SetNeedsRedraw() or SetNeedsRedrawRect() 197 // LatencyInfoSwapPromiseMonitor, if SetNeedsRedraw() or SetNeedsRedrawRect()
197 // is called on LayerTreeHostImpl, the original latency info will be turned 198 // is called on LayerTreeHostImpl, the original latency info will be turned
198 // into a LatencyInfoSwapPromise. 199 // into a LatencyInfoSwapPromise.
199 virtual std::unique_ptr<SwapPromiseMonitor> 200 virtual std::unique_ptr<SwapPromiseMonitor>
200 CreateLatencyInfoSwapPromiseMonitor(ui::LatencyInfo* latency) = 0; 201 CreateLatencyInfoSwapPromiseMonitor(ui::LatencyInfo* latency) = 0;
201 202
202 virtual ScrollElasticityHelper* CreateScrollElasticityHelper() = 0; 203 virtual ScrollElasticityHelper* CreateRootScrollElasticityHelper() = 0;
204 virtual base::WeakPtr<ScrollElasticityHelper>
205 ScrollElasticityHelperForScrollingLayer() = 0;
203 206
204 // Called by the single-threaded UI Compositor to get or set the scroll offset 207 // Called by the single-threaded UI Compositor to get or set the scroll offset
205 // on the impl side. Retruns false if |layer_id| isn't in the active tree. 208 // on the impl side. Retruns false if |layer_id| isn't in the active tree.
206 virtual bool GetScrollOffsetForLayer(int layer_id, 209 virtual bool GetScrollOffsetForLayer(int layer_id,
207 gfx::ScrollOffset* offset) = 0; 210 gfx::ScrollOffset* offset) = 0;
208 virtual bool ScrollLayerTo(int layer_id, const gfx::ScrollOffset& offset) = 0; 211 virtual bool ScrollLayerTo(int layer_id, const gfx::ScrollOffset& offset) = 0;
209 212
210 protected: 213 protected:
211 InputHandler() {} 214 InputHandler() {}
212 virtual ~InputHandler() {} 215 virtual ~InputHandler() {}
213 216
214 private: 217 private:
215 DISALLOW_COPY_AND_ASSIGN(InputHandler); 218 DISALLOW_COPY_AND_ASSIGN(InputHandler);
216 }; 219 };
217 220
218 } // namespace cc 221 } // namespace cc
219 222
220 #endif // CC_INPUT_INPUT_HANDLER_H_ 223 #endif // CC_INPUT_INPUT_HANDLER_H_
OLDNEW
« no previous file with comments | « cc/blink/web_layer_impl.cc ('k') | cc/input/scroll_elasticity_helper.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698