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

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

Issue 2723793002: De-Element ScriptLoader (Closed)
Patch Set: ScriptLoaderClient->ScriptElementBase, pure virtual interface, add fixme Created 3 years, 9 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
Index: third_party/WebKit/Source/core/dom/ScriptLoader.h
diff --git a/third_party/WebKit/Source/core/dom/ScriptLoader.h b/third_party/WebKit/Source/core/dom/ScriptLoader.h
index 295c12c9250ccdb07d50c8265da4b9d5066f4d3d..e44200f39f222e5484b383ce9e46914b53a4a5db 100644
--- a/third_party/WebKit/Source/core/dom/ScriptLoader.h
+++ b/third_party/WebKit/Source/core/dom/ScriptLoader.h
@@ -32,17 +32,16 @@
namespace blink {
-class Element;
-class ScriptLoaderClient;
-class ScriptSourceCode;
class LocalFrame;
+class ScriptElementBase;
+class ScriptSourceCode;
class CORE_EXPORT ScriptLoader : public GarbageCollectedFinalized<ScriptLoader>,
public PendingScriptClient {
USING_GARBAGE_COLLECTED_MIXIN(ScriptLoader);
public:
- static ScriptLoader* create(Element* element,
+ static ScriptLoader* create(ScriptElementBase* element,
bool createdByParser,
bool isEvaluated,
bool createdDuringDocumentWrite = false) {
@@ -53,8 +52,6 @@ class CORE_EXPORT ScriptLoader : public GarbageCollectedFinalized<ScriptLoader>,
~ScriptLoader() override;
DECLARE_VIRTUAL_TRACE();
- Element* element() const { return m_element; }
-
enum LegacyTypeSupport {
DisallowLegacyTypeInTypeAttribute,
AllowLegacyTypeInTypeAttribute
@@ -116,7 +113,7 @@ class CORE_EXPORT ScriptLoader : public GarbageCollectedFinalized<ScriptLoader>,
void setFetchDocWrittenScriptDeferIdle();
protected:
- ScriptLoader(Element*,
+ ScriptLoader(ScriptElementBase*,
bool createdByParser,
bool isEvaluated,
bool createdDuringDocumentWrite);
@@ -131,15 +128,13 @@ class CORE_EXPORT ScriptLoader : public GarbageCollectedFinalized<ScriptLoader>,
FetchRequest::DeferOption);
bool doExecuteScript(const ScriptSourceCode&);
- ScriptLoaderClient* client() const;
-
// Clears the connection to the PendingScript.
void detachPendingScript();
// PendingScriptClient
void pendingScriptFinished(PendingScript*) override;
- Member<Element> m_element;
+ Member<ScriptElementBase> m_element;
Member<ScriptResource> m_resource;
WTF::OrdinalNumber m_startLineNumber;
@@ -197,8 +192,6 @@ class CORE_EXPORT ScriptLoader : public GarbageCollectedFinalized<ScriptLoader>,
Member<PendingScript> m_pendingScript;
};
-ScriptLoader* toScriptLoaderIfPossible(Element*);
-
} // namespace blink
#endif // ScriptLoader_h
« no previous file with comments | « third_party/WebKit/Source/core/dom/ScriptElementBase.cpp ('k') | third_party/WebKit/Source/core/dom/ScriptLoader.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698