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

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

Issue 478243002: bindings: Adds virtual ScriptWrappable::wrap method. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Synced and sent out to the code review. Created 6 years, 3 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 | Annotate | Revision Log
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 23 matching lines...) Expand all
34 class MediaQueryEvaluator; 34 class MediaQueryEvaluator;
35 class MediaQueryMatcher; 35 class MediaQueryMatcher;
36 class MediaQuerySet; 36 class MediaQuerySet;
37 37
38 // MediaQueryList interface is specified at http://dev.w3.org/csswg/cssom-view/# the-mediaquerylist-interface 38 // MediaQueryList interface is specified at http://dev.w3.org/csswg/cssom-view/# the-mediaquerylist-interface
39 // The objects of this class are returned by window.matchMedia. They may be used to 39 // The objects of this class are returned by window.matchMedia. They may be used to
40 // retrieve the current value of the given media query and to add/remove listene rs that 40 // retrieve the current value of the given media query and to add/remove listene rs that
41 // will be called whenever the value of the query changes. 41 // will be called whenever the value of the query changes.
42 42
43 class MediaQueryList FINAL : public RefCountedWillBeGarbageCollectedFinalized<Me diaQueryList>, public ActiveDOMObject, public ScriptWrappable { 43 class MediaQueryList FINAL : public RefCountedWillBeGarbageCollectedFinalized<Me diaQueryList>, public ActiveDOMObject, public ScriptWrappable {
44 DEFINE_WRAPPERTYPEINFO();
44 public: 45 public:
45 static PassRefPtrWillBeRawPtr<MediaQueryList> create(ExecutionContext*, Pass RefPtrWillBeRawPtr<MediaQueryMatcher>, PassRefPtrWillBeRawPtr<MediaQuerySet>); 46 static PassRefPtrWillBeRawPtr<MediaQueryList> create(ExecutionContext*, Pass RefPtrWillBeRawPtr<MediaQueryMatcher>, PassRefPtrWillBeRawPtr<MediaQuerySet>);
46 virtual ~MediaQueryList(); 47 virtual ~MediaQueryList();
47 48
48 String media() const; 49 String media() const;
49 bool matches(); 50 bool matches();
50 51
51 void addListener(PassRefPtrWillBeRawPtr<MediaQueryListListener>); 52 void addListener(PassRefPtrWillBeRawPtr<MediaQueryListListener>);
52 void removeListener(PassRefPtrWillBeRawPtr<MediaQueryListListener>); 53 void removeListener(PassRefPtrWillBeRawPtr<MediaQueryListListener>);
53 54
(...skipping 11 matching lines...) Expand all
65 bool updateMatches(); 66 bool updateMatches();
66 67
67 RefPtrWillBeMember<MediaQueryMatcher> m_matcher; 68 RefPtrWillBeMember<MediaQueryMatcher> m_matcher;
68 RefPtrWillBeMember<MediaQuerySet> m_media; 69 RefPtrWillBeMember<MediaQuerySet> m_media;
69 typedef WillBeHeapListHashSet<RefPtrWillBeMember<MediaQueryListListener> > L istenerList; 70 typedef WillBeHeapListHashSet<RefPtrWillBeMember<MediaQueryListListener> > L istenerList;
70 ListenerList m_listeners; 71 ListenerList m_listeners;
71 bool m_matchesDirty; 72 bool m_matchesDirty;
72 bool m_matches; 73 bool m_matches;
73 }; 74 };
74 75
75 } 76 } // namespace blink
76 77
77 #endif // MediaQueryList_h 78 #endif // MediaQueryList_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698