OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2008 Nikolas Zimmermann <zimmermann@kde.org> | 2 * Copyright (C) 2008 Nikolas Zimmermann <zimmermann@kde.org> |
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 |
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | 11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
12 * Library General Public License for more details. | 12 * Library General Public License for more details. |
13 * | 13 * |
14 * You should have received a copy of the GNU Library General Public License | 14 * You should have received a copy of the GNU Library General Public License |
15 * along with this library; see the file COPYING.LIB. If not, write to | 15 * along with this library; see the file COPYING.LIB. If not, write to |
16 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, | 16 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, |
17 * Boston, MA 02110-1301, USA. | 17 * Boston, MA 02110-1301, USA. |
18 * | 18 * |
19 */ | 19 */ |
20 | 20 |
21 #ifndef ScriptLoader_h | 21 #ifndef ScriptLoader_h |
22 #define ScriptLoader_h | 22 #define ScriptLoader_h |
23 | 23 |
24 #include "core/fetch/FetchRequest.h" | 24 #include "core/fetch/FetchRequest.h" |
25 #include "core/fetch/ResourceClient.h" | 25 #include "core/fetch/ResourceClient.h" |
26 #include "core/fetch/ResourcePtr.h" | 26 #include "core/fetch/ResourcePtr.h" |
| 27 #include "core/fetch/ScriptResource.h" |
27 #include "wtf/text/TextPosition.h" | 28 #include "wtf/text/TextPosition.h" |
28 #include "wtf/text/WTFString.h" | 29 #include "wtf/text/WTFString.h" |
29 | 30 |
30 namespace blink { | 31 namespace blink { |
31 | 32 |
32 class ScriptResource; | |
33 class Element; | 33 class Element; |
34 class ScriptLoaderClient; | 34 class ScriptLoaderClient; |
35 class ScriptSourceCode; | 35 class ScriptSourceCode; |
36 | 36 |
37 | 37 |
38 class ScriptLoader FINAL : private ResourceClient { | 38 class ScriptLoader FINAL : private ScriptResourceClient { |
39 public: | 39 public: |
40 static PassOwnPtr<ScriptLoader> create(Element*, bool createdByParser, bool
isEvaluated); | 40 static PassOwnPtr<ScriptLoader> create(Element*, bool createdByParser, bool
isEvaluated); |
41 virtual ~ScriptLoader(); | 41 virtual ~ScriptLoader(); |
42 | 42 |
43 Element* element() const { return m_element; } | 43 Element* element() const { return m_element; } |
44 | 44 |
45 enum LegacyTypeSupport { DisallowLegacyTypeInTypeAttribute, AllowLegacyTypeI
nTypeAttribute }; | 45 enum LegacyTypeSupport { DisallowLegacyTypeInTypeAttribute, AllowLegacyTypeI
nTypeAttribute }; |
46 bool prepareScript(const TextPosition& scriptStartPosition = TextPosition::m
inimumPosition(), LegacyTypeSupport = DisallowLegacyTypeInTypeAttribute); | 46 bool prepareScript(const TextPosition& scriptStartPosition = TextPosition::m
inimumPosition(), LegacyTypeSupport = DisallowLegacyTypeInTypeAttribute); |
47 | 47 |
48 String scriptCharset() const { return m_characterEncoding; } | 48 String scriptCharset() const { return m_characterEncoding; } |
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
107 | 107 |
108 inline PassOwnPtr<ScriptLoader> ScriptLoader::create(Element* element, bool crea
tedByParser, bool isEvaluated) | 108 inline PassOwnPtr<ScriptLoader> ScriptLoader::create(Element* element, bool crea
tedByParser, bool isEvaluated) |
109 { | 109 { |
110 return adoptPtr(new ScriptLoader(element, createdByParser, isEvaluated)); | 110 return adoptPtr(new ScriptLoader(element, createdByParser, isEvaluated)); |
111 } | 111 } |
112 | 112 |
113 } | 113 } |
114 | 114 |
115 | 115 |
116 #endif | 116 #endif |
OLD | NEW |