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

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

Issue 1860743002: Add a flag to change when android's progress bar completes (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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 229 matching lines...) Expand 10 before | Expand all | Expand 10 after
240 inline DocumentLoader* FrameFetchContext::ensureLoaderForNotifications() const 240 inline DocumentLoader* FrameFetchContext::ensureLoaderForNotifications() const
241 { 241 {
242 return m_documentLoader ? m_documentLoader.get() : frame()->loader().documen tLoader(); 242 return m_documentLoader ? m_documentLoader.get() : frame()->loader().documen tLoader();
243 } 243 }
244 244
245 void FrameFetchContext::dispatchDidChangeResourcePriority(unsigned long identifi er, ResourceLoadPriority loadPriority, int intraPriorityValue) 245 void FrameFetchContext::dispatchDidChangeResourcePriority(unsigned long identifi er, ResourceLoadPriority loadPriority, int intraPriorityValue)
246 { 246 {
247 frame()->loader().client()->dispatchDidChangeResourcePriority(identifier, lo adPriority, intraPriorityValue); 247 frame()->loader().client()->dispatchDidChangeResourcePriority(identifier, lo adPriority, intraPriorityValue);
248 } 248 }
249 249
250 void FrameFetchContext::dispatchWillSendRequest(unsigned long identifier, Resour ceRequest& request, const ResourceResponse& redirectResponse, const FetchInitiat orInfo& initiatorInfo) 250 void FrameFetchContext::dispatchWillSendRequest(const Resource* resource, Resour ceRequest& request, const ResourceResponse& redirectResponse)
251 { 251 {
252 frame()->loader().progress().willSendRequest(resource);
252 frame()->loader().applyUserAgent(request); 253 frame()->loader().applyUserAgent(request);
253 frame()->loader().client()->dispatchWillSendRequest(m_documentLoader, identi fier, request, redirectResponse); 254 frame()->loader().client()->dispatchWillSendRequest(m_documentLoader, resour ce->identifier(), request, redirectResponse);
254 TRACE_EVENT_INSTANT1("devtools.timeline", "ResourceSendRequest", TRACE_EVENT _SCOPE_THREAD, "data", InspectorSendRequestEvent::data(identifier, frame(), requ est)); 255 TRACE_EVENT_INSTANT1("devtools.timeline", "ResourceSendRequest", TRACE_EVENT _SCOPE_THREAD, "data", InspectorSendRequestEvent::data(resource->identifier(), f rame(), request));
255 InspectorInstrumentation::willSendRequest(frame(), identifier, ensureLoaderF orNotifications(), request, redirectResponse, initiatorInfo); 256 InspectorInstrumentation::willSendRequest(frame(), resource->identifier(), e nsureLoaderForNotifications(), request, redirectResponse, resource->options().in itiatorInfo);
256 } 257 }
257 258
258 void FrameFetchContext::dispatchDidReceiveResponse(unsigned long identifier, con st ResourceResponse& response, WebURLRequest::FrameType frameType, WebURLRequest ::RequestContext requestContext, ResourceLoader* resourceLoader) 259 void FrameFetchContext::dispatchDidReceiveResponse(unsigned long identifier, con st ResourceResponse& response, WebURLRequest::FrameType frameType, WebURLRequest ::RequestContext requestContext, ResourceLoader* resourceLoader)
259 { 260 {
260 LinkLoader::CanLoadResources resourceLoadingPolicy = LinkLoader::LoadResourc esAndPreconnect; 261 LinkLoader::CanLoadResources resourceLoadingPolicy = LinkLoader::LoadResourc esAndPreconnect;
261 MixedContentChecker::checkMixedPrivatePublic(frame(), response.remoteIPAddre ss()); 262 MixedContentChecker::checkMixedPrivatePublic(frame(), response.remoteIPAddre ss());
262 if (m_documentLoader == frame()->loader().provisionalDocumentLoader()) { 263 if (m_documentLoader == frame()->loader().provisionalDocumentLoader()) {
263 ResourceFetcher* fetcher = nullptr; 264 ResourceFetcher* fetcher = nullptr;
264 if (frame()->document()) 265 if (frame()->document())
265 fetcher = frame()->document()->fetcher(); 266 fetcher = frame()->document()->fetcher();
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
313 // Notification to FrameConsole should come AFTER InspectorInstrumentation c all, DevTools front-end relies on this. 314 // Notification to FrameConsole should come AFTER InspectorInstrumentation c all, DevTools front-end relies on this.
314 if (!isInternalRequest) 315 if (!isInternalRequest)
315 frame()->console().didFailLoading(identifier, error); 316 frame()->console().didFailLoading(identifier, error);
316 } 317 }
317 318
318 void FrameFetchContext::dispatchDidLoadResourceFromMemoryCache(const Resource* r esource, WebURLRequest::FrameType frameType, WebURLRequest::RequestContext reque stContext) 319 void FrameFetchContext::dispatchDidLoadResourceFromMemoryCache(const Resource* r esource, WebURLRequest::FrameType frameType, WebURLRequest::RequestContext reque stContext)
319 { 320 {
320 ResourceRequest request(resource->url()); 321 ResourceRequest request(resource->url());
321 unsigned long identifier = createUniqueIdentifier(); 322 unsigned long identifier = createUniqueIdentifier();
322 frame()->loader().client()->dispatchDidLoadResourceFromMemoryCache(request, resource->response()); 323 frame()->loader().client()->dispatchDidLoadResourceFromMemoryCache(request, resource->response());
323 dispatchWillSendRequest(identifier, request, ResourceResponse(), resource->o ptions().initiatorInfo); 324 dispatchWillSendRequest(resource, request, ResourceResponse());
324 325
325 InspectorInstrumentation::markResourceAsCached(frame(), identifier); 326 InspectorInstrumentation::markResourceAsCached(frame(), identifier);
326 if (!resource->response().isNull()) 327 if (!resource->response().isNull())
327 dispatchDidReceiveResponse(identifier, resource->response(), frameType, requestContext); 328 dispatchDidReceiveResponse(identifier, resource->response(), frameType, requestContext);
328 329
329 if (resource->encodedSize() > 0) 330 if (resource->encodedSize() > 0)
330 dispatchDidReceiveData(identifier, 0, resource->encodedSize(), 0); 331 dispatchDidReceiveData(identifier, 0, resource->encodedSize(), 0);
331 332
332 dispatchDidFinishLoading(identifier, 0, 0); 333 dispatchDidFinishLoading(identifier, 0, 0);
333 } 334 }
(...skipping 487 matching lines...) Expand 10 before | Expand all | Expand 10 after
821 } 822 }
822 823
823 DEFINE_TRACE(FrameFetchContext) 824 DEFINE_TRACE(FrameFetchContext)
824 { 825 {
825 visitor->trace(m_document); 826 visitor->trace(m_document);
826 visitor->trace(m_documentLoader); 827 visitor->trace(m_documentLoader);
827 FetchContext::trace(visitor); 828 FetchContext::trace(visitor);
828 } 829 }
829 830
830 } // namespace blink 831 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698