Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(67)

Side by Side Diff: Source/core/css/MediaQueryListListener.h

Issue 287163010: Notify <picture> elements when a media query (potentially) changes (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: forgot to adjust test after moving Created 6 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 46
47 virtual void call(); 47 virtual void call();
48 48
49 // Used to keep the MediaQueryList alive and registered with the MediaQueryM atcher 49 // Used to keep the MediaQueryList alive and registered with the MediaQueryM atcher
50 // as long as the listener exists. 50 // as long as the listener exists.
51 void setMediaQueryList(MediaQueryList* query) { m_query = query; } 51 void setMediaQueryList(MediaQueryList* query) { m_query = query; }
52 void clearMediaQueryList() { m_query = nullptr; } 52 void clearMediaQueryList() { m_query = nullptr; }
53 53
54 bool operator==(const MediaQueryListListener& other) const { return m_functi on.isNull() ? this == &other : m_function == other.m_function; } 54 bool operator==(const MediaQueryListListener& other) const { return m_functi on.isNull() ? this == &other : m_function == other.m_function; }
55 55
56 void trace(Visitor* visitor) { visitor->trace(m_query); } 56 virtual void trace(Visitor* visitor) { visitor->trace(m_query); }
esprehn 2014/07/02 22:40:11 OVERRIDE
57 57
58 protected: 58 protected:
59 MediaQueryListListener(); 59 MediaQueryListListener();
60 60
61 RefPtrWillBeMember<MediaQueryList> m_query; 61 RefPtrWillBeMember<MediaQueryList> m_query;
62 62
63 private: 63 private:
64 MediaQueryListListener(ScriptState*, const ScriptValue&); 64 MediaQueryListListener(ScriptState*, const ScriptValue&);
65 65
66 RefPtr<ScriptState> m_scriptState; 66 RefPtr<ScriptState> m_scriptState;
67 ScriptValue m_function; 67 ScriptValue m_function;
68 }; 68 };
69 69
70 } 70 }
71 71
72 #endif // MediaQueryListListener_h 72 #endif // MediaQueryListListener_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698