Index: third_party/WebKit/Source/core/page/scrolling/ViewportScrollCallback.h |
diff --git a/third_party/WebKit/Source/core/page/scrolling/ViewportScrollCallback.h b/third_party/WebKit/Source/core/page/scrolling/ViewportScrollCallback.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..979da5f521df84f1f768f5853a131385d7af9d38 |
--- /dev/null |
+++ b/third_party/WebKit/Source/core/page/scrolling/ViewportScrollCallback.h |
@@ -0,0 +1,41 @@ |
+// Copyright 2016 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 ViewportScrollCallback_h |
+#define ViewportScrollCallback_h |
+ |
+#include "core/page/scrolling/ScrollStateCallback.h" |
+#include "platform/heap/Handle.h" |
+#include "platform/scroll/ScrollTypes.h" |
+ |
+namespace blink { |
+ |
+class Document; |
+class FloatSize; |
+class FrameHost; |
+class Element; |
+class ScrollableArea; |
+class ScrollState; |
+ |
+class ViewportScrollCallback : public ScrollStateCallback { |
+public: |
+ ViewportScrollCallback(Document&, FrameHost&); |
+ ~ViewportScrollCallback(); |
+ |
+ void handleEvent(ScrollState*) override; |
+ |
+ DECLARE_VIRTUAL_TRACE(); |
+ |
+private: |
+ bool shouldScrollTopControls(const FloatSize&, ScrollGranularity) const; |
+ ScrollableArea* getRootFrameViewport() const; |
+ |
+ WeakMember<Document> m_document; |
+ WeakMember<FrameHost> m_frameHost; |
+ |
+}; |
+ |
+} // namespace blink |
+ |
+#endif // ViewportScrollCallback_h |