Chromium Code Reviews| 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 19 matching lines...) Expand all Loading... | |
| 30 #include "core/frame/LocalFrame.h" | 30 #include "core/frame/LocalFrame.h" |
| 31 | 31 |
| 32 namespace WebCore { | 32 namespace WebCore { |
| 33 | 33 |
| 34 MediaQueryMatcher::Listener::Listener(PassRefPtrWillBeRawPtr<MediaQueryListListe ner> listener, PassRefPtrWillBeRawPtr<MediaQueryList> query) | 34 MediaQueryMatcher::Listener::Listener(PassRefPtrWillBeRawPtr<MediaQueryListListe ner> listener, PassRefPtrWillBeRawPtr<MediaQueryList> query) |
| 35 : m_listener(listener) | 35 : m_listener(listener) |
| 36 , m_query(query) | 36 , m_query(query) |
| 37 { | 37 { |
| 38 } | 38 } |
| 39 | 39 |
| 40 MediaQueryMatcher::Listener::~Listener() | |
|
haraken
2014/03/25 14:21:34
Can we use DEFINE_EMPTY_DESTRUCTOR_WILL_BE_REMOVED
zerny-chromium
2014/03/26 07:40:37
We don't need to here because the destructor is no
| |
| 41 { | |
| 42 } | |
| 43 | |
| 44 void MediaQueryMatcher::Listener::evaluate(ScriptState* state, MediaQueryEvaluat or* evaluator) | 40 void MediaQueryMatcher::Listener::evaluate(ScriptState* state, MediaQueryEvaluat or* evaluator) |
| 45 { | 41 { |
| 46 bool notify; | 42 bool notify; |
| 47 m_query->evaluate(evaluator, notify); | 43 m_query->evaluate(evaluator, notify); |
| 48 if (notify) | 44 if (notify) |
| 49 m_listener->queryChanged(state, m_query.get()); | 45 m_listener->queryChanged(state, m_query.get()); |
| 50 } | 46 } |
| 51 | 47 |
| 52 void MediaQueryMatcher::Listener::trace(Visitor* visitor) | 48 void MediaQueryMatcher::Listener::trace(Visitor* visitor) |
| 53 { | 49 { |
| (...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 160 void MediaQueryMatcher::trace(Visitor* visitor) | 156 void MediaQueryMatcher::trace(Visitor* visitor) |
| 161 { | 157 { |
| 162 // We don't support tracing of vectors of OwnPtrs (ie. Vector<OwnPtr<Listene r> >). | 158 // We don't support tracing of vectors of OwnPtrs (ie. Vector<OwnPtr<Listene r> >). |
| 163 // Since this is a transitional object we are just ifdef'ing it out when oil pan is not enabled. | 159 // Since this is a transitional object we are just ifdef'ing it out when oil pan is not enabled. |
| 164 #if ENABLE(OILPAN) | 160 #if ENABLE(OILPAN) |
| 165 visitor->trace(m_listeners); | 161 visitor->trace(m_listeners); |
| 166 #endif | 162 #endif |
| 167 } | 163 } |
| 168 | 164 |
| 169 } | 165 } |
| OLD | NEW |