diff options
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(); } |