Index: Source/core/page/scrolling/ScrollStateCallback.h |
diff --git a/Source/core/page/scrolling/ScrollStateCallback.h b/Source/core/page/scrolling/ScrollStateCallback.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..fe74bc222dee797ba5854bb20ddb4a34e91aa50b |
--- /dev/null |
+++ b/Source/core/page/scrolling/ScrollStateCallback.h |
@@ -0,0 +1,48 @@ |
+// Copyright 2015 The Chromium Authors. All rights reserved. |
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+#ifndef ScrollStateCallback_h |
+#define ScrollStateCallback_h |
+ |
+#include "core/page/scrolling/NativeScrollBehavior.h" |
+#include "platform/heap/Handle.h" |
+ |
+namespace blink { |
+ |
+class ScrollState; |
+enum class NativeScrollBehavior; |
haraken
2015/07/15 00:15:18
Remove this. Or I think we can move the contents o
tdresser
2015/07/15 14:04:55
Removed NativeScrollBehavior.h.
|
+ |
+class ScrollStateCallback : public GarbageCollectedFinalized<ScrollStateCallback> { |
+public: |
+ ScrollStateCallback() |
haraken
2015/07/15 00:15:18
Add explicit.
tdresser
2015/07/15 14:04:55
When there are 0 parameters?
Done, but `git grep "
haraken
2015/07/15 14:07:17
Sorry, you're right.
|
+ : m_nativeScrollBehavior(NativeScrollBehavior::DisableNativeScroll) |
+ { |
+ } |
+ |
+ virtual ~ScrollStateCallback() |
+ { |
+ } |
+ |
+ DEFINE_INLINE_VIRTUAL_TRACE() {} |
+ virtual void handleEvent(ScrollState*) = 0; |
+ |
+ void setNativeScrollBehavior(NativeScrollBehavior nativeScrollBehavior) |
+ { |
+ m_nativeScrollBehavior = nativeScrollBehavior; |
+ } |
+ |
+ NativeScrollBehavior nativeScrollBehavior() |
+ { |
+ return m_nativeScrollBehavior; |
+ } |
+ |
+ static NativeScrollBehavior toNativeScrollBehavior(String nativeScrollBehavior); |
+ |
+protected: |
+ NativeScrollBehavior m_nativeScrollBehavior; |
+}; |
+ |
+} // namespace blink |
+ |
+#endif // ScrollStateCallback_h |