OLD | NEW |
| (Empty) |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | |
2 // Use of this source code is governed by a BSD-style license that can be | |
3 // found in the LICENSE file. | |
4 | |
5 #ifndef WEBKIT_MEDIA_WEB_DATA_SOURCE_H_ | |
6 #define WEBKIT_MEDIA_WEB_DATA_SOURCE_H_ | |
7 | |
8 #include "base/callback.h" | |
9 #include "media/base/data_source.h" | |
10 #include "media/base/pipeline_status.h" | |
11 | |
12 class GURL; | |
13 | |
14 namespace webkit_media { | |
15 | |
16 // An interface that allows WebMediaPlayerImpl::Proxy to communicate with the | |
17 // DataSource in the pipeline. | |
18 class WebDataSource : public media::DataSource { | |
19 public: | |
20 WebDataSource(); | |
21 virtual ~WebDataSource(); | |
22 | |
23 // Initialize this object using |url|. This object calls |callback| when | |
24 // initialization has completed. | |
25 // | |
26 // Method called on the render thread. | |
27 virtual void Initialize(const GURL& url, | |
28 const media::PipelineStatusCB& status_cb) = 0; | |
29 | |
30 // Returns true if the media resource has a single origin, false otherwise. | |
31 // | |
32 // Method called on the render thread. | |
33 virtual bool HasSingleOrigin() = 0; | |
34 | |
35 // Cancels initialization, any pending loaders, and any pending read calls | |
36 // from the demuxer. The caller is expected to release its reference to this | |
37 // object and never call it again. | |
38 // | |
39 // Method called on the render thread. | |
40 virtual void Abort() = 0; | |
41 | |
42 private: | |
43 DISALLOW_COPY_AND_ASSIGN(WebDataSource); | |
44 }; | |
45 | |
46 } // namespace webkit_media | |
47 | |
48 #endif // WEBKIT_MEDIA_WEB_DATA_SOURCE_H_ | |
OLD | NEW |