| 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 |
| 84 protected: | 86 protected: |
| 85 MediaPlayerAndroid(int player_id, | 87 MediaPlayerAndroid(int player_id, |
| 86 MediaPlayerManager* manager, | 88 MediaPlayerManager* manager, |
| 87 const RequestMediaResourcesCB& request_media_resources_cb, | 89 const RequestMediaResourcesCB& request_media_resources_cb, |
| 88 const ReleaseMediaResourcesCB& release_media_resources_cb); | 90 const ReleaseMediaResourcesCB& release_media_resources_cb, |
| 91 const GURL& frame_url); |
| 89 | 92 |
| 90 MediaPlayerManager* manager() { return manager_; } | 93 MediaPlayerManager* manager() { return manager_; } |
| 91 | 94 |
| 92 RequestMediaResourcesCB request_media_resources_cb_; | 95 RequestMediaResourcesCB request_media_resources_cb_; |
| 93 | 96 |
| 94 ReleaseMediaResourcesCB release_media_resources_cb_; | 97 ReleaseMediaResourcesCB release_media_resources_cb_; |
| 95 | 98 |
| 96 private: | 99 private: |
| 97 // Player ID assigned to this player. | 100 // Player ID assigned to this player. |
| 98 int player_id_; | 101 int player_id_; |
| 99 | 102 |
| 100 // Resource manager for all the media players. | 103 // Resource manager for all the media players. |
| 101 MediaPlayerManager* manager_; | 104 MediaPlayerManager* manager_; |
| 102 | 105 |
| 106 // Url for the frame that contains this player. |
| 107 GURL frame_url_; |
| 108 |
| 103 DISALLOW_COPY_AND_ASSIGN(MediaPlayerAndroid); | 109 DISALLOW_COPY_AND_ASSIGN(MediaPlayerAndroid); |
| 104 }; | 110 }; |
| 105 | 111 |
| 106 } // namespace media | 112 } // namespace media |
| 107 | 113 |
| 108 #endif // MEDIA_BASE_ANDROID_MEDIA_PLAYER_ANDROID_H_ | 114 #endif // MEDIA_BASE_ANDROID_MEDIA_PLAYER_ANDROID_H_ |
| OLD | NEW |