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 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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 virtual void OnReceivedResponse( | 59 virtual void OnReceivedResponse( |
60 const webkit_glue::ResourceLoaderBridge::ResponseInfo& info, | 60 const webkit_glue::ResourceLoaderBridge::ResponseInfo& info, |
61 bool content_filtered); | 61 bool content_filtered); |
62 virtual void OnReceivedData(const char* data, int len); | 62 virtual void OnReceivedData(const char* data, int len); |
63 virtual void OnCompletedRequest(const URLRequestStatus& status, | 63 virtual void OnCompletedRequest(const URLRequestStatus& status, |
64 const std::string& security_info); | 64 const std::string& security_info); |
65 virtual std::string GetURLForDebugging(); | 65 virtual GURL GetURLForDebugging() const; |
66 | 66 |
67 private: | 67 private: |
68 friend class media::FilterFactoryImpl2< | 68 friend class media::FilterFactoryImpl2< |
69 SimpleDataSource, | 69 SimpleDataSource, |
70 MessageLoop*, | 70 MessageLoop*, |
71 webkit_glue::MediaResourceLoaderBridgeFactory*>; | 71 webkit_glue::MediaResourceLoaderBridgeFactory*>; |
72 SimpleDataSource( | 72 SimpleDataSource( |
73 MessageLoop* render_loop, | 73 MessageLoop* render_loop, |
74 webkit_glue::MediaResourceLoaderBridgeFactory* bridge_factory); | 74 webkit_glue::MediaResourceLoaderBridgeFactory* bridge_factory); |
75 virtual ~SimpleDataSource(); | 75 virtual ~SimpleDataSource(); |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
114 | 114 |
115 // Filter callbacks. | 115 // Filter callbacks. |
116 scoped_ptr<media::FilterCallback> initialize_callback_; | 116 scoped_ptr<media::FilterCallback> initialize_callback_; |
117 | 117 |
118 DISALLOW_COPY_AND_ASSIGN(SimpleDataSource); | 118 DISALLOW_COPY_AND_ASSIGN(SimpleDataSource); |
119 }; | 119 }; |
120 | 120 |
121 } // namespace webkit_glue | 121 } // namespace webkit_glue |
122 | 122 |
123 #endif // WEBKIT_GLUE_MEDIA_SIMPLE_DATA_SOURCE_H_ | 123 #endif // WEBKIT_GLUE_MEDIA_SIMPLE_DATA_SOURCE_H_ |
OLD | NEW |