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

Side by Side Diff: third_party/WebKit/Source/core/loader/FrameFetchContext.cpp

Issue 2804843005: Implement the infrastructure of creating WorkerFetchContext in worker global scope. (Closed)
Patch Set: Created 3 years, 8 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2013 Google Inc. All rights reserved. 2 * Copyright (C) 2013 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
73 #include "platform/loader/fetch/ResourceLoadPriority.h" 73 #include "platform/loader/fetch/ResourceLoadPriority.h"
74 #include "platform/loader/fetch/ResourceLoadingLog.h" 74 #include "platform/loader/fetch/ResourceLoadingLog.h"
75 #include "platform/loader/fetch/ResourceTimingInfo.h" 75 #include "platform/loader/fetch/ResourceTimingInfo.h"
76 #include "platform/loader/fetch/UniqueIdentifier.h" 76 #include "platform/loader/fetch/UniqueIdentifier.h"
77 #include "platform/mhtml/MHTMLArchive.h" 77 #include "platform/mhtml/MHTMLArchive.h"
78 #include "platform/network/NetworkStateNotifier.h" 78 #include "platform/network/NetworkStateNotifier.h"
79 #include "platform/network/NetworkUtils.h" 79 #include "platform/network/NetworkUtils.h"
80 #include "platform/weborigin/SchemeRegistry.h" 80 #include "platform/weborigin/SchemeRegistry.h"
81 #include "platform/weborigin/SecurityPolicy.h" 81 #include "platform/weborigin/SecurityPolicy.h"
82 #include "platform/wtf/Vector.h" 82 #include "platform/wtf/Vector.h"
83 #include "public/platform/Platform.h"
83 #include "public/platform/WebCachePolicy.h" 84 #include "public/platform/WebCachePolicy.h"
84 #include "public/platform/WebInsecureRequestPolicy.h" 85 #include "public/platform/WebInsecureRequestPolicy.h"
85 #include "public/platform/WebViewScheduler.h" 86 #include "public/platform/WebViewScheduler.h"
86 #include "public/platform/modules/serviceworker/WebServiceWorkerNetworkProvider. h" 87 #include "public/platform/modules/serviceworker/WebServiceWorkerNetworkProvider. h"
87 88
88 namespace blink { 89 namespace blink {
89 90
90 namespace { 91 namespace {
91 92
92 void EmitWarningForDocWriteScripts(const String& url, Document& document) { 93 void EmitWarningForDocWriteScripts(const String& url, Document& document) {
(...skipping 205 matching lines...) Expand 10 before | Expand all | Expand 10 after
298 FrameFetchContext::FrameFetchContext(DocumentLoader* loader, Document* document) 299 FrameFetchContext::FrameFetchContext(DocumentLoader* loader, Document* document)
299 : document_(document), document_loader_(loader) { 300 : document_(document), document_loader_(loader) {
300 DCHECK(GetFrame()); 301 DCHECK(GetFrame());
301 } 302 }
302 303
303 FrameFetchContext::~FrameFetchContext() { 304 FrameFetchContext::~FrameFetchContext() {
304 document_ = nullptr; 305 document_ = nullptr;
305 document_loader_ = nullptr; 306 document_loader_ = nullptr;
306 } 307 }
307 308
309 WebURLLoader* FrameFetchContext::CreateURLLoader() {
310 return Platform::Current()->CreateURLLoader();
311 }
312
308 LocalFrame* FrameFetchContext::FrameOfImportsController() const { 313 LocalFrame* FrameFetchContext::FrameOfImportsController() const {
309 DCHECK(document_); 314 DCHECK(document_);
310 HTMLImportsController* imports_controller = document_->ImportsController(); 315 HTMLImportsController* imports_controller = document_->ImportsController();
311 DCHECK(imports_controller); 316 DCHECK(imports_controller);
312 LocalFrame* frame = imports_controller->Master()->GetFrame(); 317 LocalFrame* frame = imports_controller->Master()->GetFrame();
313 DCHECK(frame); 318 DCHECK(frame);
314 return frame; 319 return frame;
315 } 320 }
316 321
317 LocalFrame* FrameFetchContext::GetFrame() const { 322 LocalFrame* FrameFetchContext::GetFrame() const {
(...skipping 757 matching lines...) Expand 10 before | Expand all | Expand 10 after
1075 return GetFrame()->FrameScheduler()->LoadingTaskRunner(); 1080 return GetFrame()->FrameScheduler()->LoadingTaskRunner();
1076 } 1081 }
1077 1082
1078 DEFINE_TRACE(FrameFetchContext) { 1083 DEFINE_TRACE(FrameFetchContext) {
1079 visitor->Trace(document_); 1084 visitor->Trace(document_);
1080 visitor->Trace(document_loader_); 1085 visitor->Trace(document_loader_);
1081 FetchContext::Trace(visitor); 1086 FetchContext::Trace(visitor);
1082 } 1087 }
1083 1088
1084 } // namespace blink 1089 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698