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> |
38 | 39 |
39 namespace blink { | 40 namespace blink { |
40 | 41 |
41 class Resource; | 42 class Resource; |
42 class ResourceError; | 43 class ResourceError; |
43 class ResourceFetcher; | 44 class ResourceFetcher; |
44 | 45 |
45 class CORE_EXPORT ResourceLoader final : public GarbageCollectedFinalized<Resour
ceLoader>, protected WebURLLoaderClient { | 46 class CORE_EXPORT ResourceLoader final : public GarbageCollectedFinalized<Resour
ceLoader>, protected WebURLLoaderClient { |
46 public: | 47 public: |
47 static ResourceLoader* create(ResourceFetcher*, Resource*); | 48 static ResourceLoader* create(ResourceFetcher*, Resource*); |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
80 void didFinishLoadingFirstPartInMultipart(); | 81 void didFinishLoadingFirstPartInMultipart(); |
81 | 82 |
82 private: | 83 private: |
83 // Assumes ResourceFetcher and Resource are non-null. | 84 // Assumes ResourceFetcher and Resource are non-null. |
84 ResourceLoader(ResourceFetcher*, Resource*); | 85 ResourceLoader(ResourceFetcher*, Resource*); |
85 | 86 |
86 void requestSynchronously(const ResourceRequest&); | 87 void requestSynchronously(const ResourceRequest&); |
87 | 88 |
88 bool responseNeedsAccessControlCheck() const; | 89 bool responseNeedsAccessControlCheck() const; |
89 | 90 |
90 OwnPtr<WebURLLoader> m_loader; | 91 std::unique_ptr<WebURLLoader> m_loader; |
91 Member<ResourceFetcher> m_fetcher; | 92 Member<ResourceFetcher> m_fetcher; |
92 Member<Resource> m_resource; | 93 Member<Resource> m_resource; |
93 }; | 94 }; |
94 | 95 |
95 } // namespace blink | 96 } // namespace blink |
96 | 97 |
97 #endif | 98 #endif |
OLD | NEW |