~oif-team/ubuntu/natty/qt4-x11/xi2.1

« back to all changes in this revision

Viewing changes to src/3rdparty/webkit/WebCore/platform/network/ResourceHandle.h

  • Committer: Bazaar Package Importer
  • Author(s): Alessandro Ghersi
  • Date: 2009-11-02 18:30:08 UTC
  • mfrom: (1.2.2 upstream)
  • mto: (15.2.5 experimental)
  • mto: This revision was merged to the branch mainline in revision 88.
  • Revision ID: james.westby@ubuntu.com-20091102183008-b6a4gcs128mvfb3m
Tags: upstream-4.6.0~beta1
ImportĀ upstreamĀ versionĀ 4.6.0~beta1

Show diffs side-by-side

added added

removed removed

Lines of Context:
28
28
 
29
29
#include "AuthenticationChallenge.h"
30
30
#include "HTTPHeaderMap.h"
 
31
#include "ThreadableLoader.h"
31
32
#include <wtf/OwnPtr.h>
32
33
 
 
34
#if USE(SOUP)
 
35
typedef struct _SoupSession SoupSession;
 
36
#endif
 
37
 
33
38
#if PLATFORM(CF)
34
39
typedef const struct __CFData * CFDataRef;
35
40
#endif
79
84
class ResourceError;
80
85
class ResourceHandleClient;
81
86
class ResourceHandleInternal;
82
 
class ResourceRequest;
 
87
struct ResourceRequest;
83
88
class ResourceResponse;
84
89
class SchedulePair;
85
90
class SharedBuffer;
99
104
    // FIXME: should not need the Frame
100
105
    static PassRefPtr<ResourceHandle> create(const ResourceRequest&, ResourceHandleClient*, Frame*, bool defersLoading, bool shouldContentSniff, bool mightDownloadFromHandle = false);
101
106
 
102
 
    static void loadResourceSynchronously(const ResourceRequest&, ResourceError&, ResourceResponse&, Vector<char>& data, Frame* frame);
103
 
    static bool willLoadFromCache(ResourceRequest&);
 
107
    static void loadResourceSynchronously(const ResourceRequest&, StoredCredentials, ResourceError&, ResourceResponse&, Vector<char>& data, Frame* frame);
 
108
    static bool willLoadFromCache(ResourceRequest&, Frame*);
104
109
#if PLATFORM(MAC)
105
110
    static bool didSendBodyDataDelegateExists();
106
111
#endif
108
113
    ~ResourceHandle();
109
114
 
110
115
#if PLATFORM(MAC) || USE(CFNETWORK)
 
116
    void willSendRequest(ResourceRequest&, const ResourceResponse& redirectResponse);
111
117
    bool shouldUseCredentialStorage();
112
118
#endif
113
119
#if PLATFORM(MAC) || USE(CFNETWORK) || USE(CURL)
144
150
    PassRefPtr<SharedBuffer> bufferedData();
145
151
    static bool supportsBufferedData();
146
152
 
 
153
    bool shouldContentSniff() const;
 
154
    static bool shouldContentSniffURL(const KURL&);
 
155
 
 
156
    static void forceContentSniffing();
 
157
 
147
158
#if USE(WININET)
148
159
    void setHasReceivedResponse(bool = true);
149
160
    bool hasReceivedResponse() const;
159
170
    ResourceHandleInternal* getInternal() { return d.get(); }
160
171
#endif
161
172
 
 
173
#if USE(SOUP)
 
174
    static SoupSession* defaultSession();
 
175
#endif
 
176
 
162
177
    // Used to work around the fact that you don't get any more NSURLConnection callbacks until you return from the one you're in.
163
178
    static bool loadsBlocked();    
164
179
    
176
191
    void fireFailure(Timer<ResourceHandle>*);
177
192
 
178
193
private:
179
 
#if USE(SOUP)
180
 
    bool startData(String urlString);
181
 
    bool startHttp(String urlString);
182
 
    bool startGio(String urlString);
183
 
#endif
184
 
 
185
194
    void scheduleFailure(FailureType);
186
195
 
187
196
    bool start(Frame*);