| 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 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 102 virtual bool partial_response() { return partial_response_; } | 102 virtual bool partial_response() { return partial_response_; } |
| 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 GURL* new_first_party_for_cookies); |
| 113 virtual void OnReceivedResponse( | 114 virtual void OnReceivedResponse( |
| 114 const webkit_glue::ResourceLoaderBridge::ResponseInfo& info, | 115 const webkit_glue::ResourceLoaderBridge::ResponseInfo& info, |
| 115 bool content_filtered); | 116 bool content_filtered); |
| 116 virtual void OnReceivedData(const char* data, int len); | 117 virtual void OnReceivedData(const char* data, int len); |
| 117 virtual void OnCompletedRequest(const URLRequestStatus& status, | 118 virtual void OnCompletedRequest(const URLRequestStatus& status, |
| 118 const std::string& security_info); | 119 const std::string& security_info); |
| 119 GURL GetURLForDebugging() const { return url_; } | 120 GURL GetURLForDebugging() const { return url_; } |
| 120 | 121 |
| 121 protected: | 122 protected: |
| 122 friend class base::RefCountedThreadSafe<BufferedResourceLoader>; | 123 friend class base::RefCountedThreadSafe<BufferedResourceLoader>; |
| (...skipping 264 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 387 // loop. The RepeatingTimer does PostDelayedTask() internally, by using it | 388 // loop. The RepeatingTimer does PostDelayedTask() internally, by using it |
| 388 // the message loop doesn't hold a reference for the watch dog task. | 389 // the message loop doesn't hold a reference for the watch dog task. |
| 389 base::RepeatingTimer<BufferedDataSource> watch_dog_timer_; | 390 base::RepeatingTimer<BufferedDataSource> watch_dog_timer_; |
| 390 | 391 |
| 391 DISALLOW_COPY_AND_ASSIGN(BufferedDataSource); | 392 DISALLOW_COPY_AND_ASSIGN(BufferedDataSource); |
| 392 }; | 393 }; |
| 393 | 394 |
| 394 } // namespace webkit_glue | 395 } // namespace webkit_glue |
| 395 | 396 |
| 396 #endif // WEBKIT_GLUE_MEDIA_BUFFERED_DATA_SOURCE_H_ | 397 #endif // WEBKIT_GLUE_MEDIA_BUFFERED_DATA_SOURCE_H_ |
| OLD | NEW |