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 23 matching lines...) Expand all Loading... |
34 class MediaQueryListListener; | 34 class MediaQueryListListener; |
35 class MediaQueryMatcher; | 35 class MediaQueryMatcher; |
36 class MediaQuerySet; | 36 class MediaQuerySet; |
37 | 37 |
38 // MediaQueryList interface is specified at | 38 // MediaQueryList interface is specified at |
39 // http://dev.w3.org/csswg/cssom-view/#the-mediaquerylist-interface | 39 // http://dev.w3.org/csswg/cssom-view/#the-mediaquerylist-interface |
40 // The objects of this class are returned by window.matchMedia. They may be used | 40 // The objects of this class are returned by window.matchMedia. They may be used |
41 // to retrieve the current value of the given media query and to add/remove | 41 // to retrieve the current value of the given media query and to add/remove |
42 // listeners that will be called whenever the value of the query changes. | 42 // listeners that will be called whenever the value of the query changes. |
43 | 43 |
44 class CORE_EXPORT MediaQueryList final : public EventTargetWithInlineData, | 44 class CORE_EXPORT MediaQueryList final |
45 public ActiveScriptWrappable, | 45 : public EventTargetWithInlineData, |
46 public SuspendableObject { | 46 public ActiveScriptWrappable<MediaQueryList>, |
| 47 public SuspendableObject { |
47 DEFINE_WRAPPERTYPEINFO(); | 48 DEFINE_WRAPPERTYPEINFO(); |
48 USING_GARBAGE_COLLECTED_MIXIN(MediaQueryList); | 49 USING_GARBAGE_COLLECTED_MIXIN(MediaQueryList); |
49 WTF_MAKE_NONCOPYABLE(MediaQueryList); | 50 WTF_MAKE_NONCOPYABLE(MediaQueryList); |
50 | 51 |
51 public: | 52 public: |
52 static MediaQueryList* create(ExecutionContext*, | 53 static MediaQueryList* create(ExecutionContext*, |
53 MediaQueryMatcher*, | 54 MediaQueryMatcher*, |
54 MediaQuerySet*); | 55 MediaQuerySet*); |
55 ~MediaQueryList() override; | 56 ~MediaQueryList() override; |
56 | 57 |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
93 Member<MediaQuerySet> m_media; | 94 Member<MediaQuerySet> m_media; |
94 using ListenerList = HeapListHashSet<Member<MediaQueryListListener>>; | 95 using ListenerList = HeapListHashSet<Member<MediaQueryListListener>>; |
95 ListenerList m_listeners; | 96 ListenerList m_listeners; |
96 bool m_matchesDirty; | 97 bool m_matchesDirty; |
97 bool m_matches; | 98 bool m_matches; |
98 }; | 99 }; |
99 | 100 |
100 } // namespace blink | 101 } // namespace blink |
101 | 102 |
102 #endif // MediaQueryList_h | 103 #endif // MediaQueryList_h |
OLD | NEW |