OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef SimRequest_h | 5 #ifndef SimRequest_h |
6 #define SimRequest_h | 6 #define SimRequest_h |
7 | 7 |
8 #include "public/platform/WebURLError.h" | 8 #include "public/platform/WebURLError.h" |
9 #include "public/platform/WebURLResponse.h" | 9 #include "public/platform/WebURLResponse.h" |
10 #include "wtf/text/WTFString.h" | 10 #include "wtf/text/WTFString.h" |
(...skipping 29 matching lines...) Expand all Loading... |
40 const String& url() const { return m_url; } | 40 const String& url() const { return m_url; } |
41 const WebURLError& error() const { return m_error; } | 41 const WebURLError& error() const { return m_error; } |
42 const WebURLResponse& response() const { return m_response; } | 42 const WebURLResponse& response() const { return m_response; } |
43 | 43 |
44 private: | 44 private: |
45 friend class SimNetwork; | 45 friend class SimNetwork; |
46 | 46 |
47 void reset(); | 47 void reset(); |
48 | 48 |
49 // Used by SimNetwork. | 49 // Used by SimNetwork. |
50 void didReceiveResponse(WebURLLoaderClient*, | 50 void didReceiveResponse(WebURLLoaderClient*, const WebURLResponse&); |
51 const WebURLResponse&); | |
52 void didFail(const WebURLError&); | 51 void didFail(const WebURLError&); |
53 | 52 |
54 String m_url; | 53 String m_url; |
55 WebURLLoader* m_loader; | 54 WebURLLoader* m_loader; |
56 WebURLResponse m_response; | 55 WebURLResponse m_response; |
57 WebURLError m_error; | 56 WebURLError m_error; |
58 WebURLLoaderClient* m_client; | 57 WebURLLoaderClient* m_client; |
59 unsigned m_totalEncodedDataLength; | 58 unsigned m_totalEncodedDataLength; |
60 bool m_isReady; | 59 bool m_isReady; |
61 }; | 60 }; |
62 | 61 |
63 } // namespace blink | 62 } // namespace blink |
64 | 63 |
65 #endif | 64 #endif |
OLD | NEW |