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

Unified Diff: media/base/android/cdm_factory_android.cc

Issue 308073004: Add PlayerTracker and BrowserCdm interfaces. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: comments addressed Created 6 years, 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « media/base/android/browser_cdm_factory_android.cc ('k') | media/base/android/media_drm_bridge.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/base/android/cdm_factory_android.cc
diff --git a/media/base/android/cdm_factory_android.cc b/media/base/android/cdm_factory_android.cc
deleted file mode 100644
index c9b24e2d550d67de06543533f35a54ffc381f7e9..0000000000000000000000000000000000000000
--- a/media/base/android/cdm_factory_android.cc
+++ /dev/null
@@ -1,53 +0,0 @@
-// Copyright 2014 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "media/base/cdm_factory.h"
-
-#include "base/command_line.h"
-#include "base/logging.h"
-#include "base/memory/scoped_ptr.h"
-#include "media/base/android/media_drm_bridge.h"
-#include "media/base/media_switches.h"
-
-namespace media {
-
-scoped_ptr<MediaKeys> CreateBrowserCdm(
- const std::string& key_system,
- const SessionCreatedCB& session_created_cb,
- const SessionMessageCB& session_message_cb,
- const SessionReadyCB& session_ready_cb,
- const SessionClosedCB& session_closed_cb,
- const SessionErrorCB& session_error_cb) {
- if (!MediaDrmBridge::IsKeySystemSupported(key_system)) {
- NOTREACHED() << "Unsupported key system: " << key_system;
- return scoped_ptr<MediaKeys>();
- }
-
- scoped_ptr<MediaDrmBridge> cdm(MediaDrmBridge::Create(key_system,
- session_created_cb,
- session_message_cb,
- session_ready_cb,
- session_closed_cb,
- session_error_cb));
- if (!cdm) {
- NOTREACHED() << "MediaDrmBridge cannot be created for " << key_system;
- return scoped_ptr<MediaKeys>();
- }
-
- // TODO(xhwang/ddorwin): Pass the security level from key system.
- MediaDrmBridge::SecurityLevel security_level =
- MediaDrmBridge::SECURITY_LEVEL_3;
- if (CommandLine::ForCurrentProcess()->HasSwitch(
- switches::kMediaDrmEnableNonCompositing)) {
- security_level = MediaDrmBridge::SECURITY_LEVEL_1;
- }
- if (!cdm->SetSecurityLevel(security_level)) {
- DVLOG(1) << "failed to set security level " << security_level;
- return scoped_ptr<MediaKeys>();
- }
-
- return cdm.PassAs<MediaKeys>();
-}
-
-} // namespace media
« no previous file with comments | « media/base/android/browser_cdm_factory_android.cc ('k') | media/base/android/media_drm_bridge.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698