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

Side by Side Diff: third_party/WebKit/Source/core/observer/ResizeObservation.h

Issue 2005593002: Initial ResizeObserver implementation (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Observe content box, not clientWidth Created 4 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 unified diff | Download patch
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef ResizeObservation_h
6 #define ResizeObservation_h
7
8 #include "core/observer/ResizeObserverEntry.h"
9 #include "platform/geometry/LayoutSize.h"
10 #include "platform/heap/Handle.h"
11
12 namespace blink {
13
14 class Element;
15 class ResizeObserver;
16
17 // ResizeObservation represents an element that is being observed.
18 class ResizeObservation : public GarbageCollectedFinalized<ResizeObservation> {
szager1 2016/06/02 20:52:41 No Finalized, no destructor; see preceding comment
atotic1 2016/06/08 18:59:21 Done.
19
szager1 2016/06/02 20:52:41 Still too many blank lines.
atotic1 2016/06/08 18:59:21 Done.
20 public:
21 ResizeObservation(Element* target, ResizeObserver*);
22
23 virtual ~ResizeObservation() {};
24
25 // True if target was resized since last broadcast
26 bool hasResized() const;
27
28 Element* target() const { return m_target; }
29
30 LayoutSize broadcastSize() const { return m_broadcastSize; }
31
32 void setBroadcastSize(const LayoutSize& size) { m_broadcastSize = size; }
33
34 DECLARE_TRACE();
35
36 private:
37
38 WeakMember<Element> m_target;
39 Member<ResizeObserver> m_observer; // Used for GC only.
szager1 2016/06/02 20:52:41 // This member is unused; its purpose is to mainta
atotic1 2016/06/08 18:59:21 Done.
40
41 LayoutSize m_broadcastSize;
42 };
43
44
45
46 } // namespace blink
47
48 #endif // ResizeObservation_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698