OLD | NEW |
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 29 matching lines...) Expand all Loading... |
40 | 40 |
41 class MediaQueryMatcher FINAL : public RefCountedWillBeGarbageCollectedFinalized
<MediaQueryMatcher> { | 41 class MediaQueryMatcher FINAL : public RefCountedWillBeGarbageCollectedFinalized
<MediaQueryMatcher> { |
42 DECLARE_EMPTY_DESTRUCTOR_WILL_BE_REMOVED(MediaQueryMatcher) | 42 DECLARE_EMPTY_DESTRUCTOR_WILL_BE_REMOVED(MediaQueryMatcher) |
43 public: | 43 public: |
44 static PassRefPtrWillBeRawPtr<MediaQueryMatcher> create(Document&); | 44 static PassRefPtrWillBeRawPtr<MediaQueryMatcher> create(Document&); |
45 void documentDetached(); | 45 void documentDetached(); |
46 | 46 |
47 void addMediaQueryList(MediaQueryList*); | 47 void addMediaQueryList(MediaQueryList*); |
48 void removeMediaQueryList(MediaQueryList*); | 48 void removeMediaQueryList(MediaQueryList*); |
49 | 49 |
| 50 void addViewportListener(MediaQueryListListener*); |
| 51 void removeViewportListener(MediaQueryListListener*); |
| 52 |
50 PassRefPtrWillBeRawPtr<MediaQueryList> matchMedia(const String&); | 53 PassRefPtrWillBeRawPtr<MediaQueryList> matchMedia(const String&); |
51 | 54 |
52 void mediaFeaturesChanged(); | 55 void mediaFeaturesChanged(); |
| 56 void viewportChanged(); |
53 bool evaluate(const MediaQuerySet*); | 57 bool evaluate(const MediaQuerySet*); |
54 | 58 |
55 void trace(Visitor*); | 59 void trace(Visitor*); |
56 | 60 |
57 private: | 61 private: |
58 explicit MediaQueryMatcher(Document&); | 62 explicit MediaQueryMatcher(Document&); |
59 | 63 |
60 PassOwnPtr<MediaQueryEvaluator> createEvaluator() const; | 64 PassOwnPtr<MediaQueryEvaluator> createEvaluator() const; |
61 | 65 |
62 RawPtrWillBeMember<Document> m_document; | 66 RawPtrWillBeMember<Document> m_document; |
63 OwnPtr<MediaQueryEvaluator> m_evaluator; | 67 OwnPtr<MediaQueryEvaluator> m_evaluator; |
64 | 68 |
65 typedef WillBeHeapLinkedHashSet<RawPtrWillBeWeakMember<MediaQueryList> > Med
iaQueryListSet; | 69 typedef WillBeHeapLinkedHashSet<RawPtrWillBeWeakMember<MediaQueryList> > Med
iaQueryListSet; |
66 MediaQueryListSet m_mediaLists; | 70 MediaQueryListSet m_mediaLists; |
| 71 |
| 72 typedef WillBeHeapLinkedHashSet<RawPtrWillBeWeakMember<MediaQueryListListene
r> > ViewportListenerSet; |
| 73 ViewportListenerSet m_viewportListeners; |
67 }; | 74 }; |
68 | 75 |
69 } | 76 } |
70 | 77 |
71 #endif // MediaQueryMatcher_h | 78 #endif // MediaQueryMatcher_h |
OLD | NEW |