OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2011 Google Inc. All rights reserved. | 2 * Copyright (C) 2011 Google 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 are | 5 * modification, are permitted provided that the following conditions are |
6 * met: | 6 * met: |
7 * | 7 * |
8 * * Redistributions of source code must retain the above copyright | 8 * * 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 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
(...skipping 17 matching lines...) Expand all Loading... |
28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
29 */ | 29 */ |
30 | 30 |
31 #ifndef ThreadableLoaderClient_h | 31 #ifndef ThreadableLoaderClient_h |
32 #define ThreadableLoaderClient_h | 32 #define ThreadableLoaderClient_h |
33 | 33 |
34 #include "core/CoreExport.h" | 34 #include "core/CoreExport.h" |
35 #include "platform/heap/Handle.h" | 35 #include "platform/heap/Handle.h" |
36 #include "public/platform/WebDataConsumerHandle.h" | 36 #include "public/platform/WebDataConsumerHandle.h" |
37 #include "wtf/Noncopyable.h" | 37 #include "wtf/Noncopyable.h" |
38 #include <memory> | 38 #include "wtf/PassOwnPtr.h" |
39 | 39 |
40 namespace blink { | 40 namespace blink { |
41 | 41 |
42 class ResourceError; | 42 class ResourceError; |
43 class ResourceResponse; | 43 class ResourceResponse; |
44 class ResourceTimingInfo; | 44 class ResourceTimingInfo; |
45 | 45 |
46 class CORE_EXPORT ThreadableLoaderClient { | 46 class CORE_EXPORT ThreadableLoaderClient { |
47 WTF_MAKE_NONCOPYABLE(ThreadableLoaderClient); | 47 WTF_MAKE_NONCOPYABLE(ThreadableLoaderClient); |
48 public: | 48 public: |
49 virtual void didSendData(unsigned long long /*bytesSent*/, unsigned long lon
g /*totalBytesToBeSent*/) { } | 49 virtual void didSendData(unsigned long long /*bytesSent*/, unsigned long lon
g /*totalBytesToBeSent*/) { } |
50 | 50 |
51 virtual void didReceiveResponse(unsigned long /*identifier*/, const Resource
Response&, std::unique_ptr<WebDataConsumerHandle>) { } | 51 virtual void didReceiveResponse(unsigned long /*identifier*/, const Resource
Response&, PassOwnPtr<WebDataConsumerHandle>) { } |
52 virtual void didReceiveData(const char*, unsigned /*dataLength*/) { } | 52 virtual void didReceiveData(const char*, unsigned /*dataLength*/) { } |
53 virtual void didReceiveCachedMetadata(const char*, int /*dataLength*/) { } | 53 virtual void didReceiveCachedMetadata(const char*, int /*dataLength*/) { } |
54 virtual void didFinishLoading(unsigned long /*identifier*/, double /*finishT
ime*/) { } | 54 virtual void didFinishLoading(unsigned long /*identifier*/, double /*finishT
ime*/) { } |
55 virtual void didFail(const ResourceError&) { } | 55 virtual void didFail(const ResourceError&) { } |
56 virtual void didFailAccessControlCheck(const ResourceError& error) { didFail
(error); } | 56 virtual void didFailAccessControlCheck(const ResourceError& error) { didFail
(error); } |
57 virtual void didFailRedirectCheck() { } | 57 virtual void didFailRedirectCheck() { } |
58 virtual void didReceiveResourceTiming(const ResourceTimingInfo&) { } | 58 virtual void didReceiveResourceTiming(const ResourceTimingInfo&) { } |
59 | 59 |
60 virtual bool isDocumentThreadableLoaderClient() { return false; } | 60 virtual bool isDocumentThreadableLoaderClient() { return false; } |
61 | 61 |
62 virtual void didDownloadData(int /*dataLength*/) { } | 62 virtual void didDownloadData(int /*dataLength*/) { } |
63 | 63 |
64 virtual ~ThreadableLoaderClient() { } | 64 virtual ~ThreadableLoaderClient() { } |
65 | 65 |
66 protected: | 66 protected: |
67 ThreadableLoaderClient() { } | 67 ThreadableLoaderClient() { } |
68 }; | 68 }; |
69 | 69 |
70 } // namespace blink | 70 } // namespace blink |
71 | 71 |
72 #endif // ThreadableLoaderClient_h | 72 #endif // ThreadableLoaderClient_h |
OLD | NEW |