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

Unified Diff: Source/core/dom/ScriptLoader.h

Issue 18261015: Rename ScriptElement to ScriptLoader (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/core/dom/ScriptElement.cpp ('k') | Source/core/dom/ScriptLoader.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/dom/ScriptLoader.h
diff --git a/Source/core/dom/ScriptElement.h b/Source/core/dom/ScriptLoader.h
similarity index 73%
rename from Source/core/dom/ScriptElement.h
rename to Source/core/dom/ScriptLoader.h
index 645dd321bc311b419fc2805ae1aa9689384eb43e..55fb1678aaab2d4c88fb3989bfa129aa455c473d 100644
--- a/Source/core/dom/ScriptElement.h
+++ b/Source/core/dom/ScriptLoader.h
@@ -18,43 +18,27 @@
*
*/
-#ifndef ScriptElement_h
-#define ScriptElement_h
+#ifndef ScriptLoader_h
+#define ScriptLoader_h
#include "core/loader/cache/CachedResourceClient.h"
#include "core/loader/cache/CachedResourceHandle.h"
-#include <wtf/text/TextPosition.h>
-#include <wtf/text/WTFString.h>
+#include "wtf/text/TextPosition.h"
+#include "wtf/text/WTFString.h"
namespace WebCore {
class CachedScript;
class ContainerNode;
class Element;
-class ScriptElement;
+class ScriptLoaderClient;
class ScriptSourceCode;
-class ScriptElementClient {
-public:
- virtual ~ScriptElementClient() { }
-
- virtual void dispatchLoadEvent() = 0;
-
- virtual String sourceAttributeValue() const = 0;
- virtual String charsetAttributeValue() const = 0;
- virtual String typeAttributeValue() const = 0;
- virtual String languageAttributeValue() const = 0;
- virtual String forAttributeValue() const = 0;
- virtual String eventAttributeValue() const = 0;
- virtual bool asyncAttributeValue() const = 0;
- virtual bool deferAttributeValue() const = 0;
- virtual bool hasSourceAttribute() const = 0;
-};
-class ScriptElement : private CachedResourceClient {
+class ScriptLoader : private CachedResourceClient {
public:
- static PassOwnPtr<ScriptElement> create(Element*, bool createdByParser, bool isEvaluated);
- virtual ~ScriptElement();
+ static PassOwnPtr<ScriptLoader> create(Element*, bool createdByParser, bool isEvaluated);
+ virtual ~ScriptLoader();
Element* element() const { return m_element; }
@@ -89,7 +73,7 @@ public:
void handleAsyncAttribute();
private:
- ScriptElement(Element*, bool createdByParser, bool isEvaluated);
+ ScriptLoader(Element*, bool createdByParser, bool isEvaluated);
bool ignoresLoadRequest() const;
bool isScriptForEventSupported() const;
@@ -97,7 +81,7 @@ private:
bool requestScript(const String& sourceUrl);
void stopLoadRequest();
- ScriptElementClient* client() const;
+ ScriptLoaderClient* client() const;
// CachedResourceClient
virtual void notifyFinished(CachedResource*) OVERRIDE;
@@ -118,11 +102,11 @@ private:
String m_fallbackCharacterEncoding;
};
-ScriptElement* toScriptElementIfPossible(Element*);
+ScriptLoader* toScriptLoaderIfPossible(Element*);
-inline PassOwnPtr<ScriptElement> ScriptElement::create(Element* element, bool createdByParser, bool isEvaluated)
+inline PassOwnPtr<ScriptLoader> ScriptLoader::create(Element* element, bool createdByParser, bool isEvaluated)
{
- return adoptPtr(new ScriptElement(element, createdByParser, isEvaluated));
+ return adoptPtr(new ScriptLoader(element, createdByParser, isEvaluated));
}
}
« no previous file with comments | « Source/core/dom/ScriptElement.cpp ('k') | Source/core/dom/ScriptLoader.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698