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 24 matching lines...) Expand all Loading... |
35 #include "public/platform/WebURLLoaderClient.h" | 35 #include "public/platform/WebURLLoaderClient.h" |
36 #include "wtf/Forward.h" | 36 #include "wtf/Forward.h" |
37 #include "wtf/RefCounted.h" | 37 #include "wtf/RefCounted.h" |
38 | 38 |
39 namespace blink { | 39 namespace blink { |
40 | 40 |
41 class Resource; | 41 class Resource; |
42 class KURL; | 42 class KURL; |
43 class ResourceError; | 43 class ResourceError; |
44 class ResourceLoaderHost; | 44 class ResourceLoaderHost; |
| 45 class ThreadedDataReceiver; |
45 | 46 |
46 class ResourceLoader final : public RefCountedWillBeGarbageCollectedFinalized<Re
sourceLoader>, protected WebURLLoaderClient { | 47 class ResourceLoader final : public RefCountedWillBeGarbageCollectedFinalized<Re
sourceLoader>, protected WebURLLoaderClient { |
47 public: | 48 public: |
48 static PassRefPtrWillBeRawPtr<ResourceLoader> create(ResourceLoaderHost*, Re
source*, const ResourceRequest&, const ResourceLoaderOptions&); | 49 static PassRefPtrWillBeRawPtr<ResourceLoader> create(ResourceLoaderHost*, Re
source*, const ResourceRequest&, const ResourceLoaderOptions&); |
49 virtual ~ResourceLoader(); | 50 virtual ~ResourceLoader(); |
50 void trace(Visitor*); | 51 void trace(Visitor*); |
51 | 52 |
52 void start(); | 53 void start(); |
53 void changeToSynchronous(); | 54 void changeToSynchronous(); |
54 | 55 |
55 void cancel(); | 56 void cancel(); |
56 void cancel(const ResourceError&); | 57 void cancel(const ResourceError&); |
57 void cancelIfNotFinishing(); | 58 void cancelIfNotFinishing(); |
58 | 59 |
59 Resource* cachedResource() { return m_resource; } | 60 Resource* cachedResource() { return m_resource; } |
60 const ResourceRequest& originalRequest() const { return m_originalRequest; } | 61 const ResourceRequest& originalRequest() const { return m_originalRequest; } |
61 | 62 |
62 void setDefersLoading(bool); | 63 void setDefersLoading(bool); |
63 bool defersLoading() const { return m_defersLoading; } | 64 bool defersLoading() const { return m_defersLoading; } |
64 | 65 |
65 void attachThreadedDataReceiver(PassOwnPtr<blink::WebThreadedDataReceiver>); | 66 void attachThreadedDataReceiver(PassRefPtrWillBeRawPtr<ThreadedDataReceiver>
); |
66 | 67 |
67 void releaseResources(); | 68 void releaseResources(); |
68 | 69 |
69 void didChangePriority(ResourceLoadPriority, int intraPriorityValue); | 70 void didChangePriority(ResourceLoadPriority, int intraPriorityValue); |
70 | 71 |
71 // WebURLLoaderClient | 72 // WebURLLoaderClient |
72 void willSendRequest(blink::WebURLLoader*, blink::WebURLRequest&, const blin
k::WebURLResponse& redirectResponse) override; | 73 void willSendRequest(blink::WebURLLoader*, blink::WebURLRequest&, const blin
k::WebURLResponse& redirectResponse) override; |
73 void didSendData(blink::WebURLLoader*, unsigned long long bytesSent, unsigne
d long long totalBytesToBeSent) override; | 74 void didSendData(blink::WebURLLoader*, unsigned long long bytesSent, unsigne
d long long totalBytesToBeSent) override; |
74 void didReceiveResponse(blink::WebURLLoader*, const blink::WebURLResponse&)
override; | 75 void didReceiveResponse(blink::WebURLLoader*, const blink::WebURLResponse&)
override; |
75 void didReceiveResponse(blink::WebURLLoader*, const blink::WebURLResponse&,
WebDataConsumerHandle*) override; | 76 void didReceiveResponse(blink::WebURLLoader*, const blink::WebURLResponse&,
WebDataConsumerHandle*) override; |
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
130 ResourceLoaderState m_state; | 131 ResourceLoaderState m_state; |
131 | 132 |
132 // Used for sanity checking to make sure we don't experience illegal state | 133 // Used for sanity checking to make sure we don't experience illegal state |
133 // transitions. | 134 // transitions. |
134 ConnectionState m_connectionState; | 135 ConnectionState m_connectionState; |
135 }; | 136 }; |
136 | 137 |
137 } | 138 } |
138 | 139 |
139 #endif | 140 #endif |
OLD | NEW |