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

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: Change map value to WeakMember, remove Document hack. 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 Document;
16 class ScrollStateCallback;
17
18 class CORE_EXPORT ScrollCustomizationCallbacks : public GarbageCollected<ScrollC ustomizationCallbacks> {
19 WTF_MAKE_NONCOPYABLE(ScrollCustomizationCallbacks);
20
21 public:
22 ScrollCustomizationCallbacks() {}
23 void setDistributeScroll(Element*, ScrollStateCallback*);
24 ScrollStateCallback* getDistributeScroll(Element*);
25 void setApplyScroll(Element*, ScrollStateCallback*);
26 ScrollStateCallback* getApplyScroll(Element*);
27
28 DEFINE_INLINE_TRACE()
29 {
30 visitor->trace(m_applyScrollCallbacks);
31 visitor->trace(m_distributeScrollCallbacks);
32 };
33
34 void removeAllCallbacksForDocument(Document*);
haraken 2015/08/27 00:49:40 Can we remove this?
tdresser 2015/08/27 20:48:40 Done.
35
36 #if !ENABLE(OILPAN)
37 void removeCallbacksForElement(Element*);
38 #endif
39
40 private:
41 using ScrollStateCallbackList = HeapHashMap<RawPtrWillBeWeakMember<Element>, WeakMember<ScrollStateCallback>>;
42 ScrollStateCallbackList m_applyScrollCallbacks;
43 ScrollStateCallbackList m_distributeScrollCallbacks;
44 };
45
46 } // namespace blink
47
48 #endif // ScrollCustomizationCallbacks_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698