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

Side by Side Diff: Source/core/css/MediaQueryMatcher.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 24 matching lines...) Expand all
35 class MediaQuerySet; 35 class MediaQuerySet;
36 36
37 // MediaQueryMatcher class is responsible for keeping a vector of pairs 37 // MediaQueryMatcher class is responsible for keeping a vector of pairs
38 // MediaQueryList x MediaQueryListListener. It is responsible for evaluating the queries 38 // MediaQueryList x MediaQueryListListener. It is responsible for evaluating the queries
39 // whenever it is needed and to call the listeners if the corresponding query ha s changed. 39 // whenever it is needed and to call the listeners if the corresponding query ha s changed.
40 // The listeners must be called in the very same order in which they have been a dded. 40 // The listeners must be called in the very same order in which they have been a dded.
41 41
42 class MediaQueryMatcher FINAL : public RefCountedWillBeGarbageCollected<MediaQue ryMatcher> { 42 class MediaQueryMatcher FINAL : public RefCountedWillBeGarbageCollected<MediaQue ryMatcher> {
43 public: 43 public:
44 static PassRefPtrWillBeRawPtr<MediaQueryMatcher> create(Document* document) { return adoptRefWillBeNoop(new MediaQueryMatcher(document)); } 44 static PassRefPtrWillBeRawPtr<MediaQueryMatcher> create(Document* document) { return adoptRefWillBeNoop(new MediaQueryMatcher(document)); }
45 #if !ENABLE(OILPAN)
45 ~MediaQueryMatcher(); 46 ~MediaQueryMatcher();
47 #endif
46 void documentDestroyed(); 48 void documentDestroyed();
47 49
48 void addListener(PassRefPtrWillBeRawPtr<MediaQueryListListener>, PassRefPtrW illBeRawPtr<MediaQueryList>); 50 void addListener(PassRefPtrWillBeRawPtr<MediaQueryListListener>, PassRefPtrW illBeRawPtr<MediaQueryList>);
49 void removeListener(MediaQueryListListener*, MediaQueryList*); 51 void removeListener(MediaQueryListListener*, MediaQueryList*);
50 52
51 PassRefPtrWillBeRawPtr<MediaQueryList> matchMedia(const String&); 53 PassRefPtrWillBeRawPtr<MediaQueryList> matchMedia(const String&);
52 54
53 unsigned evaluationRound() const { return m_evaluationRound; } 55 unsigned evaluationRound() const { return m_evaluationRound; }
54 void styleResolverChanged(); 56 void styleResolverChanged();
55 bool evaluate(const MediaQuerySet*); 57 bool evaluate(const MediaQuerySet*);
(...skipping 26 matching lines...) Expand all
82 84
83 // This value is incremented at style selector changes. 85 // This value is incremented at style selector changes.
84 // It is used to avoid evaluating queries more then once and to make sure 86 // It is used to avoid evaluating queries more then once and to make sure
85 // that a media query result change is notified exactly once. 87 // that a media query result change is notified exactly once.
86 unsigned m_evaluationRound; 88 unsigned m_evaluationRound;
87 }; 89 };
88 90
89 } 91 }
90 92
91 #endif // MediaQueryMatcher_h 93 #endif // MediaQueryMatcher_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698