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

Unified Diff: Source/core/page/scrolling/ScrollStateCallback.cpp

Issue 1057603002: Expose scroll customization for touch to JS (behind REF). (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Address haraken's comments. Created 5 years, 6 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: Source/core/page/scrolling/ScrollStateCallback.cpp
diff --git a/Source/core/page/scrolling/ScrollStateCallback.cpp b/Source/core/page/scrolling/ScrollStateCallback.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..f2490fb98ab19652e1cbae0cdd7ade403931e80b
--- /dev/null
+++ b/Source/core/page/scrolling/ScrollStateCallback.cpp
@@ -0,0 +1,25 @@
+// 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.
+
+#include "config.h"
+#include "core/page/scrolling/ScrollStateCallback.h"
+
+#include "bindings/core/v8/V8Element.h"
+#include "bindings/core/v8/V8ScrollState.h"
+
+namespace blink {
+
+ScrollStateCallback::ScrollStateCallback()
+ : m_callbackType(CallbackType::UNSET)
+{
+}
+
+void ScrollStateCallback::handleEventForElement(Element& targetElement, ScrollState* scrollState)
+{
+ m_targetElement = &targetElement;
haraken 2015/06/30 07:08:30 Instead of storing m_targetElement to ScrollStateC
+ handleEvent(scrollState);
+ m_targetElement = nullptr;
+}
+
+} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698