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 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
44 // media::Filter implementation. | 44 // media::Filter implementation. |
45 virtual void set_host(media::FilterHost* host); | 45 virtual void set_host(media::FilterHost* host); |
46 virtual void Stop(media::FilterCallback* callback); | 46 virtual void Stop(media::FilterCallback* callback); |
47 | 47 |
48 // media::DataSource implementation. | 48 // media::DataSource implementation. |
49 virtual const media::MediaFormat& media_format(); | 49 virtual const media::MediaFormat& media_format(); |
50 virtual void Read(int64 position, size_t size, | 50 virtual void Read(int64 position, size_t size, |
51 uint8* data, ReadCallback* read_callback); | 51 uint8* data, ReadCallback* read_callback); |
52 virtual bool GetSize(int64* size_out); | 52 virtual bool GetSize(int64* size_out); |
53 virtual bool IsStreaming(); | 53 virtual bool IsStreaming(); |
| 54 virtual void SetPreload(media::Preload preload); |
54 | 55 |
55 // Used to inject a mock used for unittests. | 56 // Used to inject a mock used for unittests. |
56 virtual void SetURLLoaderForTest(WebKit::WebURLLoader* mock_loader); | 57 virtual void SetURLLoaderForTest(WebKit::WebURLLoader* mock_loader); |
57 | 58 |
58 // WebKit::WebURLLoaderClient implementations. | 59 // WebKit::WebURLLoaderClient implementations. |
59 virtual void willSendRequest( | 60 virtual void willSendRequest( |
60 WebKit::WebURLLoader* loader, | 61 WebKit::WebURLLoader* loader, |
61 WebKit::WebURLRequest& newRequest, | 62 WebKit::WebURLRequest& newRequest, |
62 const WebKit::WebURLResponse& redirectResponse); | 63 const WebKit::WebURLResponse& redirectResponse); |
63 virtual void didSendData( | 64 virtual void didSendData( |
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
139 | 140 |
140 // Used to ensure mocks for unittests are used instead of reset in Start(). | 141 // Used to ensure mocks for unittests are used instead of reset in Start(). |
141 bool keep_test_loader_; | 142 bool keep_test_loader_; |
142 | 143 |
143 DISALLOW_COPY_AND_ASSIGN(SimpleDataSource); | 144 DISALLOW_COPY_AND_ASSIGN(SimpleDataSource); |
144 }; | 145 }; |
145 | 146 |
146 } // namespace webkit_glue | 147 } // namespace webkit_glue |
147 | 148 |
148 #endif // WEBKIT_GLUE_MEDIA_SIMPLE_DATA_SOURCE_H_ | 149 #endif // WEBKIT_GLUE_MEDIA_SIMPLE_DATA_SOURCE_H_ |
OLD | NEW |