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 SimNetwork_h | 5 #ifndef SimNetwork_h |
6 #define SimNetwork_h | 6 #define SimNetwork_h |
7 | 7 |
8 #include "public/platform/WebURLLoaderTestDelegate.h" | 8 #include "public/platform/WebURLLoaderTestDelegate.h" |
9 #include "wtf/HashMap.h" | 9 #include "wtf/HashMap.h" |
10 #include "wtf/text/StringHash.h" | 10 #include "wtf/text/StringHash.h" |
(...skipping 20 matching lines...) Expand all Loading... |
31 | 31 |
32 void servePendingRequests(); | 32 void servePendingRequests(); |
33 void addRequest(SimRequest&); | 33 void addRequest(SimRequest&); |
34 void removeRequest(SimRequest&); | 34 void removeRequest(SimRequest&); |
35 | 35 |
36 // WebURLLoaderTestDelegate | 36 // WebURLLoaderTestDelegate |
37 void didReceiveResponse(WebURLLoaderClient*, | 37 void didReceiveResponse(WebURLLoaderClient*, |
38 const WebURLResponse&) override; | 38 const WebURLResponse&) override; |
39 void didReceiveData(WebURLLoaderClient*, | 39 void didReceiveData(WebURLLoaderClient*, |
40 const char* data, | 40 const char* data, |
41 int dataLength, | 41 int dataLength) override; |
42 int encodedDataLength) override; | |
43 void didFail(WebURLLoaderClient*, | 42 void didFail(WebURLLoaderClient*, |
44 const WebURLError&, | 43 const WebURLError&, |
45 int64_t totalEncodedDataLength, | 44 int64_t totalEncodedDataLength, |
46 int64_t totalEncodedBodyLength) override; | 45 int64_t totalEncodedBodyLength) override; |
47 void didFinishLoading(WebURLLoaderClient*, | 46 void didFinishLoading(WebURLLoaderClient*, |
48 double finishTime, | 47 double finishTime, |
49 int64_t totalEncodedDataLength, | 48 int64_t totalEncodedDataLength, |
50 int64_t totalEncodedBodyLength) override; | 49 int64_t totalEncodedBodyLength) override; |
51 | 50 |
52 SimRequest* m_currentRequest; | 51 SimRequest* m_currentRequest; |
53 HashMap<String, SimRequest*> m_requests; | 52 HashMap<String, SimRequest*> m_requests; |
54 }; | 53 }; |
55 | 54 |
56 } // namespace blink | 55 } // namespace blink |
57 | 56 |
58 #endif | 57 #endif |
OLD | NEW |