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

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

Issue 1583173002: Add virtual destructors to IntersectionObserverCallback (Closed) Base URL: https://chromium.googlesource.com/chromium/src@master
Patch Set: Created 4 years, 11 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 | third_party/WebKit/Source/core/dom/IntersectionObservation.cpp » ('j') | 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 IntersectionObservation_h 5 #ifndef IntersectionObservation_h
6 #define IntersectionObservation_h 6 #define IntersectionObservation_h
7 7
8 #include "platform/geometry/LayoutRect.h" 8 #include "platform/geometry/LayoutRect.h"
9 #include "platform/heap/Handle.h" 9 #include "platform/heap/Handle.h"
10 10
11 namespace blink { 11 namespace blink {
12 12
13 class Element; 13 class Element;
14 class IntersectionObserver; 14 class IntersectionObserver;
15 class Node; 15 class Node;
16 16
17 class IntersectionObservation : public GarbageCollectedFinalized<IntersectionObs ervation> { 17 class IntersectionObservation : public GarbageCollectedFinalized<IntersectionObs ervation> {
18 public: 18 public:
19 IntersectionObservation(IntersectionObserver&, Element&, bool shouldReportRo otBounds); 19 IntersectionObservation(IntersectionObserver&, Element&, bool shouldReportRo otBounds);
20 virtual ~IntersectionObservation();
dcheng 2016/01/14 07:06:09 No virtual needed here and on IntersectionObserver
sof 2016/01/14 07:13:09 Adding a TODO above this class decl, like TODO(O
haraken 2016/01/14 07:23:44 Yeah, makes sense. We considered to introduce Garb
szager1 2016/01/14 07:24:37 Done.
szager1 2016/01/14 07:24:37 Done.
20 21
21 struct IntersectionGeometry { 22 struct IntersectionGeometry {
22 LayoutRect targetRect; 23 LayoutRect targetRect;
23 LayoutRect intersectionRect; 24 LayoutRect intersectionRect;
24 LayoutRect rootRect; 25 LayoutRect rootRect;
25 }; 26 };
26 27
27 IntersectionObserver& observer() const { return *m_observer; } 28 IntersectionObserver& observer() const { return *m_observer; }
28 Element* target() const; 29 Element* target() const;
29 bool isActive() const { return m_active; } 30 bool isActive() const { return m_active; }
(...skipping 21 matching lines...) Expand all
51 WeakPtrWillBeWeakMember<Node> m_target; 52 WeakPtrWillBeWeakMember<Node> m_target;
52 53
53 unsigned m_active : 1; 54 unsigned m_active : 1;
54 unsigned m_shouldReportRootBounds : 1; 55 unsigned m_shouldReportRootBounds : 1;
55 unsigned m_lastThresholdIndex : 30; 56 unsigned m_lastThresholdIndex : 30;
56 }; 57 };
57 58
58 } // namespace blink 59 } // namespace blink
59 60
60 #endif // IntersectionObservation_h 61 #endif // IntersectionObservation_h
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/dom/IntersectionObservation.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698