OLD | NEW |
---|---|
(Empty) | |
1 // Copyright 2014 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 ViewportChangeNotifier_h | |
6 #define ViewportChangeNotifier_h | |
7 | |
8 #include "platform/heap/Handle.h" | |
9 | |
10 namespace WebCore { | |
11 | |
12 class ViewportChangeListener : public RefCountedWillBeGarbageCollected<ViewportC hangeListener> { | |
esprehn
2014/07/14 08:39:49
This is just a duplicate of what the mediaQuery th
| |
13 public: | |
14 virtual void viewportChanged() = 0; | |
sof
2014/07/14 20:38:08
All classes that directly derive from a garbage co
| |
15 DECLARE_EMPTY_VIRTUAL_DESTRUCTOR_WILL_BE_REMOVED(ViewportChangeListener); | |
16 }; | |
17 | |
18 class ViewportChangeNotifier : public NoBaseWillBeGarbageCollected<ViewportChang eNotifier> { | |
19 public: | |
20 static PassOwnPtrWillBeRawPtr<ViewportChangeNotifier> create(); | |
21 void addListener(ViewportChangeListener*); | |
22 void removeListener(ViewportChangeListener*); | |
23 void viewportChanged(); | |
24 | |
25 typedef WillBeHeapHashSet<RawPtrWillBeWeakMember<ViewportChangeListener> > L istenerContainer; | |
26 | |
27 private: | |
28 ViewportChangeNotifier() { }; | |
sof
2014/07/14 20:38:09
nit: redundant semicolon.
| |
29 void trace(Visitor*); | |
sof
2014/07/14 20:38:08
Make this a public method.
| |
30 | |
31 ListenerContainer m_listeners; | |
32 }; | |
33 | |
34 } // namespace | |
35 | |
36 #endif // MediaQueryBlockWatcher_h | |
OLD | NEW |