Chromium Code Reviews| Index: third_party/WebKit/Source/core/loader/DocumentLoader.h |
| diff --git a/third_party/WebKit/Source/core/loader/DocumentLoader.h b/third_party/WebKit/Source/core/loader/DocumentLoader.h |
| index cf8dbc2d2b38d1961465dd012037e1fbef056c79..40a807f4c832159f0ca3868eb095ffe59335af5f 100644 |
| --- a/third_party/WebKit/Source/core/loader/DocumentLoader.h |
| +++ b/third_party/WebKit/Source/core/loader/DocumentLoader.h |
| @@ -60,6 +60,7 @@ class ResourceFetcher; |
| class DocumentInit; |
| class LocalFrame; |
| class FrameLoader; |
| +class FrameLoaderClient; |
| class ResourceTimingInfo; |
| class WebDocumentSubresourceFilter; |
| struct ViewportDescriptionWrapper; |
| @@ -74,6 +75,8 @@ class CORE_EXPORT DocumentLoader |
| const ResourceRequest& request, |
| const SubstituteData& data, |
| ClientRedirectPolicy clientRedirectPolicy) { |
| + DCHECK(frame); |
| + |
| return new DocumentLoader(frame, request, data, clientRedirectPolicy); |
| } |
| ~DocumentLoader() override; |
| @@ -206,7 +209,10 @@ class CORE_EXPORT DocumentLoader |
| const KURL& overridingURL = KURL()); |
| void endWriting(); |
| - FrameLoader* frameLoader() const; |
| + // Use these method only where it's guaranteed that |m_frame| hasn't been |
| + // cleared. |
| + FrameLoader& frameLoader() const; |
| + FrameLoaderClient* frameLoaderClient() const; |
|
yhirano
2016/12/26 08:46:23
What is the reference-pointer policy here? Both fr
tyoshino (SeeGerritForStatus)
2017/01/10 10:29:25
Ah, right. Changed frameLoaderClient() to also be
|
| void commitIfReady(); |
| void commitData(const char* bytes, size_t length); |
| @@ -216,6 +222,8 @@ class CORE_EXPORT DocumentLoader |
| void finishedLoading(double finishTime); |
| void cancelLoadAfterXFrameOptionsOrCSPDenied(const ResourceResponse&); |
| + |
| + // RawResourceClient implementation |
| bool redirectReceived(Resource*, |
| const ResourceRequest&, |
| const ResourceResponse&) final; |
| @@ -223,10 +231,13 @@ class CORE_EXPORT DocumentLoader |
| const ResourceResponse&, |
| std::unique_ptr<WebDataConsumerHandle>) final; |
| void dataReceived(Resource*, const char* data, size_t length) final; |
| - void processData(const char* data, size_t length); |
| + |
| + // ResourceClient implementation |
| void notifyFinished(Resource*) final; |
| String debugName() const override { return "DocumentLoader"; } |
| + void processData(const char* data, size_t length); |
| + |
| bool maybeLoadEmpty(); |
| bool isRedirectAfterPost(const ResourceRequest&, const ResourceResponse&); |