Chromium Code Reviews| 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> { | |
| 13 public: | |
| 14 virtual void viewportChanged() = 0; | |
| 15 virtual ~ViewportChangeListener() { } | |
|
haraken
2014/07/11 06:10:21
You'll need to use DECLARE_EMPTY_VIRTUAL_DESTRUCTO
| |
| 16 }; | |
| 17 | |
| 18 class ViewportChangeNotifier { | |
|
haraken
2014/07/11 06:10:21
This should be:
class ViewportChangeNotifier : pu
| |
| 19 public: | |
| 20 static PassOwnPtrWillBeRawPtr<ViewportChangeNotifier> create(); | |
| 21 void addListener(PassRefPtrWillBeRawPtr<ViewportChangeListener>); | |
| 22 void removeListener(PassRefPtrWillBeRawPtr<ViewportChangeListener>); | |
| 23 void viewportChanged(); | |
| 24 | |
| 25 typedef WillBeHeapHashSet<RefPtrWillBeMember<ViewportChangeListener> > Liste nerContainer; | |
| 26 | |
| 27 private: | |
| 28 ViewportChangeNotifier() { }; | |
| 29 | |
| 30 ListenerContainer m_listeners; | |
|
haraken
2014/07/11 06:10:21
You need to add a trace() method and trace m_liste
| |
| 31 }; | |
| 32 | |
| 33 } // namespace | |
| 34 | |
| 35 #endif // MediaQueryBlockWatcher_h | |
| OLD | NEW |