| OLD | NEW |
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. Use of this | 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. Use of this |
| 2 // source code is governed by a BSD-style license that can be found in the | 2 // source code is governed by a BSD-style license that can be found in the |
| 3 // LICENSE file. | 3 // 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 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 103 | 103 |
| 104 // Returns true if network is currently active. | 104 // Returns true if network is currently active. |
| 105 virtual bool network_activity() { return !completed_ && !deferred_; } | 105 virtual bool network_activity() { return !completed_ && !deferred_; } |
| 106 | 106 |
| 107 ///////////////////////////////////////////////////////////////////////////// | 107 ///////////////////////////////////////////////////////////////////////////// |
| 108 // webkit_glue::ResourceLoaderBridge::Peer implementations. | 108 // webkit_glue::ResourceLoaderBridge::Peer implementations. |
| 109 virtual void OnUploadProgress(uint64 position, uint64 size) {} | 109 virtual void OnUploadProgress(uint64 position, uint64 size) {} |
| 110 virtual bool OnReceivedRedirect( | 110 virtual bool OnReceivedRedirect( |
| 111 const GURL& new_url, | 111 const GURL& new_url, |
| 112 const webkit_glue::ResourceLoaderBridge::ResponseInfo& info, | 112 const webkit_glue::ResourceLoaderBridge::ResponseInfo& info, |
| 113 bool* has_new_first_party_for_cookies, |
| 113 GURL* new_first_party_for_cookies); | 114 GURL* new_first_party_for_cookies); |
| 114 virtual void OnReceivedResponse( | 115 virtual void OnReceivedResponse( |
| 115 const webkit_glue::ResourceLoaderBridge::ResponseInfo& info, | 116 const webkit_glue::ResourceLoaderBridge::ResponseInfo& info, |
| 116 bool content_filtered); | 117 bool content_filtered); |
| 117 virtual void OnReceivedData(const char* data, int len); | 118 virtual void OnReceivedData(const char* data, int len); |
| 118 virtual void OnCompletedRequest(const URLRequestStatus& status, | 119 virtual void OnCompletedRequest(const URLRequestStatus& status, |
| 119 const std::string& security_info); | 120 const std::string& security_info); |
| 120 GURL GetURLForDebugging() const { return url_; } | 121 GURL GetURLForDebugging() const { return url_; } |
| 121 | 122 |
| 122 protected: | 123 protected: |
| (...skipping 265 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 388 // loop. The RepeatingTimer does PostDelayedTask() internally, by using it | 389 // loop. The RepeatingTimer does PostDelayedTask() internally, by using it |
| 389 // the message loop doesn't hold a reference for the watch dog task. | 390 // the message loop doesn't hold a reference for the watch dog task. |
| 390 base::RepeatingTimer<BufferedDataSource> watch_dog_timer_; | 391 base::RepeatingTimer<BufferedDataSource> watch_dog_timer_; |
| 391 | 392 |
| 392 DISALLOW_COPY_AND_ASSIGN(BufferedDataSource); | 393 DISALLOW_COPY_AND_ASSIGN(BufferedDataSource); |
| 393 }; | 394 }; |
| 394 | 395 |
| 395 } // namespace webkit_glue | 396 } // namespace webkit_glue |
| 396 | 397 |
| 397 #endif // WEBKIT_GLUE_MEDIA_BUFFERED_DATA_SOURCE_H_ | 398 #endif // WEBKIT_GLUE_MEDIA_BUFFERED_DATA_SOURCE_H_ |
| OLD | NEW |