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

Unified Diff: third_party/WebKit/Source/core/page/scrolling/ViewportScrollCallback.h

Issue 1840113005: Move viewport actions into an ApplyScroll callback. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase over my own changes Created 4 years, 8 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 side-by-side diff with in-line comments
Download patch
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

Powered by Google App Engine
This is Rietveld 408576698