Index: content/browser/media/android/browser_media_player_manager.cc |
diff --git a/content/browser/media/android/browser_media_player_manager.cc b/content/browser/media/android/browser_media_player_manager.cc |
index 79cbe61f00b41058f8f2a5406d470b2fb7db680d..9da41002ff9401de2d063287dd8bc9b9ed0ddcdd 100644 |
--- a/content/browser/media/android/browser_media_player_manager.cc |
+++ b/content/browser/media/android/browser_media_player_manager.cc |
@@ -132,6 +132,7 @@ bool BrowserMediaPlayerManager::OnMessageReceived(const IPC::Message& msg) { |
IPC_MESSAGE_HANDLER(MediaPlayerHostMsg_Seek, OnSeek) |
IPC_MESSAGE_HANDLER(MediaPlayerHostMsg_Pause, OnPause) |
IPC_MESSAGE_HANDLER(MediaPlayerHostMsg_SetVolume, OnSetVolume) |
+ IPC_MESSAGE_HANDLER(MediaPlayerHostMsg_SetPoster, OnSetPoster) |
IPC_MESSAGE_HANDLER(MediaPlayerHostMsg_Release, OnReleaseResources) |
IPC_MESSAGE_HANDLER(MediaPlayerHostMsg_DestroyMediaPlayer, OnDestroyPlayer) |
IPC_MESSAGE_HANDLER(MediaPlayerHostMsg_DestroyAllMediaPlayers, |
@@ -567,6 +568,24 @@ void BrowserMediaPlayerManager::OnSetVolume(int player_id, double volume) { |
player->SetVolume(volume); |
} |
+void BrowserMediaPlayerManager::OnSetPoster(int player_id, const GURL& url) { |
+ web_contents_->DownloadImage( |
+ url, |
+ false /* is_favicon, false so that cookies will be used. */, |
whywhat
2014/02/04 15:58:01
nit: change to
false, // comment here, two space
|
+ 0 /* max_bitmap_size */, |
whywhat
2014/02/04 15:58:01
ditto
|
+ base::Bind(&BrowserMediaPlayerManager::DidDownloadPoster,base::Unretained(this))); |
whywhat
2014/02/04 15:58:01
nit: 80 chars
|
+} |
+ |
+// Callback for when the download of poster image is done. |
+void BrowserMediaPlayerManager::DidDownloadPoster( |
+ int id, |
+ int http_status_code, |
+ const GURL& image_url, |
+ const std::vector<SkBitmap>& bitmaps, |
+ const std::vector<gfx::Size>& original_bitmap_sizes) { |
+ // To be overriden. |
whywhat
2014/02/04 15:58:01
What does this comment mean?
|
+} |
acolwell GONE FROM CHROMIUM
2014/02/04 20:00:21
Why isn't there any code that does anything with t
cimamoglu (inactive)
2014/02/07 14:47:26
Done. The other CL: https://chrome-internal-review
|
+ |
void BrowserMediaPlayerManager::OnReleaseResources(int player_id) { |
MediaPlayerAndroid* player = GetPlayer(player_id); |
if (player) |