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

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

Issue 412183003: bindings: Makes more DOM classes inherit from ScriptWrappable (part 3). (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Reverted RGBColor and Rect. Created 6 years, 4 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/FontFace.cpp ('k') | Source/core/css/MediaList.cpp » ('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 * (C) 1999-2003 Lars Knoll (knoll@kde.org) 2 * (C) 1999-2003 Lars Knoll (knoll@kde.org)
3 * Copyright (C) 2004, 2006, 2008, 2009, 2010, 2012 Apple Inc. All rights reserv ed. 3 * Copyright (C) 2004, 2006, 2008, 2009, 2010, 2012 Apple Inc. All rights reserv ed.
4 * 4 *
5 * This library is free software; you can redistribute it and/or 5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Library General Public 6 * modify it under the terms of the GNU Library General Public
7 * License as published by the Free Software Foundation; either 7 * License as published by the Free Software Foundation; either
8 * version 2 of the License, or (at your option) any later version. 8 * version 2 of the License, or (at your option) any later version.
9 * 9 *
10 * This library is distributed in the hope that it will be useful, 10 * This library is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * Library General Public License for more details. 13 * Library General Public License for more details.
14 * 14 *
15 * You should have received a copy of the GNU Library General Public License 15 * You should have received a copy of the GNU Library General Public License
16 * along with this library; see the file COPYING.LIB. If not, write to 16 * along with this library; see the file COPYING.LIB. If not, write to
17 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 17 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
18 * Boston, MA 02110-1301, USA. 18 * Boston, MA 02110-1301, USA.
19 */ 19 */
20 20
21 #ifndef MediaList_h 21 #ifndef MediaList_h
22 #define MediaList_h 22 #define MediaList_h
23 23
24 #include "bindings/core/v8/ScriptWrappable.h"
24 #include "core/dom/ExceptionCode.h" 25 #include "core/dom/ExceptionCode.h"
25 #include "platform/heap/Handle.h" 26 #include "platform/heap/Handle.h"
26 #include "wtf/Forward.h" 27 #include "wtf/Forward.h"
27 #include "wtf/PassRefPtr.h" 28 #include "wtf/PassRefPtr.h"
28 #include "wtf/RefCounted.h" 29 #include "wtf/RefCounted.h"
29 #include "wtf/Vector.h" 30 #include "wtf/Vector.h"
30 #include "wtf/text/WTFString.h" 31 #include "wtf/text/WTFString.h"
31 32
32 namespace blink { 33 namespace blink {
33 34
(...skipping 28 matching lines...) Expand all
62 63
63 void trace(Visitor*); 64 void trace(Visitor*);
64 65
65 private: 66 private:
66 MediaQuerySet(); 67 MediaQuerySet();
67 MediaQuerySet(const MediaQuerySet&); 68 MediaQuerySet(const MediaQuerySet&);
68 69
69 WillBeHeapVector<OwnPtrWillBeMember<MediaQuery> > m_queries; 70 WillBeHeapVector<OwnPtrWillBeMember<MediaQuery> > m_queries;
70 }; 71 };
71 72
72 class MediaList : public RefCountedWillBeGarbageCollectedFinalized<MediaList> { 73 class MediaList : public RefCountedWillBeGarbageCollectedFinalized<MediaList>, p ublic ScriptWrappable {
73 public: 74 public:
74 static PassRefPtrWillBeRawPtr<MediaList> create(MediaQuerySet* mediaQueries, CSSStyleSheet* parentSheet) 75 static PassRefPtrWillBeRawPtr<MediaList> create(MediaQuerySet* mediaQueries, CSSStyleSheet* parentSheet)
75 { 76 {
76 return adoptRefWillBeNoop(new MediaList(mediaQueries, parentSheet)); 77 return adoptRefWillBeNoop(new MediaList(mediaQueries, parentSheet));
77 } 78 }
78 static PassRefPtrWillBeRawPtr<MediaList> create(MediaQuerySet* mediaQueries, CSSRule* parentRule) 79 static PassRefPtrWillBeRawPtr<MediaList> create(MediaQuerySet* mediaQueries, CSSRule* parentRule)
79 { 80 {
80 return adoptRefWillBeNoop(new MediaList(mediaQueries, parentRule)); 81 return adoptRefWillBeNoop(new MediaList(mediaQueries, parentRule));
81 } 82 }
82 83
(...skipping 16 matching lines...) Expand all
99 void clearParentRule() { ASSERT(m_parentRule); m_parentRule = nullptr; } 100 void clearParentRule() { ASSERT(m_parentRule); m_parentRule = nullptr; }
100 #endif 101 #endif
101 102
102 const MediaQuerySet* queries() const { return m_mediaQueries.get(); } 103 const MediaQuerySet* queries() const { return m_mediaQueries.get(); }
103 104
104 void reattach(MediaQuerySet*); 105 void reattach(MediaQuerySet*);
105 106
106 void trace(Visitor*); 107 void trace(Visitor*);
107 108
108 private: 109 private:
109 MediaList();
110 MediaList(MediaQuerySet*, CSSStyleSheet* parentSheet); 110 MediaList(MediaQuerySet*, CSSStyleSheet* parentSheet);
111 MediaList(MediaQuerySet*, CSSRule* parentRule); 111 MediaList(MediaQuerySet*, CSSRule* parentRule);
112 112
113 RefPtrWillBeMember<MediaQuerySet> m_mediaQueries; 113 RefPtrWillBeMember<MediaQuerySet> m_mediaQueries;
114 // Cleared in ~CSSStyleSheet destructor when oilpan is not enabled. 114 // Cleared in ~CSSStyleSheet destructor when oilpan is not enabled.
115 RawPtrWillBeMember<CSSStyleSheet> m_parentStyleSheet; 115 RawPtrWillBeMember<CSSStyleSheet> m_parentStyleSheet;
116 // Cleared in the ~CSSMediaRule and ~CSSImportRule destructors when oilpan i s not enabled. 116 // Cleared in the ~CSSMediaRule and ~CSSImportRule destructors when oilpan i s not enabled.
117 RawPtrWillBeMember<CSSRule> m_parentRule; 117 RawPtrWillBeMember<CSSRule> m_parentRule;
118 }; 118 };
119 119
120 // Adds message to inspector console whenever dpi or dpcm values are used for "s creen" media. 120 // Adds message to inspector console whenever dpi or dpcm values are used for "s creen" media.
121 void reportMediaQueryWarningIfNeeded(Document*, const MediaQuerySet*); 121 void reportMediaQueryWarningIfNeeded(Document*, const MediaQuerySet*);
122 122
123 } // namespace 123 } // namespace
124 124
125 #endif 125 #endif
OLDNEW
« no previous file with comments | « Source/core/css/FontFace.cpp ('k') | Source/core/css/MediaList.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698