| OLD | NEW |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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 MEDIA_BASE_ANDROID_MEDIA_PLAYER_ANDROID_H_ | 5 #ifndef MEDIA_BASE_ANDROID_MEDIA_PLAYER_ANDROID_H_ |
| 6 #define MEDIA_BASE_ANDROID_MEDIA_PLAYER_ANDROID_H_ | 6 #define MEDIA_BASE_ANDROID_MEDIA_PLAYER_ANDROID_H_ |
| 7 | 7 |
| 8 #include <jni.h> | 8 #include <jni.h> |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 66 virtual bool IsPlayerReady() = 0; | 66 virtual bool IsPlayerReady() = 0; |
| 67 virtual bool CanPause() = 0; | 67 virtual bool CanPause() = 0; |
| 68 virtual bool CanSeekForward() = 0; | 68 virtual bool CanSeekForward() = 0; |
| 69 virtual bool CanSeekBackward() = 0; | 69 virtual bool CanSeekBackward() = 0; |
| 70 virtual GURL GetUrl(); | 70 virtual GURL GetUrl(); |
| 71 virtual GURL GetFirstPartyForCookies(); | 71 virtual GURL GetFirstPartyForCookies(); |
| 72 | 72 |
| 73 // Associates the |cdm| with this player. | 73 // Associates the |cdm| with this player. |
| 74 virtual void SetCdm(BrowserCdm* cdm); | 74 virtual void SetCdm(BrowserCdm* cdm); |
| 75 | 75 |
| 76 // Check whether the player still uses the current surface. | |
| 77 virtual bool IsSurfaceInUse() const = 0; | |
| 78 | |
| 79 int player_id() { return player_id_; } | 76 int player_id() { return player_id_; } |
| 80 | 77 |
| 81 GURL frame_url() { return frame_url_; } | 78 GURL frame_url() { return frame_url_; } |
| 82 | 79 |
| 83 protected: | 80 protected: |
| 84 MediaPlayerAndroid(int player_id, | 81 MediaPlayerAndroid(int player_id, |
| 85 MediaPlayerManager* manager, | 82 MediaPlayerManager* manager, |
| 86 const RequestMediaResourcesCB& request_media_resources_cb, | 83 const RequestMediaResourcesCB& request_media_resources_cb, |
| 87 const GURL& frame_url); | 84 const GURL& frame_url); |
| 88 | 85 |
| (...skipping 10 matching lines...) Expand all Loading... |
| 99 | 96 |
| 100 // Url for the frame that contains this player. | 97 // Url for the frame that contains this player. |
| 101 GURL frame_url_; | 98 GURL frame_url_; |
| 102 | 99 |
| 103 DISALLOW_COPY_AND_ASSIGN(MediaPlayerAndroid); | 100 DISALLOW_COPY_AND_ASSIGN(MediaPlayerAndroid); |
| 104 }; | 101 }; |
| 105 | 102 |
| 106 } // namespace media | 103 } // namespace media |
| 107 | 104 |
| 108 #endif // MEDIA_BASE_ANDROID_MEDIA_PLAYER_ANDROID_H_ | 105 #endif // MEDIA_BASE_ANDROID_MEDIA_PLAYER_ANDROID_H_ |
| OLD | NEW |