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

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: rebase and sign error in Vector 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
« no previous file with comments | « Source/core/css/MediaQueryList.cpp ('k') | Source/core/css/MediaQueryMatcher.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 MediaQueryListListener; 33 class MediaQueryListListener;
34 class MediaQueryEvaluator; 34 class MediaQueryEvaluator;
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 DECLARE_EMPTY_DESTRUCTOR_WILL_BE_REMOVED(MediaQueryMatcher);
43 public: 44 public:
44 static PassRefPtrWillBeRawPtr<MediaQueryMatcher> create(Document* document) { return adoptRefWillBeNoop(new MediaQueryMatcher(document)); } 45 static PassRefPtrWillBeRawPtr<MediaQueryMatcher> create(Document* document) { return adoptRefWillBeNoop(new MediaQueryMatcher(document)); }
45 ~MediaQueryMatcher();
46 void documentDestroyed(); 46 void documentDestroyed();
47 47
48 void addListener(PassRefPtrWillBeRawPtr<MediaQueryListListener>, PassRefPtrW illBeRawPtr<MediaQueryList>); 48 void addListener(PassRefPtrWillBeRawPtr<MediaQueryListListener>, PassRefPtrW illBeRawPtr<MediaQueryList>);
49 void removeListener(MediaQueryListListener*, MediaQueryList*); 49 void removeListener(MediaQueryListListener*, MediaQueryList*);
50 50
51 PassRefPtrWillBeRawPtr<MediaQueryList> matchMedia(const String&); 51 PassRefPtrWillBeRawPtr<MediaQueryList> matchMedia(const String&);
52 52
53 unsigned evaluationRound() const { return m_evaluationRound; } 53 unsigned evaluationRound() const { return m_evaluationRound; }
54 void styleResolverChanged(); 54 void styleResolverChanged();
55 bool evaluate(const MediaQuerySet*); 55 bool evaluate(const MediaQuerySet*);
(...skipping 26 matching lines...) Expand all
82 82
83 // This value is incremented at style selector changes. 83 // This value is incremented at style selector changes.
84 // It is used to avoid evaluating queries more then once and to make sure 84 // 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. 85 // that a media query result change is notified exactly once.
86 unsigned m_evaluationRound; 86 unsigned m_evaluationRound;
87 }; 87 };
88 88
89 } 89 }
90 90
91 #endif // MediaQueryMatcher_h 91 #endif // MediaQueryMatcher_h
OLDNEW
« no previous file with comments | « Source/core/css/MediaQueryList.cpp ('k') | Source/core/css/MediaQueryMatcher.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698