| 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 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 110 virtual void OnUploadProgress(uint64 position, uint64 size) {} | 110 virtual void OnUploadProgress(uint64 position, uint64 size) {} |
| 111 virtual bool OnReceivedRedirect( | 111 virtual bool OnReceivedRedirect( |
| 112 const GURL& new_url, | 112 const GURL& new_url, |
| 113 const webkit_glue::ResourceLoaderBridge::ResponseInfo& info); | 113 const webkit_glue::ResourceLoaderBridge::ResponseInfo& info); |
| 114 virtual void OnReceivedResponse( | 114 virtual void OnReceivedResponse( |
| 115 const webkit_glue::ResourceLoaderBridge::ResponseInfo& info, | 115 const webkit_glue::ResourceLoaderBridge::ResponseInfo& info, |
| 116 bool content_filtered); | 116 bool content_filtered); |
| 117 virtual void OnReceivedData(const char* data, int len); | 117 virtual void OnReceivedData(const char* data, int len); |
| 118 virtual void OnCompletedRequest(const URLRequestStatus& status, | 118 virtual void OnCompletedRequest(const URLRequestStatus& status, |
| 119 const std::string& security_info); | 119 const std::string& security_info); |
| 120 std::string GetURLForDebugging() { return url_.spec(); } | 120 GURL GetURLForDebugging() const { return url_; } |
| 121 | 121 |
| 122 protected: | 122 protected: |
| 123 // An empty constructor so mock classes can be constructed. | 123 // An empty constructor so mock classes can be constructed. |
| 124 BufferedResourceLoader() { | 124 BufferedResourceLoader() { |
| 125 } | 125 } |
| 126 | 126 |
| 127 private: | 127 private: |
| 128 // Defer the resource loading if the buffer is full. | 128 // Defer the resource loading if the buffer is full. |
| 129 void EnableDeferIfNeeded(); | 129 void EnableDeferIfNeeded(); |
| 130 | 130 |
| (...skipping 252 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 383 // loop. The RepeatingTimer does PostDelayedTask() internally, by using it | 383 // loop. The RepeatingTimer does PostDelayedTask() internally, by using it |
| 384 // the message loop doesn't hold a reference for the watch dog task. | 384 // the message loop doesn't hold a reference for the watch dog task. |
| 385 base::RepeatingTimer<BufferedDataSource> watch_dog_timer_; | 385 base::RepeatingTimer<BufferedDataSource> watch_dog_timer_; |
| 386 | 386 |
| 387 DISALLOW_COPY_AND_ASSIGN(BufferedDataSource); | 387 DISALLOW_COPY_AND_ASSIGN(BufferedDataSource); |
| 388 }; | 388 }; |
| 389 | 389 |
| 390 } // namespace webkit_glue | 390 } // namespace webkit_glue |
| 391 | 391 |
| 392 #endif // WEBKIT_GLUE_MEDIA_BUFFERED_DATA_SOURCE_H_ | 392 #endif // WEBKIT_GLUE_MEDIA_BUFFERED_DATA_SOURCE_H_ |
| OLD | NEW |