| 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 17 matching lines...) Expand all Loading... |
| 28 | 28 |
| 29 #ifndef ResourceLoader_h | 29 #ifndef ResourceLoader_h |
| 30 #define ResourceLoader_h | 30 #define ResourceLoader_h |
| 31 | 31 |
| 32 #include "core/CoreExport.h" | 32 #include "core/CoreExport.h" |
| 33 #include "core/fetch/ResourceLoaderOptions.h" | 33 #include "core/fetch/ResourceLoaderOptions.h" |
| 34 #include "platform/network/ResourceRequest.h" | 34 #include "platform/network/ResourceRequest.h" |
| 35 #include "public/platform/WebURLLoader.h" | 35 #include "public/platform/WebURLLoader.h" |
| 36 #include "public/platform/WebURLLoaderClient.h" | 36 #include "public/platform/WebURLLoaderClient.h" |
| 37 #include "wtf/Forward.h" | 37 #include "wtf/Forward.h" |
| 38 #include <memory> | |
| 39 | 38 |
| 40 namespace blink { | 39 namespace blink { |
| 41 | 40 |
| 42 class Resource; | 41 class Resource; |
| 43 class ResourceError; | 42 class ResourceError; |
| 44 class ResourceFetcher; | 43 class ResourceFetcher; |
| 45 | 44 |
| 46 class CORE_EXPORT ResourceLoader final : public GarbageCollectedFinalized<Resour
ceLoader>, protected WebURLLoaderClient { | 45 class CORE_EXPORT ResourceLoader final : public GarbageCollectedFinalized<Resour
ceLoader>, protected WebURLLoaderClient { |
| 47 public: | 46 public: |
| 48 static ResourceLoader* create(ResourceFetcher*, Resource*); | 47 static ResourceLoader* create(ResourceFetcher*, Resource*); |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 81 void didFinishLoadingFirstPartInMultipart(); | 80 void didFinishLoadingFirstPartInMultipart(); |
| 82 | 81 |
| 83 private: | 82 private: |
| 84 // Assumes ResourceFetcher and Resource are non-null. | 83 // Assumes ResourceFetcher and Resource are non-null. |
| 85 ResourceLoader(ResourceFetcher*, Resource*); | 84 ResourceLoader(ResourceFetcher*, Resource*); |
| 86 | 85 |
| 87 void requestSynchronously(const ResourceRequest&); | 86 void requestSynchronously(const ResourceRequest&); |
| 88 | 87 |
| 89 bool responseNeedsAccessControlCheck() const; | 88 bool responseNeedsAccessControlCheck() const; |
| 90 | 89 |
| 91 std::unique_ptr<WebURLLoader> m_loader; | 90 OwnPtr<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 |