| 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 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 45 | 45 |
| 46 class CORE_EXPORT ResourceLoader final | 46 class CORE_EXPORT ResourceLoader final |
| 47 : public GarbageCollectedFinalized<ResourceLoader>, | 47 : public GarbageCollectedFinalized<ResourceLoader>, |
| 48 protected WebURLLoaderClient { | 48 protected WebURLLoaderClient { |
| 49 public: | 49 public: |
| 50 static ResourceLoader* create(ResourceFetcher*, Resource*); | 50 static ResourceLoader* create(ResourceFetcher*, Resource*); |
| 51 ~ResourceLoader() override; | 51 ~ResourceLoader() override; |
| 52 DECLARE_TRACE(); | 52 DECLARE_TRACE(); |
| 53 | 53 |
| 54 void start(const ResourceRequest&, | 54 void start(const ResourceRequest&, |
| 55 WebTaskRunner* loadingTaskRunner, | 55 RefPtr<WebTaskRunner> loadingTaskRunner, |
| 56 bool defersLoading); | 56 bool defersLoading); |
| 57 | 57 |
| 58 // This method is currently only used for service worker fallback request and | 58 // This method is currently only used for service worker fallback request and |
| 59 // cache-aware loading, other users should be careful not to break | 59 // cache-aware loading, other users should be careful not to break |
| 60 // ResourceLoader state. | 60 // ResourceLoader state. |
| 61 void restart(const ResourceRequest&, | 61 void restart(const ResourceRequest&, |
| 62 WebTaskRunner* loadingTaskRunner, | 62 RefPtr<WebTaskRunner> loadingTaskRunner, |
| 63 bool defersLoading); | 63 bool defersLoading); |
| 64 | 64 |
| 65 void cancel(); | 65 void cancel(); |
| 66 | 66 |
| 67 void setDefersLoading(bool); | 67 void setDefersLoading(bool); |
| 68 | 68 |
| 69 void didChangePriority(ResourceLoadPriority, int intraPriorityValue); | 69 void didChangePriority(ResourceLoadPriority, int intraPriorityValue); |
| 70 | 70 |
| 71 // Called before start() to activate cache-aware loading if enabled in | 71 // Called before start() to activate cache-aware loading if enabled in |
| 72 // |m_resource->options()| and applicable. | 72 // |m_resource->options()| and applicable. |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 117 | 117 |
| 118 std::unique_ptr<WebURLLoader> m_loader; | 118 std::unique_ptr<WebURLLoader> m_loader; |
| 119 Member<ResourceFetcher> m_fetcher; | 119 Member<ResourceFetcher> m_fetcher; |
| 120 Member<Resource> m_resource; | 120 Member<Resource> m_resource; |
| 121 bool m_isCacheAwareLoadingActivated; | 121 bool m_isCacheAwareLoadingActivated; |
| 122 }; | 122 }; |
| 123 | 123 |
| 124 } // namespace blink | 124 } // namespace blink |
| 125 | 125 |
| 126 #endif | 126 #endif |
| OLD | NEW |