OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
50 // media::Filter implementation. | 50 // media::Filter implementation. |
51 virtual void set_host(media::FilterHost* host); | 51 virtual void set_host(media::FilterHost* host); |
52 virtual void Stop(media::FilterCallback* callback); | 52 virtual void Stop(media::FilterCallback* callback); |
53 | 53 |
54 // media::DataSource implementation. | 54 // media::DataSource implementation. |
55 virtual void Read(int64 position, size_t size, | 55 virtual void Read(int64 position, size_t size, |
56 uint8* data, ReadCallback* read_callback); | 56 uint8* data, ReadCallback* read_callback); |
57 virtual bool GetSize(int64* size_out); | 57 virtual bool GetSize(int64* size_out); |
58 virtual bool IsStreaming(); | 58 virtual bool IsStreaming(); |
59 virtual void SetPreload(media::Preload preload); | 59 virtual void SetPreload(media::Preload preload); |
| 60 virtual void SetBitrate(int bitrate); |
60 | 61 |
61 // Used to inject a mock used for unittests. | 62 // Used to inject a mock used for unittests. |
62 virtual void SetURLLoaderForTest(WebKit::WebURLLoader* mock_loader); | 63 virtual void SetURLLoaderForTest(WebKit::WebURLLoader* mock_loader); |
63 | 64 |
64 // WebKit::WebURLLoaderClient implementations. | 65 // WebKit::WebURLLoaderClient implementations. |
65 virtual void willSendRequest( | 66 virtual void willSendRequest( |
66 WebKit::WebURLLoader* loader, | 67 WebKit::WebURLLoader* loader, |
67 WebKit::WebURLRequest& newRequest, | 68 WebKit::WebURLRequest& newRequest, |
68 const WebKit::WebURLResponse& redirectResponse); | 69 const WebKit::WebURLResponse& redirectResponse); |
69 virtual void didSendData( | 70 virtual void didSendData( |
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
142 | 143 |
143 // Used to ensure mocks for unittests are used instead of reset in Start(). | 144 // Used to ensure mocks for unittests are used instead of reset in Start(). |
144 bool keep_test_loader_; | 145 bool keep_test_loader_; |
145 | 146 |
146 DISALLOW_COPY_AND_ASSIGN(SimpleDataSource); | 147 DISALLOW_COPY_AND_ASSIGN(SimpleDataSource); |
147 }; | 148 }; |
148 | 149 |
149 } // namespace webkit_glue | 150 } // namespace webkit_glue |
150 | 151 |
151 #endif // WEBKIT_GLUE_MEDIA_SIMPLE_DATA_SOURCE_H_ | 152 #endif // WEBKIT_GLUE_MEDIA_SIMPLE_DATA_SOURCE_H_ |
OLD | NEW |