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 | 12 |
12 namespace webkit_media { | 13 namespace webkit_media { |
13 | 14 |
14 // An interface to facilitate the IPC between the browser side | 15 // An interface to facilitate the IPC between the browser side |
15 // android::MediaPlayer and the WebMediaPlayerImplAndroid in the renderer | 16 // android::MediaPlayer and the WebMediaPlayerImplAndroid in the renderer |
16 // process. | 17 // process. |
17 // Implementation is provided by content::WebMediaPlayerProxyImplAndroid. | 18 // Implementation is provided by content::WebMediaPlayerProxyImplAndroid. |
18 class WebMediaPlayerProxyAndroid { | 19 class WebMediaPlayerProxyAndroid { |
19 public: | 20 public: |
20 virtual ~WebMediaPlayerProxyAndroid(); | 21 virtual ~WebMediaPlayerProxyAndroid(); |
21 | 22 |
22 // Initialize a MediaPlayerBridge object in browser process | 23 // Initialize a MediaPlayerBridge object in browser process |
23 virtual void Initialize(int player_id, const std::string& url, | 24 virtual void Initialize(int player_id, const GURL& url, |
24 const std::string& first_party_for_cookies) = 0; | 25 const GURL& first_party_for_cookies) = 0; |
25 | 26 |
26 // Start the player. | 27 // Start the player. |
27 virtual void Start(int player_id) = 0; | 28 virtual void Start(int player_id) = 0; |
28 | 29 |
29 // Pause the player. | 30 // Pause the player. |
30 virtual void Pause(int player_id) = 0; | 31 virtual void Pause(int player_id) = 0; |
31 | 32 |
32 // Perform seek on the player. | 33 // Perform seek on the player. |
33 virtual void Seek(int player_id, base::TimeDelta time) = 0; | 34 virtual void Seek(int player_id, base::TimeDelta time) = 0; |
34 | 35 |
35 // Release resources for the player. | 36 // Release resources for the player. |
36 virtual void ReleaseResources(int player_id) = 0; | 37 virtual void ReleaseResources(int player_id) = 0; |
37 | 38 |
38 // Destroy the player in the browser process | 39 // Destroy the player in the browser process |
39 virtual void DestroyPlayer(int player_id) = 0; | 40 virtual void DestroyPlayer(int player_id) = 0; |
40 | 41 |
41 // Request the player to enter fullscreen. | 42 // Request the player to enter fullscreen. |
42 virtual void EnterFullscreen(int player_id) = 0; | 43 virtual void EnterFullscreen(int player_id) = 0; |
43 | 44 |
44 // Request the player to exit fullscreen. | 45 // Request the player to exit fullscreen. |
45 virtual void ExitFullscreen(int player_id) = 0; | 46 virtual void ExitFullscreen(int player_id) = 0; |
46 }; | 47 }; |
47 | 48 |
48 } // namespace webkit_media | 49 } // namespace webkit_media |
49 | 50 |
50 #endif // WEBKIT_MEDIA_ANDROID_WEBMEDIAPLAYER_PROXY_ANDROID_H_ | 51 #endif // WEBKIT_MEDIA_ANDROID_WEBMEDIAPLAYER_PROXY_ANDROID_H_ |
OLD | NEW |