| 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 30 matching lines...) Expand all Loading... |
| 41 class Resource; | 41 class Resource; |
| 42 class ResourceError; | 42 class ResourceError; |
| 43 class ResourceFetcher; | 43 class ResourceFetcher; |
| 44 | 44 |
| 45 class CORE_EXPORT ResourceLoader final : public GarbageCollectedFinalized<Resour
ceLoader>, protected WebURLLoaderClient { | 45 class CORE_EXPORT ResourceLoader final : public GarbageCollectedFinalized<Resour
ceLoader>, protected WebURLLoaderClient { |
| 46 public: | 46 public: |
| 47 static ResourceLoader* create(ResourceFetcher*, Resource*); | 47 static ResourceLoader* create(ResourceFetcher*, Resource*); |
| 48 ~ResourceLoader() override; | 48 ~ResourceLoader() override; |
| 49 DECLARE_TRACE(); | 49 DECLARE_TRACE(); |
| 50 | 50 |
| 51 void start(ResourceRequest&); | 51 void start(const ResourceRequest&, WebTaskRunner* loadingTaskRunner, bool de
fersLoading); |
| 52 void cancel(); | 52 void cancel(); |
| 53 | 53 |
| 54 void setDefersLoading(bool); | 54 void setDefersLoading(bool); |
| 55 | 55 |
| 56 void didChangePriority(ResourceLoadPriority, int intraPriorityValue); | 56 void didChangePriority(ResourceLoadPriority, int intraPriorityValue); |
| 57 | 57 |
| 58 // WebURLLoaderClient | 58 // WebURLLoaderClient |
| 59 // | 59 // |
| 60 // A succesful load will consist of: | 60 // A succesful load will consist of: |
| 61 // 0+ willFollowRedirect() | 61 // 0+ willFollowRedirect() |
| (...skipping 14 matching lines...) Expand all Loading... |
| 76 void didDownloadData(WebURLLoader*, int, int) override; | 76 void didDownloadData(WebURLLoader*, int, int) override; |
| 77 void didFinishLoading(WebURLLoader*, double finishTime, int64_t encodedDataL
ength) override; | 77 void didFinishLoading(WebURLLoader*, double finishTime, int64_t encodedDataL
ength) override; |
| 78 void didFail(WebURLLoader*, const WebURLError&) override; | 78 void didFail(WebURLLoader*, const WebURLError&) override; |
| 79 | 79 |
| 80 void didFinishLoadingFirstPartInMultipart(); | 80 void didFinishLoadingFirstPartInMultipart(); |
| 81 | 81 |
| 82 private: | 82 private: |
| 83 // Assumes ResourceFetcher and Resource are non-null. | 83 // Assumes ResourceFetcher and Resource are non-null. |
| 84 ResourceLoader(ResourceFetcher*, Resource*); | 84 ResourceLoader(ResourceFetcher*, Resource*); |
| 85 | 85 |
| 86 void requestSynchronously(ResourceRequest&); | 86 void requestSynchronously(const ResourceRequest&); |
| 87 | 87 |
| 88 bool responseNeedsAccessControlCheck() const; | 88 bool responseNeedsAccessControlCheck() const; |
| 89 | 89 |
| 90 OwnPtr<WebURLLoader> m_loader; | 90 OwnPtr<WebURLLoader> m_loader; |
| 91 Member<ResourceFetcher> m_fetcher; | 91 Member<ResourceFetcher> m_fetcher; |
| 92 Member<Resource> m_resource; | 92 Member<Resource> m_resource; |
| 93 }; | 93 }; |
| 94 | 94 |
| 95 } // namespace blink | 95 } // namespace blink |
| 96 | 96 |
| 97 #endif | 97 #endif |
| OLD | NEW |