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

Unified Diff: third_party/WebKit/Source/core/loader/DocumentThreadableLoader.h

Issue 2715803004: Introduce ThreadableLoadingContext: make threaded loading code one step away from Document (Closed)
Patch Set: Created 3 years, 10 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/loader/DocumentThreadableLoader.h
diff --git a/third_party/WebKit/Source/core/loader/DocumentThreadableLoader.h b/third_party/WebKit/Source/core/loader/DocumentThreadableLoader.h
index 7303b3eed99b2cbf6541b82ba89e5a7dc13b4bda..dde41e3b98e15088bbface43ac1894d664ef3977 100644
--- a/third_party/WebKit/Source/core/loader/DocumentThreadableLoader.h
+++ b/third_party/WebKit/Source/core/loader/DocumentThreadableLoader.h
@@ -49,6 +49,7 @@ namespace blink {
class Document;
class KURL;
+class LoadingContext;
class ResourceRequest;
class SecurityOrigin;
class ThreadableLoaderClient;
@@ -67,6 +68,10 @@ class CORE_EXPORT DocumentThreadableLoader final : public ThreadableLoader,
ThreadableLoaderClient*,
const ThreadableLoaderOptions&,
const ResourceLoaderOptions&);
+ static DocumentThreadableLoader* create(LoadingContext&,
+ ThreadableLoaderClient*,
+ const ThreadableLoaderOptions&,
+ const ResourceLoaderOptions&);
~DocumentThreadableLoader() override;
void start(const ResourceRequest&) override;
@@ -81,7 +86,7 @@ class CORE_EXPORT DocumentThreadableLoader final : public ThreadableLoader,
private:
enum BlockingBehavior { LoadSynchronously, LoadAsynchronously };
- DocumentThreadableLoader(Document&,
+ DocumentThreadableLoader(LoadingContext&,
horo 2017/02/27 04:49:20 Why do you use reference instead of pointer?
kinuko 2017/02/27 04:55:35 Just to indicate this should never be null.
ThreadableLoaderClient*,
BlockingBehavior,
const ThreadableLoaderOptions&,
@@ -182,10 +187,12 @@ class CORE_EXPORT DocumentThreadableLoader final : public ThreadableLoader,
// End of ResourceOwner re-implementation, see above.
const SecurityOrigin* getSecurityOrigin() const;
- Document& document() const;
+
+ // TODO(kinuko): Remove dependency to document.
+ Document* document() const;
ThreadableLoaderClient* m_client;
- Member<Document> m_document;
+ Member<LoadingContext> m_loadingContext;
const ThreadableLoaderOptions m_options;
// Some items may be overridden by m_forceDoNotAllowStoredCredentials and

Powered by Google App Engine
This is Rietveld 408576698