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

Side by Side Diff: content/browser/android/media_player_manager_impl.cc

Issue 17563002: Add the SetMediaKeys handler to pass a drm bridge to a MediaSourcePlayer (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/android/media_player_manager_impl.h" 5 #include "content/browser/android/media_player_manager_impl.h"
6 6
7 #include "content/browser/android/content_view_core_impl.h" 7 #include "content/browser/android/content_view_core_impl.h"
8 #include "content/browser/android/media_resource_getter_impl.h" 8 #include "content/browser/android/media_resource_getter_impl.h"
9 #include "content/browser/web_contents/web_contents_view_android.h" 9 #include "content/browser/web_contents/web_contents_view_android.h"
10 #include "content/common/media/media_player_messages_android.h" 10 #include "content/common/media/media_player_messages_android.h"
(...skipping 490 matching lines...) Expand 10 before | Expand all | Expand 10 after
501 void MediaPlayerManagerImpl::RemoveDrmBridge(int media_keys_id) { 501 void MediaPlayerManagerImpl::RemoveDrmBridge(int media_keys_id) {
502 for (ScopedVector<MediaDrmBridge>::iterator it = drm_bridges_.begin(); 502 for (ScopedVector<MediaDrmBridge>::iterator it = drm_bridges_.begin();
503 it != drm_bridges_.end(); ++it) { 503 it != drm_bridges_.end(); ++it) {
504 if ((*it)->media_keys_id() == media_keys_id) { 504 if ((*it)->media_keys_id() == media_keys_id) {
505 drm_bridges_.erase(it); 505 drm_bridges_.erase(it);
506 break; 506 break;
507 } 507 }
508 } 508 }
509 } 509 }
510 510
511 void MediaPlayerManagerImpl::OnSetMediaKeys(int player_id, int media_keys_id) {
512 MediaPlayerAndroid* player = GetPlayer(player_id);
513 if (!player)
514 return;
515 MediaDrmBridge* drm_bridge = GetDrmBridge(media_keys_id);
516 if (!drm_bridge)
517 return;
518 // TODO(qinmin): add the logic to decide whether we should create the
519 // fullscreen surface for EME lv1.
520 player->SetDrmBridge(drm_bridge);
521 }
522
511 } // namespace content 523 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698