| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 WEBKIT_GLUE_MEDIA_BUFFERED_DATA_SOURCE_H_ | 5 #ifndef WEBKIT_GLUE_MEDIA_BUFFERED_DATA_SOURCE_H_ |
| 6 #define WEBKIT_GLUE_MEDIA_BUFFERED_DATA_SOURCE_H_ | 6 #define WEBKIT_GLUE_MEDIA_BUFFERED_DATA_SOURCE_H_ |
| 7 | 7 |
| 8 #include <algorithm> | 8 #include <algorithm> |
| 9 #include <string> | 9 #include <string> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 111 // webkit_glue::ResourceLoaderBridge::Peer implementations. | 111 // webkit_glue::ResourceLoaderBridge::Peer implementations. |
| 112 virtual void OnUploadProgress(uint64 position, uint64 size) {} | 112 virtual void OnUploadProgress(uint64 position, uint64 size) {} |
| 113 virtual bool OnReceivedRedirect( | 113 virtual bool OnReceivedRedirect( |
| 114 const GURL& new_url, | 114 const GURL& new_url, |
| 115 const webkit_glue::ResourceLoaderBridge::ResponseInfo& info, | 115 const webkit_glue::ResourceLoaderBridge::ResponseInfo& info, |
| 116 bool* has_new_first_party_for_cookies, | 116 bool* has_new_first_party_for_cookies, |
| 117 GURL* new_first_party_for_cookies); | 117 GURL* new_first_party_for_cookies); |
| 118 virtual void OnReceivedResponse( | 118 virtual void OnReceivedResponse( |
| 119 const webkit_glue::ResourceLoaderBridge::ResponseInfo& info, | 119 const webkit_glue::ResourceLoaderBridge::ResponseInfo& info, |
| 120 bool content_filtered); | 120 bool content_filtered); |
| 121 virtual void OnDownloadedData(int len) {} |
| 121 virtual void OnReceivedData(const char* data, int len); | 122 virtual void OnReceivedData(const char* data, int len); |
| 122 virtual void OnCompletedRequest(const URLRequestStatus& status, | 123 virtual void OnCompletedRequest(const URLRequestStatus& status, |
| 123 const std::string& security_info); | 124 const std::string& security_info); |
| 124 GURL GetURLForDebugging() const { return url_; } | 125 GURL GetURLForDebugging() const { return url_; } |
| 125 | 126 |
| 126 protected: | 127 protected: |
| 127 friend class base::RefCountedThreadSafe<BufferedResourceLoader>; | 128 friend class base::RefCountedThreadSafe<BufferedResourceLoader>; |
| 128 | 129 |
| 129 virtual ~BufferedResourceLoader(); | 130 virtual ~BufferedResourceLoader(); |
| 130 | 131 |
| (...skipping 273 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 404 // loop. The RepeatingTimer does PostDelayedTask() internally, by using it | 405 // loop. The RepeatingTimer does PostDelayedTask() internally, by using it |
| 405 // the message loop doesn't hold a reference for the watch dog task. | 406 // the message loop doesn't hold a reference for the watch dog task. |
| 406 base::RepeatingTimer<BufferedDataSource> watch_dog_timer_; | 407 base::RepeatingTimer<BufferedDataSource> watch_dog_timer_; |
| 407 | 408 |
| 408 DISALLOW_COPY_AND_ASSIGN(BufferedDataSource); | 409 DISALLOW_COPY_AND_ASSIGN(BufferedDataSource); |
| 409 }; | 410 }; |
| 410 | 411 |
| 411 } // namespace webkit_glue | 412 } // namespace webkit_glue |
| 412 | 413 |
| 413 #endif // WEBKIT_GLUE_MEDIA_BUFFERED_DATA_SOURCE_H_ | 414 #endif // WEBKIT_GLUE_MEDIA_BUFFERED_DATA_SOURCE_H_ |
| OLD | NEW |