| 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 MEDIA_BASE_ANDROID_MEDIA_PLAYER_BRIDGE_H_ | 5 #ifndef MEDIA_BASE_ANDROID_MEDIA_PLAYER_BRIDGE_H_ |
| 6 #define MEDIA_BASE_ANDROID_MEDIA_PLAYER_BRIDGE_H_ | 6 #define MEDIA_BASE_ANDROID_MEDIA_PLAYER_BRIDGE_H_ |
| 7 | 7 |
| 8 #include <jni.h> | 8 #include <jni.h> |
| 9 #include <stdint.h> | 9 #include <stdint.h> |
| 10 #include <map> | 10 #include <map> |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 45 // the |manager| when needed. | 45 // the |manager| when needed. |
| 46 MediaPlayerBridge( | 46 MediaPlayerBridge( |
| 47 int player_id, | 47 int player_id, |
| 48 const GURL& url, | 48 const GURL& url, |
| 49 const GURL& first_party_for_cookies, | 49 const GURL& first_party_for_cookies, |
| 50 const std::string& user_agent, | 50 const std::string& user_agent, |
| 51 bool hide_url_log, | 51 bool hide_url_log, |
| 52 MediaPlayerManager* manager, | 52 MediaPlayerManager* manager, |
| 53 const OnDecoderResourcesReleasedCB& on_decoder_resources_released_cb, | 53 const OnDecoderResourcesReleasedCB& on_decoder_resources_released_cb, |
| 54 const GURL& frame_url, | 54 const GURL& frame_url, |
| 55 bool allow_credentials); | 55 bool allow_credentials, |
| 56 int session_id); |
| 56 ~MediaPlayerBridge() override; | 57 ~MediaPlayerBridge() override; |
| 57 | 58 |
| 58 // Initialize this object and extract the metadata from the media. | 59 // Initialize this object and extract the metadata from the media. |
| 59 virtual void Initialize(); | 60 virtual void Initialize(); |
| 60 | 61 |
| 61 // MediaPlayerAndroid implementation. | 62 // MediaPlayerAndroid implementation. |
| 62 void SetVideoSurface(gfx::ScopedJavaSurface surface) override; | 63 void SetVideoSurface(gfx::ScopedJavaSurface surface) override; |
| 63 void Start() override; | 64 void Start() override; |
| 64 void Pause(bool is_media_related_action) override; | 65 void Pause(bool is_media_related_action) override; |
| 65 void SeekTo(base::TimeDelta timestamp) override; | 66 void SeekTo(base::TimeDelta timestamp) override; |
| (...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 202 | 203 |
| 203 // NOTE: Weak pointers must be invalidated before all other member variables. | 204 // NOTE: Weak pointers must be invalidated before all other member variables. |
| 204 base::WeakPtrFactory<MediaPlayerBridge> weak_factory_; | 205 base::WeakPtrFactory<MediaPlayerBridge> weak_factory_; |
| 205 | 206 |
| 206 DISALLOW_COPY_AND_ASSIGN(MediaPlayerBridge); | 207 DISALLOW_COPY_AND_ASSIGN(MediaPlayerBridge); |
| 207 }; | 208 }; |
| 208 | 209 |
| 209 } // namespace media | 210 } // namespace media |
| 210 | 211 |
| 211 #endif // MEDIA_BASE_ANDROID_MEDIA_PLAYER_BRIDGE_H_ | 212 #endif // MEDIA_BASE_ANDROID_MEDIA_PLAYER_BRIDGE_H_ |
| OLD | NEW |