| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2005, 2006, 2011 Apple Inc. All rights reserved. | 2 * Copyright (C) 2005, 2006, 2011 Apple Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
| 6 * are met: | 6 * are met: |
| 7 * | 7 * |
| 8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 43 class ResourceError; | 43 class ResourceError; |
| 44 class ResourceFetcher; | 44 class ResourceFetcher; |
| 45 | 45 |
| 46 class CORE_EXPORT ResourceLoader final : public GarbageCollectedFinalized<Resour
ceLoader>, protected WebURLLoaderClient { | 46 class CORE_EXPORT ResourceLoader final : public GarbageCollectedFinalized<Resour
ceLoader>, protected WebURLLoaderClient { |
| 47 public: | 47 public: |
| 48 static ResourceLoader* create(ResourceFetcher*, Resource*); | 48 static ResourceLoader* create(ResourceFetcher*, Resource*); |
| 49 ~ResourceLoader() override; | 49 ~ResourceLoader() override; |
| 50 DECLARE_TRACE(); | 50 DECLARE_TRACE(); |
| 51 | 51 |
| 52 void start(const ResourceRequest&, WebTaskRunner* loadingTaskRunner, bool de
fersLoading); | 52 void start(const ResourceRequest&, WebTaskRunner* loadingTaskRunner, bool de
fersLoading); |
| 53 void restartForServiceWorkerFallback(const ResourceRequest&); |
| 53 void cancel(); | 54 void cancel(); |
| 54 | 55 |
| 55 void setDefersLoading(bool); | 56 void setDefersLoading(bool); |
| 56 | 57 |
| 57 void didChangePriority(ResourceLoadPriority, int intraPriorityValue); | 58 void didChangePriority(ResourceLoadPriority, int intraPriorityValue); |
| 58 | 59 |
| 59 // WebURLLoaderClient | 60 // WebURLLoaderClient |
| 60 // | 61 // |
| 61 // A succesful load will consist of: | 62 // A succesful load will consist of: |
| 62 // 0+ willFollowRedirect() | 63 // 0+ willFollowRedirect() |
| (...skipping 16 matching lines...) Expand all Loading... |
| 79 void didFail(WebURLLoader*, const WebURLError&) override; | 80 void didFail(WebURLLoader*, const WebURLError&) override; |
| 80 | 81 |
| 81 void didFinishLoadingFirstPartInMultipart(); | 82 void didFinishLoadingFirstPartInMultipart(); |
| 82 | 83 |
| 83 private: | 84 private: |
| 84 // Assumes ResourceFetcher and Resource are non-null. | 85 // Assumes ResourceFetcher and Resource are non-null. |
| 85 ResourceLoader(ResourceFetcher*, Resource*); | 86 ResourceLoader(ResourceFetcher*, Resource*); |
| 86 | 87 |
| 87 void requestSynchronously(const ResourceRequest&); | 88 void requestSynchronously(const ResourceRequest&); |
| 88 | 89 |
| 89 bool responseNeedsAccessControlCheck() const; | |
| 90 | |
| 91 std::unique_ptr<WebURLLoader> m_loader; | 90 std::unique_ptr<WebURLLoader> m_loader; |
| 92 Member<ResourceFetcher> m_fetcher; | 91 Member<ResourceFetcher> m_fetcher; |
| 93 Member<Resource> m_resource; | 92 Member<Resource> m_resource; |
| 94 }; | 93 }; |
| 95 | 94 |
| 96 } // namespace blink | 95 } // namespace blink |
| 97 | 96 |
| 98 #endif | 97 #endif |
| OLD | NEW |