| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef MediaQueryListEvent_h | 5 #ifndef MediaQueryListEvent_h |
| 6 #define MediaQueryListEvent_h | 6 #define MediaQueryListEvent_h |
| 7 | 7 |
| 8 #include "core/css/MediaQueryList.h" | 8 #include "core/css/MediaQueryList.h" |
| 9 #include "core/css/MediaQueryListEventInit.h" | 9 #include "core/css/MediaQueryListEventInit.h" |
| 10 #include "core/events/Event.h" | 10 #include "core/events/Event.h" |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 58 | 58 |
| 59 MediaQueryListEvent(const AtomicString& event_type, | 59 MediaQueryListEvent(const AtomicString& event_type, |
| 60 const MediaQueryListEventInit& initializer) | 60 const MediaQueryListEventInit& initializer) |
| 61 : Event(event_type, initializer), matches_(false) { | 61 : Event(event_type, initializer), matches_(false) { |
| 62 if (initializer.hasMedia()) | 62 if (initializer.hasMedia()) |
| 63 media_ = initializer.media(); | 63 media_ = initializer.media(); |
| 64 if (initializer.hasMatches()) | 64 if (initializer.hasMatches()) |
| 65 matches_ = initializer.matches(); | 65 matches_ = initializer.matches(); |
| 66 } | 66 } |
| 67 | 67 |
| 68 // We have m_media/m_matches for JS-created events; we use m_mediaQueryList | 68 // We have media_/matches_ for JS-created events; we use media_query_list_ |
| 69 // for events that blink generates. | 69 // for events that blink generates. |
| 70 Member<MediaQueryList> media_query_list_; | 70 Member<MediaQueryList> media_query_list_; |
| 71 String media_; | 71 String media_; |
| 72 bool matches_; | 72 bool matches_; |
| 73 }; | 73 }; |
| 74 | 74 |
| 75 } // namespace blink | 75 } // namespace blink |
| 76 | 76 |
| 77 #endif // MediaQueryListEvent_h | 77 #endif // MediaQueryListEvent_h |
| OLD | NEW |