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 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
74 // RawResourceClient implementation | 74 // RawResourceClient implementation |
75 virtual void dataSent(Resource*, unsigned long long bytesSent, unsigned
long long totalBytesToBeSent) OVERRIDE; | 75 virtual void dataSent(Resource*, unsigned long long bytesSent, unsigned
long long totalBytesToBeSent) OVERRIDE; |
76 virtual void responseReceived(Resource*, const ResourceResponse&) OVERRI
DE; | 76 virtual void responseReceived(Resource*, const ResourceResponse&) OVERRI
DE; |
77 virtual void dataReceived(Resource*, const char* data, int dataLength) O
VERRIDE; | 77 virtual void dataReceived(Resource*, const char* data, int dataLength) O
VERRIDE; |
78 virtual void redirectReceived(Resource*, ResourceRequest&, const Resourc
eResponse&) OVERRIDE; | 78 virtual void redirectReceived(Resource*, ResourceRequest&, const Resourc
eResponse&) OVERRIDE; |
79 virtual void notifyFinished(Resource*) OVERRIDE; | 79 virtual void notifyFinished(Resource*) OVERRIDE; |
80 virtual void dataDownloaded(Resource*, int) OVERRIDE; | 80 virtual void dataDownloaded(Resource*, int) OVERRIDE; |
81 | 81 |
82 void cancelWithError(const ResourceError&); | 82 void cancelWithError(const ResourceError&); |
83 | 83 |
| 84 // Notify Inspector about resource response. Use this method if response
is not going to be finished normally. |
| 85 void notifyResponseReceived(unsigned long identifier, const ResourceResp
onse&); |
| 86 |
84 // Methods containing code to handle resource fetch results which is | 87 // Methods containing code to handle resource fetch results which is |
85 // common to both sync and async mode. | 88 // common to both sync and async mode. |
86 void handleResponse(unsigned long identifier, const ResourceResponse&); | 89 void handleResponse(unsigned long identifier, const ResourceResponse&); |
87 void handleReceivedData(const char* data, int dataLength); | 90 void handleReceivedData(const char* data, int dataLength); |
88 void handleSuccessfulFinish(unsigned long identifier, double finishTime)
; | 91 void handleSuccessfulFinish(unsigned long identifier, double finishTime)
; |
89 | 92 |
90 void didTimeout(Timer<DocumentThreadableLoader>*); | 93 void didTimeout(Timer<DocumentThreadableLoader>*); |
91 void makeCrossOriginAccessRequest(const ResourceRequest&); | 94 void makeCrossOriginAccessRequest(const ResourceRequest&); |
92 // Loads m_actualRequest. | 95 // Loads m_actualRequest. |
93 void loadActualRequest(); | 96 void loadActualRequest(); |
94 // Clears m_actualRequest and reports access control check failure to | 97 // Clears m_actualRequest and reports access control check failure to |
95 // m_client. | 98 // m_client. |
96 void handlePreflightFailure(const String& url, const String& errorDescri
ption); | 99 void handlePreflightFailure(const String& url, const String& errorDescri
ption); |
97 // Investigates the response for the preflight request. If successful, | 100 // Investigates the response for the preflight request. If successful, |
98 // the actual request will be made later in handleSuccessfulFinish(). | 101 // the actual request will be made later in handleSuccessfulFinish(). |
99 void handlePreflightResponse(unsigned long identifier, const ResourceRes
ponse&); | 102 void handlePreflightResponse(const ResourceResponse&); |
100 | 103 |
101 void loadRequest(const ResourceRequest&, ResourceLoaderOptions); | 104 void loadRequest(const ResourceRequest&, ResourceLoaderOptions); |
102 bool isAllowedRedirect(const KURL&) const; | 105 bool isAllowedRedirect(const KURL&) const; |
103 bool isAllowedByPolicy(const KURL&) const; | 106 bool isAllowedByPolicy(const KURL&) const; |
104 // Returns DoNotAllowStoredCredentials | 107 // Returns DoNotAllowStoredCredentials |
105 // if m_forceDoNotAllowStoredCredentials is set. Otherwise, just | 108 // if m_forceDoNotAllowStoredCredentials is set. Otherwise, just |
106 // returns allowCredentials value of m_resourceLoaderOptions. | 109 // returns allowCredentials value of m_resourceLoaderOptions. |
107 StoredCredentials effectiveAllowCredentials() const; | 110 StoredCredentials effectiveAllowCredentials() const; |
108 | 111 |
109 SecurityOrigin* securityOrigin() const; | 112 SecurityOrigin* securityOrigin() const; |
(...skipping 20 matching lines...) Expand all Loading... |
130 OwnPtr<ResourceLoaderOptions> m_actualOptions; | 133 OwnPtr<ResourceLoaderOptions> m_actualOptions; |
131 | 134 |
132 HTTPHeaderMap m_simpleRequestHeaders; // stores simple request headers i
n case of a cross-origin redirect. | 135 HTTPHeaderMap m_simpleRequestHeaders; // stores simple request headers i
n case of a cross-origin redirect. |
133 Timer<DocumentThreadableLoader> m_timeoutTimer; | 136 Timer<DocumentThreadableLoader> m_timeoutTimer; |
134 double m_requestStartedSeconds; // Time an asynchronous fetch request is
started | 137 double m_requestStartedSeconds; // Time an asynchronous fetch request is
started |
135 }; | 138 }; |
136 | 139 |
137 } // namespace blink | 140 } // namespace blink |
138 | 141 |
139 #endif // DocumentThreadableLoader_h | 142 #endif // DocumentThreadableLoader_h |
OLD | NEW |