| 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 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 59 void addDeprecatedListener(PassRefPtr<EventListener>); | 59 void addDeprecatedListener(PassRefPtr<EventListener>); |
| 60 void removeDeprecatedListener(PassRefPtr<EventListener>); | 60 void removeDeprecatedListener(PassRefPtr<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(PassRefPtr<MediaQueryListListener>); | 63 void addListener(PassRefPtr<MediaQueryListListener>); |
| 64 void removeListener(PassRefPtr<MediaQueryListListener>); | 64 void removeListener(PassRefPtr<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(Vector<RefPtr<MediaQueryListListener> >* listeners
ToNotify); | 67 bool mediaFeaturesChanged(Vector<RefPtr<MediaQueryListListener> >* listeners
ToNotify); |
| 68 | 68 |
| 69 void trace(Visitor*); | |
| 70 | |
| 71 // From ActiveDOMObject | 69 // From ActiveDOMObject |
| 72 virtual bool hasPendingActivity() const override; | 70 virtual bool hasPendingActivity() const override; |
| 73 virtual void stop() override; | 71 virtual void stop() override; |
| 74 | 72 |
| 75 virtual const AtomicString& interfaceName() const override; | 73 virtual const AtomicString& interfaceName() const override; |
| 76 virtual ExecutionContext* executionContext() const override; | 74 virtual ExecutionContext* executionContext() const override; |
| 77 | 75 |
| 78 private: | 76 private: |
| 79 MediaQueryList(ExecutionContext*, PassRefPtr<MediaQueryMatcher>, PassRefPtr<
MediaQuerySet>); | 77 MediaQueryList(ExecutionContext*, PassRefPtr<MediaQueryMatcher>, PassRefPtr<
MediaQuerySet>); |
| 80 | 78 |
| 81 bool updateMatches(); | 79 bool updateMatches(); |
| 82 | 80 |
| 83 RefPtr<MediaQueryMatcher> m_matcher; | 81 RefPtr<MediaQueryMatcher> m_matcher; |
| 84 RefPtr<MediaQuerySet> m_media; | 82 RefPtr<MediaQuerySet> m_media; |
| 85 typedef ListHashSet<RefPtr<MediaQueryListListener> > ListenerList; | 83 typedef ListHashSet<RefPtr<MediaQueryListListener> > ListenerList; |
| 86 ListenerList m_listeners; | 84 ListenerList m_listeners; |
| 87 bool m_matchesDirty; | 85 bool m_matchesDirty; |
| 88 bool m_matches; | 86 bool m_matches; |
| 89 }; | 87 }; |
| 90 | 88 |
| 91 } // namespace blink | 89 } // namespace blink |
| 92 | 90 |
| 93 #endif // MediaQueryList_h | 91 #endif // MediaQueryList_h |
| OLD | NEW |