OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 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 | 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 #ifndef WEBKIT_MEDIA_ANDROID_WEBMEDIAPLAYER_PROXY_ANDROID_H_ | 5 #ifndef WEBKIT_MEDIA_ANDROID_WEBMEDIAPLAYER_PROXY_ANDROID_H_ |
6 #define WEBKIT_MEDIA_ANDROID_WEBMEDIAPLAYER_PROXY_ANDROID_H_ | 6 #define WEBKIT_MEDIA_ANDROID_WEBMEDIAPLAYER_PROXY_ANDROID_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/time.h" | 10 #include "base/time.h" |
11 #include "googleurl/src/gurl.h" | 11 #include "googleurl/src/gurl.h" |
| 12 #include "media/base/android/media_player_bridge.h" |
12 #if defined(GOOGLE_TV) | 13 #if defined(GOOGLE_TV) |
13 #include "media/base/android/demuxer_stream_player_params.h" | 14 #include "media/base/android/demuxer_stream_player_params.h" |
14 #endif | 15 #endif |
15 | 16 |
16 namespace webkit_media { | 17 namespace webkit_media { |
17 | 18 |
18 // An interface to facilitate the IPC between the browser side | 19 // An interface to facilitate the IPC between the browser side |
19 // android::MediaPlayer and the WebMediaPlayerImplAndroid in the renderer | 20 // android::MediaPlayer and the WebMediaPlayerAndroid in the renderer |
20 // process. | 21 // process. |
21 // Implementation is provided by content::WebMediaPlayerProxyImplAndroid. | 22 // Implementation is provided by content::WebMediaPlayerProxyImplAndroid. |
22 class WebMediaPlayerProxyAndroid { | 23 class WebMediaPlayerProxyAndroid { |
23 public: | 24 public: |
24 virtual ~WebMediaPlayerProxyAndroid(); | 25 virtual ~WebMediaPlayerProxyAndroid(); |
25 | 26 |
26 // Initialize a MediaPlayerBridge object in browser process | 27 // Initialize a MediaPlayerBridge object in browser process |
27 virtual void Initialize(int player_id, const GURL& url, | 28 virtual void Initialize(int player_id, |
28 bool is_media_source, | 29 const GURL& url, |
| 30 media::MediaPlayerBridge::MediaSource media_source, |
29 const GURL& first_party_for_cookies) = 0; | 31 const GURL& first_party_for_cookies) = 0; |
30 | 32 |
31 // Start the player. | 33 // Start the player. |
32 virtual void Start(int player_id) = 0; | 34 virtual void Start(int player_id) = 0; |
33 | 35 |
34 // Pause the player. | 36 // Pause the player. |
35 virtual void Pause(int player_id) = 0; | 37 virtual void Pause(int player_id) = 0; |
36 | 38 |
37 // Perform seek on the player. | 39 // Perform seek on the player. |
38 virtual void Seek(int player_id, base::TimeDelta time) = 0; | 40 virtual void Seek(int player_id, base::TimeDelta time) = 0; |
(...skipping 22 matching lines...) Expand all Loading... |
61 // Return the data to the media source player when data is ready. | 63 // Return the data to the media source player when data is ready. |
62 virtual void ReadFromDemuxerAck( | 64 virtual void ReadFromDemuxerAck( |
63 int player_id, | 65 int player_id, |
64 const media::MediaPlayerHostMsg_ReadFromDemuxerAck_Params& params) = 0; | 66 const media::MediaPlayerHostMsg_ReadFromDemuxerAck_Params& params) = 0; |
65 #endif | 67 #endif |
66 }; | 68 }; |
67 | 69 |
68 } // namespace webkit_media | 70 } // namespace webkit_media |
69 | 71 |
70 #endif // WEBKIT_MEDIA_ANDROID_WEBMEDIAPLAYER_PROXY_ANDROID_H_ | 72 #endif // WEBKIT_MEDIA_ANDROID_WEBMEDIAPLAYER_PROXY_ANDROID_H_ |
OLD | NEW |