| 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 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 74 virtual GURL GetFirstPartyForCookies(); | 74 virtual GURL GetFirstPartyForCookies(); |
| 75 | 75 |
| 76 // Associates the |cdm| with this player. | 76 // Associates the |cdm| with this player. |
| 77 virtual void SetCdm(BrowserCdm* cdm); | 77 virtual void SetCdm(BrowserCdm* cdm); |
| 78 | 78 |
| 79 // Check whether the player still uses the current surface. | 79 // Check whether the player still uses the current surface. |
| 80 virtual bool IsSurfaceInUse() const = 0; | 80 virtual bool IsSurfaceInUse() const = 0; |
| 81 | 81 |
| 82 int player_id() { return player_id_; } | 82 int player_id() { return player_id_; } |
| 83 | 83 |
| 84 GURL frame_url() { return frame_url_; } | |
| 85 | |
| 86 protected: | 84 protected: |
| 87 MediaPlayerAndroid(int player_id, | 85 MediaPlayerAndroid(int player_id, |
| 88 MediaPlayerManager* manager, | 86 MediaPlayerManager* manager, |
| 89 const RequestMediaResourcesCB& request_media_resources_cb, | 87 const RequestMediaResourcesCB& request_media_resources_cb, |
| 90 const ReleaseMediaResourcesCB& release_media_resources_cb, | 88 const ReleaseMediaResourcesCB& release_media_resources_cb); |
| 91 const GURL& frame_url); | |
| 92 | 89 |
| 93 MediaPlayerManager* manager() { return manager_; } | 90 MediaPlayerManager* manager() { return manager_; } |
| 94 | 91 |
| 95 RequestMediaResourcesCB request_media_resources_cb_; | 92 RequestMediaResourcesCB request_media_resources_cb_; |
| 96 | 93 |
| 97 ReleaseMediaResourcesCB release_media_resources_cb_; | 94 ReleaseMediaResourcesCB release_media_resources_cb_; |
| 98 | 95 |
| 99 private: | 96 private: |
| 100 // Player ID assigned to this player. | 97 // Player ID assigned to this player. |
| 101 int player_id_; | 98 int player_id_; |
| 102 | 99 |
| 103 // Resource manager for all the media players. | 100 // Resource manager for all the media players. |
| 104 MediaPlayerManager* manager_; | 101 MediaPlayerManager* manager_; |
| 105 | 102 |
| 106 // Url for the frame that contains this player. | |
| 107 GURL frame_url_; | |
| 108 | |
| 109 DISALLOW_COPY_AND_ASSIGN(MediaPlayerAndroid); | 103 DISALLOW_COPY_AND_ASSIGN(MediaPlayerAndroid); |
| 110 }; | 104 }; |
| 111 | 105 |
| 112 } // namespace media | 106 } // namespace media |
| 113 | 107 |
| 114 #endif // MEDIA_BASE_ANDROID_MEDIA_PLAYER_ANDROID_H_ | 108 #endif // MEDIA_BASE_ANDROID_MEDIA_PLAYER_ANDROID_H_ |
| OLD | NEW |