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

Side by Side Diff: Source/core/page/scrolling/ScrollCustomizationCallbacks.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 ScrollCustomizationCallbacks_h
6 #define ScrollCustomizationCallbacks_h
7
8 #include "core/CoreExport.h"
9 #include "core/dom/Element.h"
10 #include "platform/heap/Handle.h"
11 #include "wtf/HashMap.h"
12
13 namespace blink {
14
15 class ScrollStateCallback;
16
17 class CORE_EXPORT ScrollCustomizationCallbacks : public GarbageCollected<ScrollC ustomizationCallbacks> {
18 WTF_MAKE_NONCOPYABLE(ScrollCustomizationCallbacks);
19
20 public:
21 ScrollCustomizationCallbacks() {}
22 void setDistributeScroll(Element*, ScrollStateCallback*);
23 ScrollStateCallback* getDistributeScroll(Element*);
24 void setApplyScroll(Element*, ScrollStateCallback*);
25 ScrollStateCallback* getApplyScroll(Element*);
26
27 DEFINE_INLINE_TRACE()
28 {
29 visitor->trace(m_applyScrollCallbacks);
30 visitor->trace(m_distributeScrollCallbacks);
31 };
32
33 #if !ENABLE(OILPAN)
34 void removeCallbacksForElement(Element*);
35 #endif
36
37 private:
38 using ScrollStateCallbackList = HeapHashMap<RawPtrWillBeWeakMember<Element>, Member<ScrollStateCallback>>;
39 ScrollStateCallbackList m_applyScrollCallbacks;
40 ScrollStateCallbackList m_distributeScrollCallbacks;
41 };
42
43 } // namespace blink
44
45 #endif // ScrollCustomizationCallbacks_h
OLDNEW
« no previous file with comments | « Source/core/input/EventHandler.cpp ('k') | Source/core/page/scrolling/ScrollCustomizationCallbacks.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698