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