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

Unified Diff: third_party/WebKit/Source/core/html/parser/HTMLParserScriptRunner.h

Issue 2549143009: Create PendingScriptClient as a separate client interface for PendingScript. (Closed)
Patch Set: . Created 4 years 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/html/parser/HTMLParserScriptRunner.h
diff --git a/third_party/WebKit/Source/core/html/parser/HTMLParserScriptRunner.h b/third_party/WebKit/Source/core/html/parser/HTMLParserScriptRunner.h
index 013605c48bd2367333cad8b7dfbc4bd587143380..9d4946a1049bda2c7bd087731d4948c2c7332639 100644
--- a/third_party/WebKit/Source/core/html/parser/HTMLParserScriptRunner.h
+++ b/third_party/WebKit/Source/core/html/parser/HTMLParserScriptRunner.h
@@ -37,7 +37,6 @@
namespace blink {
-class Resource;
class Document;
class Element;
class HTMLParserScriptRunnerHost;
@@ -53,7 +52,7 @@ class HTMLParserScriptRunnerHost;
// An HTMLParserScriptRunner is owned by its host, an HTMLDocumentParser.
class HTMLParserScriptRunner final
: public GarbageCollectedFinalized<HTMLParserScriptRunner>,
- private ScriptResourceClient {
+ private PendingScriptClient {
WTF_MAKE_NONCOPYABLE(HTMLParserScriptRunner);
USING_GARBAGE_COLLECTED_MIXIN(HTMLParserScriptRunner);
USING_PRE_FINALIZER(HTMLParserScriptRunner, detach);
@@ -78,7 +77,7 @@ class HTMLParserScriptRunner final
// Invoked when the parsing-blocking script resource has loaded, to execute
// parsing-blocking scripts.
- void executeScriptsWaitingForLoad(Resource*);
+ void executeScriptsWaitingForLoad(PendingScript*);
// Invoked when all script-blocking resources (e.g., stylesheets) have loaded,
// to execute parsing-blocking scripts.
@@ -92,10 +91,6 @@ class HTMLParserScriptRunner final
return !!m_reentryPermit->scriptNestingLevel();
}
- // ResourceClient
- void notifyFinished(Resource*) override;
- String debugName() const override { return "HTMLParserScriptRunner"; }
-
DECLARE_TRACE();
private:
@@ -103,6 +98,9 @@ class HTMLParserScriptRunner final
Document*,
HTMLParserScriptRunnerHost*);
+ // PendingScriptClient
+ void pendingScriptFinished(PendingScript*) override;
+
void executePendingScriptAndDispatchEvent(PendingScript*,
ScriptStreamer::Type);
void executeParsingBlockingScripts();
@@ -118,9 +116,7 @@ class HTMLParserScriptRunner final
bool isParserBlockingScriptReady();
- void stopWatchingResourceForLoad(Resource*);
-
- void possiblyFetchBlockedDocWriteScript(Resource*);
+ void possiblyFetchBlockedDocWriteScript(PendingScript*);
RefPtr<HTMLParserReentryPermit> m_reentryPermit;
Member<Document> m_document;

Powered by Google App Engine
This is Rietveld 408576698