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

Side by Side Diff: Source/core/page/scrolling/ScrollStateCallback.h

Issue 1236913004: Expose scroll customization for touch to JS (behind REF). (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Add to leak expectations. Created 5 years, 3 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
(Empty)
1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef ScrollStateCallback_h
6 #define ScrollStateCallback_h
7
8 #include "platform/heap/Handle.h"
9
10 namespace blink {
11
12 class ScrollState;
13
14 enum class NativeScrollBehavior {
15 DisableNativeScroll,
16 PerformBeforeNativeScroll,
17 PerformAfterNativeScroll,
18 };
19
20 class ScrollStateCallback : public GarbageCollectedFinalized<ScrollStateCallback > {
21 public:
22 ScrollStateCallback()
23 : m_nativeScrollBehavior(NativeScrollBehavior::DisableNativeScroll)
24 {
25 }
26
27 virtual ~ScrollStateCallback()
28 {
29 }
30
31 DEFINE_INLINE_VIRTUAL_TRACE() {}
32 virtual void handleEvent(ScrollState*) = 0;
33
34 void setNativeScrollBehavior(NativeScrollBehavior nativeScrollBehavior)
35 {
36 m_nativeScrollBehavior = nativeScrollBehavior;
37 }
38
39 NativeScrollBehavior nativeScrollBehavior()
40 {
41 return m_nativeScrollBehavior;
42 }
43
44 static NativeScrollBehavior toNativeScrollBehavior(String nativeScrollBehavi or);
45
46 protected:
47 NativeScrollBehavior m_nativeScrollBehavior;
48 };
49
50 } // namespace blink
51
52 #endif // ScrollStateCallback_h
OLDNEW
« no previous file with comments | « Source/core/page/scrolling/ScrollState.idl ('k') | Source/core/page/scrolling/ScrollStateCallback.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698