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

Side by Side Diff: third_party/WebKit/Source/core/page/scrolling/OverscrollController.h

Issue 2884423003: Use scroll-boundary-behavior to control overscroll-refresh/glow on android. (Closed)
Patch Set: rebase Created 3 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
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 OverscrollController_h 5 #ifndef OverscrollController_h
6 #define OverscrollController_h 6 #define OverscrollController_h
7 7
8 #include "platform/geometry/FloatSize.h" 8 #include "platform/geometry/FloatSize.h"
9 #include "platform/heap/Handle.h" 9 #include "platform/heap/Handle.h"
10 #include "public/platform/WebScrollBoundaryBehavior.h"
10 11
11 namespace blink { 12 namespace blink {
12 13
13 class ChromeClient; 14 class ChromeClient;
14 class FloatPoint; 15 class FloatPoint;
15 struct ScrollResult; 16 struct ScrollResult;
16 class VisualViewport; 17 class VisualViewport;
17 18
18 // Handles overscroll logic that occurs when the user scolls past the end of the 19 // Handles overscroll logic that occurs when the user scolls past the end of the
19 // document's scroll extents. Currently, this applies only to document scrolling 20 // document's scroll extents. Currently, this applies only to document scrolling
(...skipping 11 matching lines...) Expand all
31 32
32 // Reports unused scroll as overscroll to the content layer. The position 33 // Reports unused scroll as overscroll to the content layer. The position
33 // argument is the most recent location of the gesture, the finger position 34 // argument is the most recent location of the gesture, the finger position
34 // for touch scrolling and the cursor position for wheel. Velocity is used 35 // for touch scrolling and the cursor position for wheel. Velocity is used
35 // in the case of a fling gesture where we want the overscroll to feel like 36 // in the case of a fling gesture where we want the overscroll to feel like
36 // it has momentum. 37 // it has momentum.
37 void HandleOverscroll(const ScrollResult&, 38 void HandleOverscroll(const ScrollResult&,
38 const FloatPoint& position_in_root_frame, 39 const FloatPoint& position_in_root_frame,
39 const FloatSize& velocity_in_root_frame); 40 const FloatSize& velocity_in_root_frame);
40 41
42 void SetScrollBoundaryBehavior(const WebScrollBoundaryBehavior&);
43
41 DECLARE_TRACE(); 44 DECLARE_TRACE();
42 45
43 private: 46 private:
44 OverscrollController(const VisualViewport&, ChromeClient&); 47 OverscrollController(const VisualViewport&, ChromeClient&);
45 48
46 WeakMember<const VisualViewport> visual_viewport_; 49 WeakMember<const VisualViewport> visual_viewport_;
47 WeakMember<ChromeClient> chrome_client_; 50 WeakMember<ChromeClient> chrome_client_;
48 51
49 FloatSize accumulated_root_overscroll_; 52 FloatSize accumulated_root_overscroll_;
53
54 WebScrollBoundaryBehavior scroll_boundary_behavior_;
50 }; 55 };
51 56
52 } // namespace blink 57 } // namespace blink
53 58
54 #endif // OverscrollController_h 59 #endif // OverscrollController_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698