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

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

Issue 1156273006: Remove unused code calling WebMediaPlayerClient::requestFullscreen() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 6 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 #include "content/browser/media/android/browser_media_player_manager.h" 5 #include "content/browser/media/android/browser_media_player_manager.h"
6 6
7 #include "base/android/scoped_java_ref.h" 7 #include "base/android/scoped_java_ref.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "content/browser/android/content_view_core_impl.h" 9 #include "content/browser/android/content_view_core_impl.h"
10 #include "content/browser/android/media_players_observer.h" 10 #include "content/browser/android/media_players_observer.h"
(...skipping 317 matching lines...) Expand 10 before | Expand all | Expand 10 after
328 328
329 MediaPlayerAndroid* BrowserMediaPlayerManager::GetPlayer(int player_id) { 329 MediaPlayerAndroid* BrowserMediaPlayerManager::GetPlayer(int player_id) {
330 for (ScopedVector<MediaPlayerAndroid>::iterator it = players_.begin(); 330 for (ScopedVector<MediaPlayerAndroid>::iterator it = players_.begin();
331 it != players_.end(); ++it) { 331 it != players_.end(); ++it) {
332 if ((*it)->player_id() == player_id) 332 if ((*it)->player_id() == player_id)
333 return *it; 333 return *it;
334 } 334 }
335 return NULL; 335 return NULL;
336 } 336 }
337 337
338 void BrowserMediaPlayerManager::RequestFullScreen(int player_id) {
339 if (fullscreen_player_id_ == player_id)
340 return;
341
342 if (fullscreen_player_id_ != kInvalidMediaPlayerId) {
343 // TODO(qinmin): Determine the correct error code we should report to WMPA.
344 OnError(player_id, MediaPlayerAndroid::MEDIA_ERROR_DECODE);
345 return;
346 }
347
348 Send(new MediaPlayerMsg_RequestFullscreen(RoutingID(), player_id));
349 }
350
351 bool BrowserMediaPlayerManager::RequestPlay(int player_id) { 338 bool BrowserMediaPlayerManager::RequestPlay(int player_id) {
352 MediaPlayerAndroid* player = GetPlayer(player_id); 339 MediaPlayerAndroid* player = GetPlayer(player_id);
353 DCHECK(player); 340 DCHECK(player);
354 341
355 MediaSession::Type media_session_type = 342 MediaSession::Type media_session_type =
356 player->GetDuration().InSeconds() > kMinimumDurationForContentInSeconds 343 player->GetDuration().InSeconds() > kMinimumDurationForContentInSeconds
357 ? MediaSession::Type::Content : MediaSession::Type::Transient; 344 ? MediaSession::Type::Content : MediaSession::Type::Transient;
358 345
359 bool succeeded = MediaSession::Get(web_contents())->AddPlayer( 346 bool succeeded = MediaSession::Get(web_contents())->AddPlayer(
360 this, player_id, media_session_type); 347 this, player_id, media_session_type);
(...skipping 298 matching lines...) Expand 10 before | Expand all | Expand 10 after
659 external_video_surface_container_->ReleaseExternalVideoSurface(player_id); 646 external_video_surface_container_->ReleaseExternalVideoSurface(player_id);
660 #endif // defined(VIDEO_HOLE) 647 #endif // defined(VIDEO_HOLE)
661 } 648 }
662 649
663 void BrowserMediaPlayerManager::ReleasePlayer(MediaPlayerAndroid* player) { 650 void BrowserMediaPlayerManager::ReleasePlayer(MediaPlayerAndroid* player) {
664 player->Release(); 651 player->Release();
665 ReleaseMediaResources(player->player_id()); 652 ReleaseMediaResources(player->player_id());
666 } 653 }
667 654
668 } // namespace content 655 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/media/android/browser_media_player_manager.h ('k') | content/common/media/media_player_messages_android.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698