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

Side by Side Diff: third_party/WebKit/Source/core/dom/ElementVisibilityObserver.h

Issue 2144073002: Using WeakMember<Element> in ElementVisibilityObserver (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef ElementVisibilityObserver_h 5 #ifndef ElementVisibilityObserver_h
6 #define ElementVisibilityObserver_h 6 #define ElementVisibilityObserver_h
7 7
8 #include "core/dom/IntersectionObserver.h" 8 #include "core/dom/IntersectionObserver.h"
9 #include "platform/heap/Heap.h" 9 #include "platform/heap/Heap.h"
10 #include "platform/heap/Member.h" 10 #include "platform/heap/Member.h"
(...skipping 22 matching lines...) Expand all
33 void start(); 33 void start();
34 void stop(); 34 void stop();
35 35
36 DECLARE_VIRTUAL_TRACE(); 36 DECLARE_VIRTUAL_TRACE();
37 37
38 private: 38 private:
39 class ElementVisibilityCallback; 39 class ElementVisibilityCallback;
40 40
41 void onVisibilityChanged(const HeapVector<Member<IntersectionObserverEntry>> &); 41 void onVisibilityChanged(const HeapVector<Member<IntersectionObserverEntry>> &);
42 42
43 Member<Element> m_element; 43 WeakMember<Element> m_element;
44 Member<IntersectionObserver> m_intersectionObserver; 44 Member<IntersectionObserver> m_intersectionObserver;
45 std::unique_ptr<VisibilityCallback> m_callback; 45 std::unique_ptr<VisibilityCallback> m_callback;
46 }; 46 };
47 47
48 } // namespace blink 48 } // namespace blink
49 49
50 #endif // ElementVisibilityObserver_h 50 #endif // ElementVisibilityObserver_h
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698