diff options
author | Ben Murdoch <benm@google.com> | 2009-08-18 15:36:45 +0100 |
---|---|---|
committer | Ben Murdoch <benm@google.com> | 2009-08-18 19:20:06 +0100 |
commit | d227fc870c7a697500a3c900c31baf05fb9a8524 (patch) | |
tree | a3fa109aa5bf52fef562ac49d97a2f723889cc71 /WebCore/loader/ThreadableLoader.h | |
parent | f2c627513266faa73f7669058d98c60769fb3524 (diff) | |
download | external_webkit-d227fc870c7a697500a3c900c31baf05fb9a8524.zip external_webkit-d227fc870c7a697500a3c900c31baf05fb9a8524.tar.gz external_webkit-d227fc870c7a697500a3c900c31baf05fb9a8524.tar.bz2 |
Merge WebKit r47420
Diffstat (limited to 'WebCore/loader/ThreadableLoader.h')
-rw-r--r-- | WebCore/loader/ThreadableLoader.h | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/WebCore/loader/ThreadableLoader.h b/WebCore/loader/ThreadableLoader.h index 1ac12cb..a52bfad 100644 --- a/WebCore/loader/ThreadableLoader.h +++ b/WebCore/loader/ThreadableLoader.h @@ -43,32 +43,32 @@ namespace WebCore { class ScriptExecutionContext; class ThreadableLoaderClient; - enum LoadCallbacks { - SendLoadCallbacks, - DoNotSendLoadCallbacks - }; - - enum ContentSniff { - SniffContent, - DoNotSniffContent - }; - enum StoredCredentials { AllowStoredCredentials, DoNotAllowStoredCredentials }; - - enum CrossOriginRedirectPolicy { - DenyCrossOriginRedirect, - AllowCrossOriginRedirect + + enum CrossOriginRequestPolicy { + DenyCrossOriginRequests, + UseAccessControl, + AllowCrossOriginRequests + }; + + struct ThreadableLoaderOptions { + ThreadableLoaderOptions() : sendLoadCallbacks(false), sniffContent(false), allowCredentials(false), forcePreflight(false), crossOriginRequestPolicy(DenyCrossOriginRequests) { } + bool sendLoadCallbacks; + bool sniffContent; + bool allowCredentials; // Whether HTTP credentials and cookies are sent with the request. + bool forcePreflight; // If AccessControl is used, whether to force a preflight. + CrossOriginRequestPolicy crossOriginRequestPolicy; }; // Useful for doing loader operations from any thread (not threadsafe, // just able to run on threads other than the main thread). class ThreadableLoader : public Noncopyable { public: - static void loadResourceSynchronously(ScriptExecutionContext*, const ResourceRequest&, ThreadableLoaderClient&, StoredCredentials); - static PassRefPtr<ThreadableLoader> create(ScriptExecutionContext*, ThreadableLoaderClient*, const ResourceRequest&, LoadCallbacks, ContentSniff, StoredCredentials, CrossOriginRedirectPolicy); + static void loadResourceSynchronously(ScriptExecutionContext*, const ResourceRequest&, ThreadableLoaderClient&, const ThreadableLoaderOptions&); + static PassRefPtr<ThreadableLoader> create(ScriptExecutionContext*, ThreadableLoaderClient*, const ResourceRequest&, const ThreadableLoaderOptions&); virtual void cancel() = 0; void ref() { refThreadableLoader(); } |