| 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 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 49 static PassRefPtrWillBeRawPtr<MediaQueryList> create(ExecutionContext*, Pass
RefPtrWillBeRawPtr<MediaQueryMatcher>, PassRefPtrWillBeRawPtr<MediaQuerySet>); | 49 static PassRefPtrWillBeRawPtr<MediaQueryList> create(ExecutionContext*, Pass
RefPtrWillBeRawPtr<MediaQueryMatcher>, PassRefPtrWillBeRawPtr<MediaQuerySet>); |
| 50 ~MediaQueryList() override; | 50 ~MediaQueryList() override; |
| 51 | 51 |
| 52 String media() const; | 52 String media() const; |
| 53 bool matches(); | 53 bool matches(); |
| 54 | 54 |
| 55 DEFINE_ATTRIBUTE_EVENT_LISTENER(change); | 55 DEFINE_ATTRIBUTE_EVENT_LISTENER(change); |
| 56 | 56 |
| 57 // These two functions are provided for compatibility with JS code | 57 // These two functions are provided for compatibility with JS code |
| 58 // written before the change listener became a DOM event. | 58 // written before the change listener became a DOM event. |
| 59 void addDeprecatedListener(PassRefPtr<EventListener>); | 59 void addDeprecatedListener(PassRefPtrWillBeRawPtr<EventListener>); |
| 60 void removeDeprecatedListener(PassRefPtr<EventListener>); | 60 void removeDeprecatedListener(PassRefPtrWillBeRawPtr<EventListener>); |
| 61 | 61 |
| 62 // C++ code can use these functions to listen to changes instead of having t
o use DOM event listeners. | 62 // C++ code can use these functions to listen to changes instead of having t
o use DOM event listeners. |
| 63 void addListener(PassRefPtrWillBeRawPtr<MediaQueryListListener>); | 63 void addListener(PassRefPtrWillBeRawPtr<MediaQueryListListener>); |
| 64 void removeListener(PassRefPtrWillBeRawPtr<MediaQueryListListener>); | 64 void removeListener(PassRefPtrWillBeRawPtr<MediaQueryListListener>); |
| 65 | 65 |
| 66 // Will return true if a DOM event should be scheduled. | 66 // Will return true if a DOM event should be scheduled. |
| 67 bool mediaFeaturesChanged(WillBeHeapVector<RefPtrWillBeMember<MediaQueryList
Listener>>* listenersToNotify); | 67 bool mediaFeaturesChanged(WillBeHeapVector<RefPtrWillBeMember<MediaQueryList
Listener>>* listenersToNotify); |
| 68 | 68 |
| 69 DECLARE_VIRTUAL_TRACE(); | 69 DECLARE_VIRTUAL_TRACE(); |
| 70 | 70 |
| (...skipping 13 matching lines...) Expand all Loading... |
| 84 RefPtrWillBeMember<MediaQuerySet> m_media; | 84 RefPtrWillBeMember<MediaQuerySet> m_media; |
| 85 typedef WillBeHeapListHashSet<RefPtrWillBeMember<MediaQueryListListener>> Li
stenerList; | 85 typedef WillBeHeapListHashSet<RefPtrWillBeMember<MediaQueryListListener>> Li
stenerList; |
| 86 ListenerList m_listeners; | 86 ListenerList m_listeners; |
| 87 bool m_matchesDirty; | 87 bool m_matchesDirty; |
| 88 bool m_matches; | 88 bool m_matches; |
| 89 }; | 89 }; |
| 90 | 90 |
| 91 } // namespace blink | 91 } // namespace blink |
| 92 | 92 |
| 93 #endif // MediaQueryList_h | 93 #endif // MediaQueryList_h |
| OLD | NEW |