| OLD | NEW |
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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 // An extremely simple implementation of DataSource that downloads the entire | 5 // An extremely simple implementation of DataSource that downloads the entire |
| 6 // media resource into memory before signaling that initialization has finished. | 6 // media resource into memory before signaling that initialization has finished. |
| 7 // Primarily used to test <audio> and <video> with buffering/caching removed | 7 // Primarily used to test <audio> and <video> with buffering/caching removed |
| 8 // from the equation. | 8 // from the equation. |
| 9 | 9 |
| 10 #ifndef WEBKIT_GLUE_MEDIA_SIMPLE_DATA_SOURCE_H_ | 10 #ifndef WEBKIT_GLUE_MEDIA_SIMPLE_DATA_SOURCE_H_ |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 49 uint8* data, ReadCallback* read_callback); | 49 uint8* data, ReadCallback* read_callback); |
| 50 virtual bool GetSize(int64* size_out); | 50 virtual bool GetSize(int64* size_out); |
| 51 virtual bool IsStreaming(); | 51 virtual bool IsStreaming(); |
| 52 | 52 |
| 53 // webkit_glue::ResourceLoaderBridge::Peer implementation. | 53 // webkit_glue::ResourceLoaderBridge::Peer implementation. |
| 54 virtual void OnDownloadProgress(uint64 position, uint64 size); | 54 virtual void OnDownloadProgress(uint64 position, uint64 size); |
| 55 virtual void OnUploadProgress(uint64 position, uint64 size); | 55 virtual void OnUploadProgress(uint64 position, uint64 size); |
| 56 virtual bool OnReceivedRedirect( | 56 virtual bool OnReceivedRedirect( |
| 57 const GURL& new_url, | 57 const GURL& new_url, |
| 58 const webkit_glue::ResourceLoaderBridge::ResponseInfo& info, | 58 const webkit_glue::ResourceLoaderBridge::ResponseInfo& info, |
| 59 bool* has_new_first_party_for_cookies, |
| 59 GURL* new_first_party_for_cookies); | 60 GURL* new_first_party_for_cookies); |
| 60 virtual void OnReceivedResponse( | 61 virtual void OnReceivedResponse( |
| 61 const webkit_glue::ResourceLoaderBridge::ResponseInfo& info, | 62 const webkit_glue::ResourceLoaderBridge::ResponseInfo& info, |
| 62 bool content_filtered); | 63 bool content_filtered); |
| 63 virtual void OnReceivedData(const char* data, int len); | 64 virtual void OnReceivedData(const char* data, int len); |
| 64 virtual void OnCompletedRequest(const URLRequestStatus& status, | 65 virtual void OnCompletedRequest(const URLRequestStatus& status, |
| 65 const std::string& security_info); | 66 const std::string& security_info); |
| 66 virtual GURL GetURLForDebugging() const; | 67 virtual GURL GetURLForDebugging() const; |
| 67 | 68 |
| 68 private: | 69 private: |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 115 | 116 |
| 116 // Filter callbacks. | 117 // Filter callbacks. |
| 117 scoped_ptr<media::FilterCallback> initialize_callback_; | 118 scoped_ptr<media::FilterCallback> initialize_callback_; |
| 118 | 119 |
| 119 DISALLOW_COPY_AND_ASSIGN(SimpleDataSource); | 120 DISALLOW_COPY_AND_ASSIGN(SimpleDataSource); |
| 120 }; | 121 }; |
| 121 | 122 |
| 122 } // namespace webkit_glue | 123 } // namespace webkit_glue |
| 123 | 124 |
| 124 #endif // WEBKIT_GLUE_MEDIA_SIMPLE_DATA_SOURCE_H_ | 125 #endif // WEBKIT_GLUE_MEDIA_SIMPLE_DATA_SOURCE_H_ |
| OLD | NEW |