Chromium Code Reviews| Index: content/browser/android/browser_media_player_manager.cc |
| diff --git a/content/browser/android/browser_media_player_manager.cc b/content/browser/android/browser_media_player_manager.cc |
| index bc7562092fd17214ad3bf0eb808f7432b883f8f9..c61939a77d8a6e76b078d77f39647707df7ee79d 100644 |
| --- a/content/browser/android/browser_media_player_manager.cc |
| +++ b/content/browser/android/browser_media_player_manager.cc |
| @@ -4,6 +4,7 @@ |
| #include "content/browser/android/browser_media_player_manager.h" |
| +#include "base/command_line.h" |
| #include "content/browser/android/content_view_core_impl.h" |
| #include "content/browser/android/media_resource_getter_impl.h" |
| #include "content/browser/web_contents/web_contents_view_android.h" |
| @@ -14,6 +15,7 @@ |
| #include "content/public/browser/storage_partition.h" |
| #include "content/public/browser/web_contents.h" |
| #include "media/base/android/media_drm_bridge.h" |
| +#include "media/base/media_switches.h" |
| using media::MediaDrmBridge; |
| using media::MediaPlayerAndroid; |
| @@ -520,12 +522,18 @@ void BrowserMediaPlayerManager::RemovePlayer(int player_id) { |
| void BrowserMediaPlayerManager::AddDrmBridge(int media_keys_id, |
| const std::vector<uint8>& uuid) { |
| DCHECK(!GetDrmBridge(media_keys_id)); |
| - // TODO(qinmin): Pass the security level to MediaDrmBridge instead of using |
| - // the default L3. |
| + // TODO(xhwang/ddorwin): Pass the security level from key system. |
| + std::string security_level = "L3"; |
| + if (CommandLine::ForCurrentProcess() |
| + ->HasSwitch(switches::kMediaDrmEnableNonCompositing)) { |
| + security_level = "L1"; |
| + } |
| + |
| scoped_ptr<MediaDrmBridge> drm_bridge( |
| - MediaDrmBridge::Create(media_keys_id, uuid, "L3", this)); |
| + MediaDrmBridge::Create(media_keys_id, uuid, security_level, this)); |
|
qinmin
2013/09/09 22:23:05
the java side MediaDrmBridge.Create() call will re
xhwang
2013/09/09 22:52:48
Since last CL (https://codereview.chromium.org/234
|
| if (!drm_bridge) { |
| DVLOG(1) << "failed to create drm bridge."; |
| + OnKeyError(media_keys_id, "", media::MediaKeys::kUnknownError, 0); |
| return; |
| } |