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

Side by Side Diff: chrome/browser/media/android/remote/remote_media_player_manager.cc

Issue 2480003002: [RemotePlayback] Keep track of source compatibility and reject prompt() correspondingly (Closed)
Patch Set: Fixed the java enum comment Created 4 years, 1 month 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
« no previous file with comments | « chrome/browser/media/android/remote/remote_media_player_manager.h ('k') | content/common/DEPS » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #include "chrome/browser/media/android/remote/remote_media_player_manager.h" 5 #include "chrome/browser/media/android/remote/remote_media_player_manager.h"
6 6
7 #include "chrome/browser/android/tab_android.h" 7 #include "chrome/browser/android/tab_android.h"
8 #include "chrome/common/chrome_content_client.h" 8 #include "chrome/common/chrome_content_client.h"
9 #include "content/common/media/media_player_messages_android.h" 9 #include "content/common/media/media_player_messages_android.h"
10 #include "third_party/WebKit/public/platform/modules/remoteplayback/WebRemotePla ybackAvailability.h"
10 #include "third_party/skia/include/core/SkBitmap.h" 11 #include "third_party/skia/include/core/SkBitmap.h"
11 #include "ui/gfx/android/java_bitmap.h" 12 #include "ui/gfx/android/java_bitmap.h"
12 13
13 using media::MediaPlayerAndroid; 14 using media::MediaPlayerAndroid;
14 15
15 static const int MAX_POSTER_BITMAP_SIZE = 1024 * 1024; 16 static const int MAX_POSTER_BITMAP_SIZE = 1024 * 1024;
16 17
17 namespace remote_media { 18 namespace remote_media {
18 19
19 RemoteMediaPlayerManager::RemoteMediaPlayerManager( 20 RemoteMediaPlayerManager::RemoteMediaPlayerManager(
(...skipping 190 matching lines...) Expand 10 before | Expand all | Expand 10 after
210 211
211 void RemoteMediaPlayerManager::OnRemotePlaybackStarted(int player_id) { 212 void RemoteMediaPlayerManager::OnRemotePlaybackStarted(int player_id) {
212 Send(new MediaPlayerMsg_RemotePlaybackStarted(RoutingID(), player_id)); 213 Send(new MediaPlayerMsg_RemotePlaybackStarted(RoutingID(), player_id));
213 } 214 }
214 215
215 void RemoteMediaPlayerManager::OnRemotePlaybackFinished(int player_id) { 216 void RemoteMediaPlayerManager::OnRemotePlaybackFinished(int player_id) {
216 ReplaceRemotePlayerWithLocal(player_id); 217 ReplaceRemotePlayerWithLocal(player_id);
217 } 218 }
218 219
219 void RemoteMediaPlayerManager::OnRouteAvailabilityChanged( 220 void RemoteMediaPlayerManager::OnRouteAvailabilityChanged(
220 int player_id, bool routes_available) { 221 int player_id, blink::WebRemotePlaybackAvailability availability) {
221 Send( 222 Send(new MediaPlayerMsg_RemoteRouteAvailabilityChanged(
222 new MediaPlayerMsg_RemoteRouteAvailabilityChanged(RoutingID(), player_id, 223 RoutingID(), player_id, availability));
223 routes_available));
224 } 224 }
225 225
226 void RemoteMediaPlayerManager::OnCancelledRemotePlaybackRequest(int player_id) { 226 void RemoteMediaPlayerManager::OnCancelledRemotePlaybackRequest(int player_id) {
227 Send(new MediaPlayerMsg_CancelledRemotePlaybackRequest( 227 Send(new MediaPlayerMsg_CancelledRemotePlaybackRequest(
228 RoutingID(), player_id)); 228 RoutingID(), player_id));
229 } 229 }
230 230
231 231
232 void RemoteMediaPlayerManager::ReleaseFullscreenPlayer( 232 void RemoteMediaPlayerManager::ReleaseFullscreenPlayer(
233 MediaPlayerAndroid* player) { 233 MediaPlayerAndroid* player) {
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
287 MediaPlayerAndroid* local_player = GetLocalPlayer(player_id); 287 MediaPlayerAndroid* local_player = GetLocalPlayer(player_id);
288 Send(new MediaPlayerMsg_MediaMetadataChanged( 288 Send(new MediaPlayerMsg_MediaMetadataChanged(
289 RoutingID(), player_id, duration, local_player->GetVideoWidth(), 289 RoutingID(), player_id, duration, local_player->GetVideoWidth(),
290 local_player->GetVideoHeight(), success)); 290 local_player->GetVideoHeight(), success));
291 } else { 291 } else {
292 BrowserMediaPlayerManager::OnMediaMetadataChanged(player_id, duration, 292 BrowserMediaPlayerManager::OnMediaMetadataChanged(player_id, duration,
293 width, height, success); 293 width, height, success);
294 } 294 }
295 } 295 }
296 } // namespace remote_media 296 } // namespace remote_media
OLDNEW
« no previous file with comments | « chrome/browser/media/android/remote/remote_media_player_manager.h ('k') | content/common/DEPS » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698