| 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 21 matching lines...) Expand all Loading... |
| 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 <memory> |
| 39 | 39 |
| 40 namespace blink { | 40 namespace blink { |
| 41 | 41 |
| 42 class KURL; |
| 42 class ResourceError; | 43 class ResourceError; |
| 43 class ResourceResponse; | 44 class ResourceResponse; |
| 44 class ResourceTimingInfo; | 45 class ResourceTimingInfo; |
| 45 | 46 |
| 46 class CORE_EXPORT ThreadableLoaderClient { | 47 class CORE_EXPORT ThreadableLoaderClient { |
| 47 WTF_MAKE_NONCOPYABLE(ThreadableLoaderClient); | 48 WTF_MAKE_NONCOPYABLE(ThreadableLoaderClient); |
| 48 | 49 |
| 49 public: | 50 public: |
| 50 virtual void didSendData(unsigned long long /*bytesSent*/, | 51 virtual void didSendData(unsigned long long /*bytesSent*/, |
| 51 unsigned long long /*totalBytesToBeSent*/) {} | 52 unsigned long long /*totalBytesToBeSent*/) {} |
| 52 | 53 virtual void didReceiveRedirectTo(const KURL&) {} |
| 53 virtual void didReceiveResponse(unsigned long /*identifier*/, | 54 virtual void didReceiveResponse(unsigned long /*identifier*/, |
| 54 const ResourceResponse&, | 55 const ResourceResponse&, |
| 55 std::unique_ptr<WebDataConsumerHandle>) {} | 56 std::unique_ptr<WebDataConsumerHandle>) {} |
| 56 virtual void didReceiveData(const char*, unsigned /*dataLength*/) {} | 57 virtual void didReceiveData(const char*, unsigned /*dataLength*/) {} |
| 57 virtual void didReceiveCachedMetadata(const char*, int /*dataLength*/) {} | 58 virtual void didReceiveCachedMetadata(const char*, int /*dataLength*/) {} |
| 58 virtual void didFinishLoading(unsigned long /*identifier*/, | 59 virtual void didFinishLoading(unsigned long /*identifier*/, |
| 59 double /*finishTime*/) {} | 60 double /*finishTime*/) {} |
| 60 virtual void didFail(const ResourceError&) {} | 61 virtual void didFail(const ResourceError&) {} |
| 61 virtual void didFailAccessControlCheck(const ResourceError& error) { | 62 virtual void didFailAccessControlCheck(const ResourceError& error) { |
| 62 didFail(error); | 63 didFail(error); |
| 63 } | 64 } |
| 64 virtual void didFailRedirectCheck() {} | 65 virtual void didFailRedirectCheck() {} |
| 65 virtual void didReceiveResourceTiming(const ResourceTimingInfo&) {} | 66 virtual void didReceiveResourceTiming(const ResourceTimingInfo&) {} |
| 66 | 67 |
| 67 virtual bool isDocumentThreadableLoaderClient() { return false; } | 68 virtual bool isDocumentThreadableLoaderClient() { return false; } |
| 68 | 69 |
| 69 virtual void didDownloadData(int /*dataLength*/) {} | 70 virtual void didDownloadData(int /*dataLength*/) {} |
| 70 | 71 |
| 71 virtual ~ThreadableLoaderClient() {} | 72 virtual ~ThreadableLoaderClient() {} |
| 72 | 73 |
| 73 protected: | 74 protected: |
| 74 ThreadableLoaderClient() {} | 75 ThreadableLoaderClient() {} |
| 75 }; | 76 }; |
| 76 | 77 |
| 77 } // namespace blink | 78 } // namespace blink |
| 78 | 79 |
| 79 #endif // ThreadableLoaderClient_h | 80 #endif // ThreadableLoaderClient_h |
| OLD | NEW |