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

Side by Side Diff: Source/core/css/MediaQueryList.h

Issue 189543014: Ensure proper finalization of garbage-collected types. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: finalize HashTable Created 6 years, 9 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 | Annotate | Revision Log
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies) 2 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies)
3 * 3 *
4 * This library is free software; you can redistribute it and/or 4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Library General Public 5 * modify it under the terms of the GNU Library General Public
6 * License as published by the Free Software Foundation; either 6 * License as published by the Free Software Foundation; either
7 * version 2 of the License, or (at your option) any later version. 7 * version 2 of the License, or (at your option) any later version.
8 * 8 *
9 * This library is distributed in the hope that it will be useful, 9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
(...skipping 22 matching lines...) Expand all
33 class MediaQuerySet; 33 class MediaQuerySet;
34 34
35 // MediaQueryList interface is specified at http://dev.w3.org/csswg/cssom-view/# the-mediaquerylist-interface 35 // MediaQueryList interface is specified at http://dev.w3.org/csswg/cssom-view/# the-mediaquerylist-interface
36 // The objects of this class are returned by window.matchMedia. They may be used to 36 // The objects of this class are returned by window.matchMedia. They may be used to
37 // retrieve the current value of the given media query and to add/remove listene rs that 37 // retrieve the current value of the given media query and to add/remove listene rs that
38 // will be called whenever the value of the query changes. 38 // will be called whenever the value of the query changes.
39 39
40 class MediaQueryList FINAL : public RefCountedWillBeGarbageCollected<MediaQueryL ist> { 40 class MediaQueryList FINAL : public RefCountedWillBeGarbageCollected<MediaQueryL ist> {
41 public: 41 public:
42 static PassRefPtrWillBeRawPtr<MediaQueryList> create(PassRefPtrWillBeRawPtr< MediaQueryMatcher>, PassRefPtrWillBeRawPtr<MediaQuerySet>, bool); 42 static PassRefPtrWillBeRawPtr<MediaQueryList> create(PassRefPtrWillBeRawPtr< MediaQueryMatcher>, PassRefPtrWillBeRawPtr<MediaQuerySet>, bool);
43 #if !ENABLE(OILPAN)
43 ~MediaQueryList(); 44 ~MediaQueryList();
45 #endif
44 String media() const; 46 String media() const;
45 bool matches(); 47 bool matches();
46 48
47 void addListener(PassRefPtrWillBeRawPtr<MediaQueryListListener>); 49 void addListener(PassRefPtrWillBeRawPtr<MediaQueryListListener>);
48 void removeListener(PassRefPtrWillBeRawPtr<MediaQueryListListener>); 50 void removeListener(PassRefPtrWillBeRawPtr<MediaQueryListListener>);
49 51
50 void evaluate(MediaQueryEvaluator*, bool& notificationNeeded); 52 void evaluate(MediaQueryEvaluator*, bool& notificationNeeded);
51 53
52 void trace(Visitor*); 54 void trace(Visitor*);
53 55
54 private: 56 private:
55 MediaQueryList(PassRefPtrWillBeRawPtr<MediaQueryMatcher>, PassRefPtrWillBeRa wPtr<MediaQuerySet>, bool matches); 57 MediaQueryList(PassRefPtrWillBeRawPtr<MediaQueryMatcher>, PassRefPtrWillBeRa wPtr<MediaQuerySet>, bool matches);
56 void setMatches(bool); 58 void setMatches(bool);
57 59
58 RefPtrWillBeMember<MediaQueryMatcher> m_matcher; 60 RefPtrWillBeMember<MediaQueryMatcher> m_matcher;
59 RefPtrWillBeMember<MediaQuerySet> m_media; 61 RefPtrWillBeMember<MediaQuerySet> m_media;
60 unsigned m_evaluationRound; // Indicates if the query has been evaluated aft er the last style selector change. 62 unsigned m_evaluationRound; // Indicates if the query has been evaluated aft er the last style selector change.
61 unsigned m_changeRound; // Used to know if the query has changed in the last style selector change. 63 unsigned m_changeRound; // Used to know if the query has changed in the last style selector change.
62 bool m_matches; 64 bool m_matches;
63 }; 65 };
64 66
65 } 67 }
66 68
67 #endif // MediaQueryList_h 69 #endif // MediaQueryList_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698