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