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

Side by Side Diff: Source/core/frame/ViewportChangeNotifier.h

Issue 369423002: Have srcset respond to viewport changes (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Oilpan comments Created 6 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
OLDNEW
(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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698