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

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

Issue 1408793009: media: Remove BrowserCdmFactory inferface. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add comment for DEPS change. Created 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « media/base/android/browser_cdm_factory_android.h ('k') | media/base/browser_cdm_factory.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/base/android/browser_cdm_factory_android.cc
diff --git a/media/base/android/browser_cdm_factory_android.cc b/media/base/android/browser_cdm_factory_android.cc
deleted file mode 100644
index 9b43379fe85aaeffd86f8344c8d33e5af3342aca..0000000000000000000000000000000000000000
--- a/media/base/android/browser_cdm_factory_android.cc
+++ /dev/null
@@ -1,60 +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/android/browser_cdm_factory_android.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"
-#include "third_party/widevine/cdm/widevine_cdm_common.h"
-
-namespace media {
-
-scoped_refptr<MediaKeys> BrowserCdmFactoryAndroid::CreateBrowserCdm(
- const std::string& key_system,
- bool use_hw_secure_codecs,
- const SessionMessageCB& session_message_cb,
- const SessionClosedCB& session_closed_cb,
- const LegacySessionErrorCB& legacy_session_error_cb,
- const SessionKeysChangeCB& session_keys_change_cb,
- const SessionExpirationUpdateCB& session_expiration_update_cb) {
- if (!MediaDrmBridge::IsKeySystemSupported(key_system)) {
- NOTREACHED() << "Key system not supported unexpectedly: " << key_system;
- return nullptr;
- }
-
- scoped_refptr<MediaDrmBridge> cdm(
- MediaDrmBridge::Create(key_system, session_message_cb, session_closed_cb,
- legacy_session_error_cb, session_keys_change_cb,
- session_expiration_update_cb));
- if (!cdm) {
- NOTREACHED() << "MediaDrmBridge cannot be created for " << key_system;
- return nullptr;
- }
-
- if (key_system == kWidevineKeySystem) {
- MediaDrmBridge::SecurityLevel security_level =
- use_hw_secure_codecs ? MediaDrmBridge::SECURITY_LEVEL_1
- : MediaDrmBridge::SECURITY_LEVEL_3;
- if (!cdm->SetSecurityLevel(security_level)) {
- DVLOG(1) << "failed to set security level " << security_level;
- return nullptr;
- }
- } else {
- // Assume other key systems require hardware-secure codecs and thus do not
- // support full compositing.
- if (!use_hw_secure_codecs) {
- NOTREACHED()
- << key_system
- << " may require use_video_overlay_for_embedded_encrypted_video";
- return nullptr;
- }
- }
-
- return cdm;
-}
-
-} // namespace media
« no previous file with comments | « media/base/android/browser_cdm_factory_android.h ('k') | media/base/browser_cdm_factory.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698