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

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

Issue 863113004: Make WebThreadedDataReceiver wrap a Blink-managed object instead. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: fix msvc compilation Created 5 years, 11 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) 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 28 matching lines...) Expand all
39 #include "core/loader/FrameLoaderTypes.h" 39 #include "core/loader/FrameLoaderTypes.h"
40 #include "core/loader/NavigationPolicy.h" 40 #include "core/loader/NavigationPolicy.h"
41 #include "core/loader/SubstituteData.h" 41 #include "core/loader/SubstituteData.h"
42 #include "platform/network/ResourceError.h" 42 #include "platform/network/ResourceError.h"
43 #include "platform/network/ResourceRequest.h" 43 #include "platform/network/ResourceRequest.h"
44 #include "platform/network/ResourceResponse.h" 44 #include "platform/network/ResourceResponse.h"
45 #include "wtf/HashSet.h" 45 #include "wtf/HashSet.h"
46 #include "wtf/RefPtr.h" 46 #include "wtf/RefPtr.h"
47 47
48 namespace blink { 48 namespace blink {
49 class WebThreadedDataReceiver;
50 }
51
52 namespace blink {
53 class ApplicationCacheHost; 49 class ApplicationCacheHost;
54 class ArchiveResourceCollection; 50 class ArchiveResourceCollection;
55 class ResourceFetcher; 51 class ResourceFetcher;
56 class DocumentInit; 52 class DocumentInit;
57 class LocalFrame; 53 class LocalFrame;
58 class FrameLoader; 54 class FrameLoader;
59 class MHTMLArchive; 55 class MHTMLArchive;
60 class ResourceLoader; 56 class ResourceLoader;
57 class ThreadedDataReceiver;
61 58
62 class DocumentLoader : public RefCounted<DocumentLoader>, private RawResourc eClient { 59 class DocumentLoader : public RefCounted<DocumentLoader>, private RawResourc eClient {
63 WTF_MAKE_FAST_ALLOCATED; 60 WTF_MAKE_FAST_ALLOCATED;
64 public: 61 public:
65 static PassRefPtr<DocumentLoader> create(LocalFrame* frame, const Resour ceRequest& request, const SubstituteData& data) 62 static PassRefPtr<DocumentLoader> create(LocalFrame* frame, const Resour ceRequest& request, const SubstituteData& data)
66 { 63 {
67 return adoptRef(new DocumentLoader(frame, request, data)); 64 return adoptRef(new DocumentLoader(frame, request, data));
68 } 65 }
69 virtual ~DocumentLoader(); 66 virtual ~DocumentLoader();
70 67
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
110 107
111 bool shouldContinueForNavigationPolicy(const ResourceRequest&, ContentSe curityPolicyDisposition shouldCheckMainWorldContentSecurityPolicy, NavigationPol icy = NavigationPolicyCurrentTab, bool isTransitionNavigation = false); 108 bool shouldContinueForNavigationPolicy(const ResourceRequest&, ContentSe curityPolicyDisposition shouldCheckMainWorldContentSecurityPolicy, NavigationPol icy = NavigationPolicyCurrentTab, bool isTransitionNavigation = false);
112 NavigationType navigationType() const { return m_navigationType; } 109 NavigationType navigationType() const { return m_navigationType; }
113 void setNavigationType(NavigationType navigationType) { m_navigationType = navigationType; } 110 void setNavigationType(NavigationType navigationType) { m_navigationType = navigationType; }
114 111
115 void setDefersLoading(bool); 112 void setDefersLoading(bool);
116 113
117 void startLoadingMainResource(); 114 void startLoadingMainResource();
118 void cancelMainResourceLoad(const ResourceError&); 115 void cancelMainResourceLoad(const ResourceError&);
119 116
120 void attachThreadedDataReceiver(PassOwnPtr<blink::WebThreadedDataReceive r>); 117 void attachThreadedDataReceiver(PassRefPtrWillBeRawPtr<ThreadedDataRecei ver>);
121 void acceptDataFromThreadedReceiver(const char* data, int dataLength, in t encodedDataLength); 118 void acceptDataFromThreadedReceiver(const char* data, int dataLength, in t encodedDataLength);
122 DocumentLoadTiming* timing() { return &m_documentLoadTiming; } 119 DocumentLoadTiming* timing() { return &m_documentLoadTiming; }
123 120
124 ApplicationCacheHost* applicationCacheHost() const { return m_applicatio nCacheHost.get(); } 121 ApplicationCacheHost* applicationCacheHost() const { return m_applicatio nCacheHost.get(); }
125 122
126 bool isRedirect() const { return m_redirectChain.size() > 1; } 123 bool isRedirect() const { return m_redirectChain.size() > 1; }
127 void clearRedirectChain(); 124 void clearRedirectChain();
128 void appendRedirect(const KURL&); 125 void appendRedirect(const KURL&);
129 126
130 PassRefPtr<ContentSecurityPolicy> releaseContentSecurityPolicy() { retur n m_contentSecurityPolicy.release(); } 127 PassRefPtr<ContentSecurityPolicy> releaseContentSecurityPolicy() { retur n m_contentSecurityPolicy.release(); }
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
208 double m_timeOfLastDataReceived; 205 double m_timeOfLastDataReceived;
209 206
210 friend class ApplicationCacheHost; // for substitute resource delivery 207 friend class ApplicationCacheHost; // for substitute resource delivery
211 OwnPtrWillBePersistent<ApplicationCacheHost> m_applicationCacheHost; 208 OwnPtrWillBePersistent<ApplicationCacheHost> m_applicationCacheHost;
212 209
213 RefPtr<ContentSecurityPolicy> m_contentSecurityPolicy; 210 RefPtr<ContentSecurityPolicy> m_contentSecurityPolicy;
214 }; 211 };
215 } 212 }
216 213
217 #endif // DocumentLoader_h 214 #endif // DocumentLoader_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698