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

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. 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
« no previous file with comments | « Source/core/css/MediaList.h ('k') | Source/core/css/MediaQueryListEvent.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 26 matching lines...) Expand all
37 class MediaQueryMatcher; 37 class MediaQueryMatcher;
38 class MediaQuerySet; 38 class MediaQuerySet;
39 39
40 // MediaQueryList interface is specified at http://dev.w3.org/csswg/cssom-view/# the-mediaquerylist-interface 40 // MediaQueryList interface is specified at http://dev.w3.org/csswg/cssom-view/# the-mediaquerylist-interface
41 // The objects of this class are returned by window.matchMedia. They may be used to 41 // The objects of this class are returned by window.matchMedia. They may be used to
42 // retrieve the current value of the given media query and to add/remove listene rs that 42 // retrieve the current value of the given media query and to add/remove listene rs that
43 // will be called whenever the value of the query changes. 43 // will be called whenever the value of the query changes.
44 44
45 class MediaQueryList FINAL : public RefCountedWillBeGarbageCollectedFinalized<Me diaQueryList>, public EventTargetWithInlineData, public ActiveDOMObject { 45 class MediaQueryList FINAL : public RefCountedWillBeGarbageCollectedFinalized<Me diaQueryList>, public EventTargetWithInlineData, public ActiveDOMObject {
46 DEFINE_EVENT_TARGET_REFCOUNTING_WILL_BE_REMOVED(RefCounted<MediaQueryList>); 46 DEFINE_EVENT_TARGET_REFCOUNTING_WILL_BE_REMOVED(RefCounted<MediaQueryList>);
47 DEFINE_WRAPPERTYPEINFO();
47 WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(MediaQueryList); 48 WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(MediaQueryList);
48 public: 49 public:
49 static PassRefPtrWillBeRawPtr<MediaQueryList> create(ExecutionContext*, Pass RefPtrWillBeRawPtr<MediaQueryMatcher>, PassRefPtrWillBeRawPtr<MediaQuerySet>); 50 static PassRefPtrWillBeRawPtr<MediaQueryList> create(ExecutionContext*, Pass RefPtrWillBeRawPtr<MediaQueryMatcher>, PassRefPtrWillBeRawPtr<MediaQuerySet>);
50 virtual ~MediaQueryList(); 51 virtual ~MediaQueryList();
51 52
52 String media() const; 53 String media() const;
53 bool matches(); 54 bool matches();
54 55
55 DEFINE_ATTRIBUTE_EVENT_LISTENER(change); 56 DEFINE_ATTRIBUTE_EVENT_LISTENER(change);
56 57
(...skipping 24 matching lines...) Expand all
81 bool updateMatches(); 82 bool updateMatches();
82 83
83 RefPtrWillBeMember<MediaQueryMatcher> m_matcher; 84 RefPtrWillBeMember<MediaQueryMatcher> m_matcher;
84 RefPtrWillBeMember<MediaQuerySet> m_media; 85 RefPtrWillBeMember<MediaQuerySet> m_media;
85 typedef WillBeHeapListHashSet<RefPtrWillBeMember<MediaQueryListListener> > L istenerList; 86 typedef WillBeHeapListHashSet<RefPtrWillBeMember<MediaQueryListListener> > L istenerList;
86 ListenerList m_listeners; 87 ListenerList m_listeners;
87 bool m_matchesDirty; 88 bool m_matchesDirty;
88 bool m_matches; 89 bool m_matches;
89 }; 90 };
90 91
91 } 92 } // namespace blink
92 93
93 #endif // MediaQueryList_h 94 #endif // MediaQueryList_h
OLDNEW
« no previous file with comments | « Source/core/css/MediaList.h ('k') | Source/core/css/MediaQueryListEvent.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698