| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2009, 2012 Google Inc. All rights reserved. | 2 * Copyright (C) 2009, 2012 Google Inc. All rights reserved. |
| 3 * Copyright (C) 2013, Intel Corporation | 3 * Copyright (C) 2013, Intel Corporation |
| 4 * | 4 * |
| 5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
| 6 * modification, are permitted provided that the following conditions are | 6 * modification, are permitted provided that the following conditions are |
| 7 * met: | 7 * met: |
| 8 * | 8 * |
| 9 * * Redistributions of source code must retain the above copyright | 9 * * Redistributions of source code must retain the above copyright |
| 10 * notice, this list of conditions and the following disclaimer. | 10 * notice, this list of conditions and the following disclaimer. |
| (...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 82 void notifyFinished(Resource*) override; | 82 void notifyFinished(Resource*) override; |
| 83 | 83 |
| 84 String debugName() const override { return "DocumentThreadableLoader"; } | 84 String debugName() const override { return "DocumentThreadableLoader"; } |
| 85 | 85 |
| 86 // RawResourceClient | 86 // RawResourceClient |
| 87 // | 87 // |
| 88 // |this| may be dead after calling these methods. | 88 // |this| may be dead after calling these methods. |
| 89 void dataSent(Resource*, unsigned long long bytesSent, unsigned long lon
g totalBytesToBeSent) override; | 89 void dataSent(Resource*, unsigned long long bytesSent, unsigned long lon
g totalBytesToBeSent) override; |
| 90 void responseReceived(Resource*, const ResourceResponse&, PassOwnPtr<Web
DataConsumerHandle>) override; | 90 void responseReceived(Resource*, const ResourceResponse&, PassOwnPtr<Web
DataConsumerHandle>) override; |
| 91 void setSerializedCachedMetadata(Resource*, const char*, size_t) overrid
e; | 91 void setSerializedCachedMetadata(Resource*, const char*, size_t) overrid
e; |
| 92 void dataReceived(Resource*, const char* data, unsigned dataLength) over
ride; | 92 void dataReceived(Resource*, const char* data, size_t dataLength) overri
de; |
| 93 void redirectReceived(Resource*, ResourceRequest&, const ResourceRespons
e&) override; | 93 void redirectReceived(Resource*, ResourceRequest&, const ResourceRespons
e&) override; |
| 94 void dataDownloaded(Resource*, int) override; | 94 void dataDownloaded(Resource*, int) override; |
| 95 void didReceiveResourceTiming(Resource*, const ResourceTimingInfo&) over
ride; | 95 void didReceiveResourceTiming(Resource*, const ResourceTimingInfo&) over
ride; |
| 96 | 96 |
| 97 // |this| may be dead after calling this method in async mode. | 97 // |this| may be dead after calling this method in async mode. |
| 98 void cancelWithError(const ResourceError&); | 98 void cancelWithError(const ResourceError&); |
| 99 | 99 |
| 100 // Notify Inspector and log to console about resource response. Use | 100 // Notify Inspector and log to console about resource response. Use |
| 101 // this method if response is not going to be finished normally. | 101 // this method if response is not going to be finished normally. |
| 102 void reportResponseReceived(unsigned long identifier, const ResourceResp
onse&); | 102 void reportResponseReceived(unsigned long identifier, const ResourceResp
onse&); |
| 103 | 103 |
| 104 // Methods containing code to handle resource fetch results which are | 104 // Methods containing code to handle resource fetch results which are |
| 105 // common to both sync and async mode. | 105 // common to both sync and async mode. |
| 106 // | 106 // |
| 107 // |this| may be dead after calling these method in async mode. | 107 // |this| may be dead after calling these method in async mode. |
| 108 void handleResponse(unsigned long identifier, const ResourceResponse&, P
assOwnPtr<WebDataConsumerHandle>); | 108 void handleResponse(unsigned long identifier, const ResourceResponse&, P
assOwnPtr<WebDataConsumerHandle>); |
| 109 void handleReceivedData(const char* data, unsigned dataLength); | 109 void handleReceivedData(const char* data, size_t dataLength); |
| 110 void handleSuccessfulFinish(unsigned long identifier, double finishTime)
; | 110 void handleSuccessfulFinish(unsigned long identifier, double finishTime)
; |
| 111 | 111 |
| 112 // |this| may be dead after calling this method. | 112 // |this| may be dead after calling this method. |
| 113 void didTimeout(Timer<DocumentThreadableLoader>*); | 113 void didTimeout(Timer<DocumentThreadableLoader>*); |
| 114 // Calls the appropriate loading method according to policy and data | 114 // Calls the appropriate loading method according to policy and data |
| 115 // about origin. Only for handling the initial load (including fallback | 115 // about origin. Only for handling the initial load (including fallback |
| 116 // after consulting ServiceWorker). | 116 // after consulting ServiceWorker). |
| 117 // | 117 // |
| 118 // |this| may be dead after calling this method in async mode. | 118 // |this| may be dead after calling this method in async mode. |
| 119 void dispatchInitialRequest(const ResourceRequest&); | 119 void dispatchInitialRequest(const ResourceRequest&); |
| (...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 196 // But this value is not the max number of total redirects allowed, | 196 // But this value is not the max number of total redirects allowed, |
| 197 // because same-origin redirects are not counted here. | 197 // because same-origin redirects are not counted here. |
| 198 int m_corsRedirectLimit; | 198 int m_corsRedirectLimit; |
| 199 | 199 |
| 200 const WebURLRequest::FetchRedirectMode m_redirectMode; | 200 const WebURLRequest::FetchRedirectMode m_redirectMode; |
| 201 }; | 201 }; |
| 202 | 202 |
| 203 } // namespace blink | 203 } // namespace blink |
| 204 | 204 |
| 205 #endif // DocumentThreadableLoader_h | 205 #endif // DocumentThreadableLoader_h |
| OLD | NEW |