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

Side by Side Diff: content/browser/media/android/browser_media_player_manager.h

Issue 135863004: Downloads and passes the poster image to Android (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 10 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 unified diff | Download patch
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 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 CONTENT_BROWSER_MEDIA_ANDROID_BROWSER_MEDIA_PLAYER_MANAGER_H_ 5 #ifndef CONTENT_BROWSER_MEDIA_ANDROID_BROWSER_MEDIA_PLAYER_MANAGER_H_
6 #define CONTENT_BROWSER_MEDIA_ANDROID_BROWSER_MEDIA_PLAYER_MANAGER_H_ 6 #define CONTENT_BROWSER_MEDIA_ANDROID_BROWSER_MEDIA_PLAYER_MANAGER_H_
7 7
8 #include <map> 8 #include <map>
9 #include <set> 9 #include <set>
10 #include <string> 10 #include <string>
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
111 111
112 #if defined(VIDEO_HOLE) 112 #if defined(VIDEO_HOLE)
113 void AttachExternalVideoSurface(int player_id, jobject surface); 113 void AttachExternalVideoSurface(int player_id, jobject surface);
114 void DetachExternalVideoSurface(int player_id); 114 void DetachExternalVideoSurface(int player_id);
115 #endif // defined(VIDEO_HOLE) 115 #endif // defined(VIDEO_HOLE)
116 116
117 // Called to disble the current fullscreen playback if the video is encrypted. 117 // Called to disble the current fullscreen playback if the video is encrypted.
118 // TODO(qinmin): remove this once we have the new fullscreen mode. 118 // TODO(qinmin): remove this once we have the new fullscreen mode.
119 void DisableFullscreenEncryptedMediaPlayback(); 119 void DisableFullscreenEncryptedMediaPlayback();
120 120
121 // Callback for when the download of poster image is done.
122 virtual void DidDownloadPoster(
123 int id,
124 int http_status_code,
125 const GURL& image_url,
126 const std::vector<SkBitmap>& bitmaps,
127 const std::vector<gfx::Size>& original_bitmap_sizes);
128
121 protected: 129 protected:
122 // Clients must use Create() or subclass constructor. 130 // Clients must use Create() or subclass constructor.
123 explicit BrowserMediaPlayerManager(RenderViewHost* render_view_host); 131 explicit BrowserMediaPlayerManager(RenderViewHost* render_view_host);
124 132
125 // Message handlers. 133 // Message handlers.
126 virtual void OnEnterFullscreen(int player_id); 134 virtual void OnEnterFullscreen(int player_id);
127 virtual void OnExitFullscreen(int player_id); 135 virtual void OnExitFullscreen(int player_id);
128 virtual void OnInitialize( 136 virtual void OnInitialize(
129 MediaPlayerHostMsg_Initialize_Type type, 137 MediaPlayerHostMsg_Initialize_Type type,
130 int player_id, 138 int player_id,
131 const GURL& url, 139 const GURL& url,
132 const GURL& first_party_for_cookies, 140 const GURL& first_party_for_cookies,
133 int demuxer_client_id); 141 int demuxer_client_id);
134 virtual void OnStart(int player_id); 142 virtual void OnStart(int player_id);
135 virtual void OnSeek(int player_id, const base::TimeDelta& time); 143 virtual void OnSeek(int player_id, const base::TimeDelta& time);
136 virtual void OnPause(int player_id, bool is_media_related_action); 144 virtual void OnPause(int player_id, bool is_media_related_action);
137 virtual void OnSetVolume(int player_id, double volume); 145 virtual void OnSetVolume(int player_id, double volume);
146 virtual void OnSetPoster(int player_id, const GURL& poster);
138 virtual void OnReleaseResources(int player_id); 147 virtual void OnReleaseResources(int player_id);
139 virtual void OnDestroyPlayer(int player_id); 148 virtual void OnDestroyPlayer(int player_id);
140 void OnInitializeCDM(int media_keys_id, 149 void OnInitializeCDM(int media_keys_id,
141 const std::vector<uint8>& uuid, 150 const std::vector<uint8>& uuid,
142 const GURL& frame_url); 151 const GURL& frame_url);
143 void OnCreateSession(int media_keys_id, 152 void OnCreateSession(int media_keys_id,
144 uint32 session_id, 153 uint32 session_id,
145 MediaKeysHostMsg_CreateSession_Type type, 154 MediaKeysHostMsg_CreateSession_Type type,
146 const std::vector<uint8>& init_data); 155 const std::vector<uint8>& init_data);
147 void OnUpdateSession(int media_keys_id, 156 void OnUpdateSession(int media_keys_id,
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
237 scoped_ptr<media::MediaResourceGetter> media_resource_getter_; 246 scoped_ptr<media::MediaResourceGetter> media_resource_getter_;
238 247
239 base::WeakPtrFactory<BrowserMediaPlayerManager> weak_ptr_factory_; 248 base::WeakPtrFactory<BrowserMediaPlayerManager> weak_ptr_factory_;
240 249
241 DISALLOW_COPY_AND_ASSIGN(BrowserMediaPlayerManager); 250 DISALLOW_COPY_AND_ASSIGN(BrowserMediaPlayerManager);
242 }; 251 };
243 252
244 } // namespace content 253 } // namespace content
245 254
246 #endif // CONTENT_BROWSER_MEDIA_ANDROID_BROWSER_MEDIA_PLAYER_MANAGER_H_ 255 #endif // CONTENT_BROWSER_MEDIA_ANDROID_BROWSER_MEDIA_PLAYER_MANAGER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698