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

Side by Side Diff: Source/core/xml/XSLImportRule.h

Issue 507583002: XSLImportRule should not be ResourceClient. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: 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 * This file is part of the XSL implementation. 2 * This file is part of the XSL implementation.
3 * 3 *
4 * Copyright (C) 2004, 2006, 2008 Apple Inc. All rights reserved. 4 * Copyright (C) 2004, 2006, 2008 Apple Inc. All rights reserved.
5 * 5 *
6 * This library is free software; you can redistribute it and/or 6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Library General Public 7 * modify it under the terms of the GNU Library General Public
8 * License as published by the Free Software Foundation; either 8 * License as published by the Free Software Foundation; either
9 * version 2 of the License, or (at your option) any later version. 9 * version 2 of the License, or (at your option) any later version.
10 * 10 *
11 * This library is distributed in the hope that it will be useful, 11 * This library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Library General Public License for more details. 14 * Library General Public License for more details.
15 * 15 *
16 * You should have received a copy of the GNU Library General Public License 16 * You should have received a copy of the GNU Library General Public License
17 * along with this library; see the file COPYING.LIB. If not, write to 17 * along with this library; see the file COPYING.LIB. If not, write to
18 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 18 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
19 * Boston, MA 02110-1301, USA. 19 * Boston, MA 02110-1301, USA.
20 * 20 *
21 */ 21 */
22 22
23 #ifndef XSLImportRule_h 23 #ifndef XSLImportRule_h
24 #define XSLImportRule_h 24 #define XSLImportRule_h
25 25
26 #include "core/fetch/ResourcePtr.h" 26 #include "core/fetch/ResourcePtr.h"
27 #include "core/fetch/StyleSheetResourceClient.h"
28 #include "core/xml/XSLStyleSheet.h" 27 #include "core/xml/XSLStyleSheet.h"
29 #include "platform/RuntimeEnabledFeatures.h" 28 #include "platform/RuntimeEnabledFeatures.h"
30 #include "wtf/PassOwnPtr.h" 29 #include "wtf/PassOwnPtr.h"
31 30
32 namespace blink { 31 namespace blink {
33 32
34 class XSLStyleSheetResource; 33 class XSLStyleSheetResource;
35 34
36 class XSLImportRule FINAL : public NoBaseWillBeGarbageCollectedFinalized<XSLImpo rtRule>, private StyleSheetResourceClient { 35 class XSLImportRule FINAL : public NoBaseWillBeGarbageCollectedFinalized<XSLImpo rtRule> {
37 WTF_MAKE_FAST_ALLOCATED_WILL_BE_REMOVED; 36 WTF_MAKE_FAST_ALLOCATED_WILL_BE_REMOVED;
38 public: 37 public:
39 static PassOwnPtrWillBeRawPtr<XSLImportRule> create(XSLStyleSheet* parentShe et, const String& href) 38 static PassOwnPtrWillBeRawPtr<XSLImportRule> create(XSLStyleSheet* parentShe et, const String& href)
40 { 39 {
41 ASSERT(RuntimeEnabledFeatures::xsltEnabled()); 40 ASSERT(RuntimeEnabledFeatures::xsltEnabled());
42 return adoptPtrWillBeNoop(new XSLImportRule(parentSheet, href)); 41 return adoptPtrWillBeNoop(new XSLImportRule(parentSheet, href));
43 } 42 }
44 43
45 virtual ~XSLImportRule(); 44 virtual ~XSLImportRule();
46 virtual void trace(Visitor*); 45 virtual void trace(Visitor*);
47 46
48 const String& href() const { return m_strHref; } 47 const String& href() const { return m_strHref; }
49 XSLStyleSheet* styleSheet() const { return m_styleSheet.get(); } 48 XSLStyleSheet* styleSheet() const { return m_styleSheet.get(); }
50 49
51 XSLStyleSheet* parentStyleSheet() const { return m_parentStyleSheet; } 50 XSLStyleSheet* parentStyleSheet() const { return m_parentStyleSheet; }
52 void setParentStyleSheet(XSLStyleSheet* styleSheet) { m_parentStyleSheet = s tyleSheet; } 51 void setParentStyleSheet(XSLStyleSheet* styleSheet) { m_parentStyleSheet = s tyleSheet; }
53 52
54 bool isLoading(); 53 bool isLoading();
55 void loadSheet(); 54 void loadSheet();
56 55
57 private: 56 private:
58 XSLImportRule(XSLStyleSheet* parentSheet, const String& href); 57 XSLImportRule(XSLStyleSheet* parentSheet, const String& href);
59 58
60 virtual void setXSLStyleSheet(const String& href, const KURL& baseURL, const String& sheet) OVERRIDE; 59 void setXSLStyleSheet(const String& href, const KURL& baseURL, const String& sheet);
61 60
62 RawPtrWillBeMember<XSLStyleSheet> m_parentStyleSheet; 61 RawPtrWillBeMember<XSLStyleSheet> m_parentStyleSheet;
63 String m_strHref; 62 String m_strHref;
64 RefPtrWillBeMember<XSLStyleSheet> m_styleSheet; 63 RefPtrWillBeMember<XSLStyleSheet> m_styleSheet;
65 ResourcePtr<XSLStyleSheetResource> m_resource;
66 bool m_loading; 64 bool m_loading;
67 }; 65 };
68 66
69 } // namespace blink 67 } // namespace blink
70 68
71 #endif // XSLImportRule_h 69 #endif // XSLImportRule_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698