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

Side by Side Diff: third_party/WebKit/Source/core/loader/DocumentLoader.h

Issue 2511313002: transferSize implementation (Closed)
Patch Set: added TODO 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2006, 2007, 2008, 2009 Apple Inc. All rights reserved. 2 * Copyright (C) 2006, 2007, 2008, 2009 Apple Inc. All rights reserved.
3 * Copyright (C) 2011 Google Inc. All rights reserved. 3 * Copyright (C) 2011 Google Inc. All rights reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions 6 * modification, are permitted provided that the following conditions
7 * are met: 7 * are met:
8 * 8 *
9 * 1. Redistributions of source code must retain the above copyright 9 * 1. Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
53 #include "wtf/RefPtr.h" 53 #include "wtf/RefPtr.h"
54 #include <memory> 54 #include <memory>
55 55
56 namespace blink { 56 namespace blink {
57 57
58 class ApplicationCacheHost; 58 class ApplicationCacheHost;
59 class ResourceFetcher; 59 class ResourceFetcher;
60 class DocumentInit; 60 class DocumentInit;
61 class LocalFrame; 61 class LocalFrame;
62 class FrameLoader; 62 class FrameLoader;
63 class ResourceTimingInfo;
63 class WebDocumentSubresourceFilter; 64 class WebDocumentSubresourceFilter;
64 struct ViewportDescriptionWrapper; 65 struct ViewportDescriptionWrapper;
65 66
66 class CORE_EXPORT DocumentLoader 67 class CORE_EXPORT DocumentLoader
67 : public GarbageCollectedFinalized<DocumentLoader>, 68 : public GarbageCollectedFinalized<DocumentLoader>,
68 private RawResourceClient { 69 private RawResourceClient {
69 USING_GARBAGE_COLLECTED_MIXIN(DocumentLoader); 70 USING_GARBAGE_COLLECTED_MIXIN(DocumentLoader);
70 71
71 public: 72 public:
72 static DocumentLoader* create(LocalFrame* frame, 73 static DocumentLoader* create(LocalFrame* frame,
73 const ResourceRequest& request, 74 const ResourceRequest& request,
74 const SubstituteData& data, 75 const SubstituteData& data,
75 ClientRedirectPolicy clientRedirectPolicy) { 76 ClientRedirectPolicy clientRedirectPolicy) {
76 return new DocumentLoader(frame, request, data, clientRedirectPolicy); 77 return new DocumentLoader(frame, request, data, clientRedirectPolicy);
77 } 78 }
78 ~DocumentLoader() override; 79 ~DocumentLoader() override;
79 80
80 LocalFrame* frame() const { return m_frame; } 81 LocalFrame* frame() const { return m_frame; }
81 82
83 ResourceTimingInfo* getMainResourceTimingInfo() const;
84
82 virtual void detachFromFrame(); 85 virtual void detachFromFrame();
83 86
84 unsigned long mainResourceIdentifier() const; 87 unsigned long mainResourceIdentifier() const;
85 88
86 void replaceDocumentWhileExecutingJavaScriptURL(const DocumentInit&, 89 void replaceDocumentWhileExecutingJavaScriptURL(const DocumentInit&,
87 const String& source); 90 const String& source);
88 91
89 const AtomicString& mimeType() const; 92 const AtomicString& mimeType() const;
90 93
91 const ResourceRequest& originalRequest() const; 94 const ResourceRequest& originalRequest() const;
(...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after
251 // The 'working' request. It may be mutated 254 // The 'working' request. It may be mutated
252 // several times from the original request to include additional 255 // several times from the original request to include additional
253 // headers, cookie information, canonicalization and redirects. 256 // headers, cookie information, canonicalization and redirects.
254 ResourceRequest m_request; 257 ResourceRequest m_request;
255 258
256 ResourceResponse m_response; 259 ResourceResponse m_response;
257 260
258 bool m_isClientRedirect; 261 bool m_isClientRedirect;
259 bool m_replacesCurrentHistoryItem; 262 bool m_replacesCurrentHistoryItem;
260 bool m_dataReceived; 263 bool m_dataReceived;
264 unsigned long m_mainResourceIdentifier;
261 265
262 NavigationType m_navigationType; 266 NavigationType m_navigationType;
263 267
264 DocumentLoadTiming m_documentLoadTiming; 268 DocumentLoadTiming m_documentLoadTiming;
265 269
266 double m_timeOfLastDataReceived; 270 double m_timeOfLastDataReceived;
267 271
268 Member<ApplicationCacheHost> m_applicationCacheHost; 272 Member<ApplicationCacheHost> m_applicationCacheHost;
269 273
270 Member<ContentSecurityPolicy> m_contentSecurityPolicy; 274 Member<ContentSecurityPolicy> m_contentSecurityPolicy;
(...skipping 14 matching lines...) Expand all
285 // Used to protect against reentrancy into dataReceived(). 289 // Used to protect against reentrancy into dataReceived().
286 bool m_inDataReceived; 290 bool m_inDataReceived;
287 RefPtr<SharedBuffer> m_dataBuffer; 291 RefPtr<SharedBuffer> m_dataBuffer;
288 }; 292 };
289 293
290 DECLARE_WEAK_IDENTIFIER_MAP(DocumentLoader); 294 DECLARE_WEAK_IDENTIFIER_MAP(DocumentLoader);
291 295
292 } // namespace blink 296 } // namespace blink
293 297
294 #endif // DocumentLoader_h 298 #endif // DocumentLoader_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698