| 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/ResourceClient.h" | 25 #include "core/fetch/ResourceClient.h" |
| 25 #include "core/fetch/ResourcePtr.h" | 26 #include "core/fetch/ResourcePtr.h" |
| 26 #include "wtf/text/TextPosition.h" | 27 #include "wtf/text/TextPosition.h" |
| 27 #include "wtf/text/WTFString.h" | 28 #include "wtf/text/WTFString.h" |
| 28 | 29 |
| 29 namespace blink { | 30 namespace blink { |
| 30 | 31 |
| 31 class ScriptResource; | 32 class ScriptResource; |
| 32 class Element; | 33 class Element; |
| 33 class ScriptLoaderClient; | 34 class ScriptLoaderClient; |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 70 void childrenChanged(); | 71 void childrenChanged(); |
| 71 void handleSourceAttribute(const String& sourceUrl); | 72 void handleSourceAttribute(const String& sourceUrl); |
| 72 void handleAsyncAttribute(); | 73 void handleAsyncAttribute(); |
| 73 | 74 |
| 74 private: | 75 private: |
| 75 ScriptLoader(Element*, bool createdByParser, bool isEvaluated); | 76 ScriptLoader(Element*, bool createdByParser, bool isEvaluated); |
| 76 | 77 |
| 77 bool ignoresLoadRequest() const; | 78 bool ignoresLoadRequest() const; |
| 78 bool isScriptForEventSupported() const; | 79 bool isScriptForEventSupported() const; |
| 79 | 80 |
| 80 bool fetchScript(const String& sourceUrl); | 81 bool fetchScript(const String& sourceUrl, FetchRequest::DeferOption); |
| 81 void stopLoadRequest(); | 82 void stopLoadRequest(); |
| 82 | 83 |
| 83 ScriptLoaderClient* client() const; | 84 ScriptLoaderClient* client() const; |
| 84 | 85 |
| 85 // ResourceClient | 86 // ResourceClient |
| 86 virtual void notifyFinished(Resource*) OVERRIDE; | 87 virtual void notifyFinished(Resource*) OVERRIDE; |
| 87 | 88 |
| 88 // FIXME: Oilpan: This should become a Member once ResourceClient is moved t
o the heap. | 89 // FIXME: Oilpan: This should become a Member once ResourceClient is moved t
o the heap. |
| 89 Element* m_element; | 90 Element* m_element; |
| 90 ResourcePtr<ScriptResource> m_resource; | 91 ResourcePtr<ScriptResource> m_resource; |
| (...skipping 15 matching lines...) Expand all Loading... |
| 106 | 107 |
| 107 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) |
| 108 { | 109 { |
| 109 return adoptPtr(new ScriptLoader(element, createdByParser, isEvaluated)); | 110 return adoptPtr(new ScriptLoader(element, createdByParser, isEvaluated)); |
| 110 } | 111 } |
| 111 | 112 |
| 112 } | 113 } |
| 113 | 114 |
| 114 | 115 |
| 115 #endif | 116 #endif |
| OLD | NEW |