Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(866)

Unified Diff: media/base/android/media_player_bridge.h

Issue 1372203002: Throttle media decoding after excessive Android media server crashes (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: media/base/android/media_player_bridge.h
diff --git a/media/base/android/media_player_bridge.h b/media/base/android/media_player_bridge.h
index 53d3eadcb78c804b338e6b15f55c0d73ebba185c..cb53c230ffe5e4337c8e8574101b629de95a0104 100644
--- a/media/base/android/media_player_bridge.h
+++ b/media/base/android/media_player_bridge.h
@@ -41,15 +41,16 @@ class MEDIA_EXPORT MediaPlayerBridge : public MediaPlayerAndroid {
// |manager| to track unused resources and free them when needed.
// MediaPlayerBridge also forwards Android MediaPlayer callbacks to
// the |manager| when needed.
- MediaPlayerBridge(int player_id,
- const GURL& url,
- const GURL& first_party_for_cookies,
- const std::string& user_agent,
- bool hide_url_log,
- MediaPlayerManager* manager,
- const RequestMediaResourcesCB& request_media_resources_cb,
- const GURL& frame_url,
- bool allow_credentials);
+ MediaPlayerBridge(
+ int player_id,
+ const GURL& url,
+ const GURL& first_party_for_cookies,
+ const std::string& user_agent,
+ bool hide_url_log,
+ MediaPlayerManager* manager,
+ const OnPlayerReleasedCB& on_player_released_cb,
+ const GURL& frame_url,
+ bool allow_credentials);
~MediaPlayerBridge() override;
// Initialize this object and extract the metadata from the media.
@@ -174,6 +175,9 @@ class MEDIA_EXPORT MediaPlayerBridge : public MediaPlayerAndroid {
// Cookies for |url_|.
std::string cookies_;
+ // The surface object currently owned by the player.
+ gfx::ScopedJavaSurface surface_;
+
// Java MediaPlayerBridge instance.
base::android::ScopedJavaGlobalRef<jobject> j_media_player_bridge_;

Powered by Google App Engine
This is Rietveld 408576698