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

Side by Side Diff: content/renderer/media/cdm/render_cdm_factory.cc

Issue 1712903002: Remove prefixed EME. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix isRenewalMessage() in browser tests. Created 4 years, 10 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/renderer/media/cdm/render_cdm_factory.h" 5 #include "content/renderer/media/cdm/render_cdm_factory.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/location.h" 8 #include "base/location.h"
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 const media::CdmCreatedCB& cdm_created_cb) { 51 const media::CdmCreatedCB& cdm_created_cb) {
52 DCHECK(thread_checker_.CalledOnValidThread()); 52 DCHECK(thread_checker_.CalledOnValidThread());
53 53
54 if (!security_origin.is_valid()) { 54 if (!security_origin.is_valid()) {
55 base::ThreadTaskRunnerHandle::Get()->PostTask( 55 base::ThreadTaskRunnerHandle::Get()->PostTask(
56 FROM_HERE, base::Bind(cdm_created_cb, nullptr, "Invalid origin.")); 56 FROM_HERE, base::Bind(cdm_created_cb, nullptr, "Invalid origin."));
57 return; 57 return;
58 } 58 }
59 59
60 if (media::CanUseAesDecryptor(key_system)) { 60 if (media::CanUseAesDecryptor(key_system)) {
61 // TODO(sandersd): Currently the prefixed API always allows distinctive 61 // TODO(sandersd): Address this now that prefixed EME has been removed.
62 // http://crbug.com/249976. The prefixed API always allowed distinctive
62 // identifiers and persistent state. Once that changes we can sanity check 63 // identifiers and persistent state. Once that changes we can sanity check
63 // here that neither is allowed for AesDecryptor, since it does not support 64 // here that neither is allowed for AesDecryptor, since it does not support
64 // them and should never be configured that way. http://crbug.com/455271 65 // them and should never be configured that way. http://crbug.com/455271
65 scoped_refptr<media::MediaKeys> cdm( 66 scoped_refptr<media::MediaKeys> cdm(
66 new media::AesDecryptor(security_origin, session_message_cb, 67 new media::AesDecryptor(security_origin, session_message_cb,
67 session_closed_cb, session_keys_change_cb)); 68 session_closed_cb, session_keys_change_cb));
68 base::ThreadTaskRunnerHandle::Get()->PostTask( 69 base::ThreadTaskRunnerHandle::Get()->PostTask(
69 FROM_HERE, base::Bind(cdm_created_cb, cdm, "")); 70 FROM_HERE, base::Bind(cdm_created_cb, cdm, ""));
70 return; 71 return;
71 } 72 }
(...skipping 14 matching lines...) Expand all
86 session_keys_change_cb, session_expiration_update_cb, cdm_created_cb); 87 session_keys_change_cb, session_expiration_update_cb, cdm_created_cb);
87 #else 88 #else
88 // No possible CDM to create, so fail the request. 89 // No possible CDM to create, so fail the request.
89 base::ThreadTaskRunnerHandle::Get()->PostTask( 90 base::ThreadTaskRunnerHandle::Get()->PostTask(
90 FROM_HERE, 91 FROM_HERE,
91 base::Bind(cdm_created_cb, nullptr, "Key system not supported.")); 92 base::Bind(cdm_created_cb, nullptr, "Key system not supported."));
92 #endif // defined(ENABLE_PEPPER_CDMS) 93 #endif // defined(ENABLE_PEPPER_CDMS)
93 } 94 }
94 95
95 } // namespace content 96 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/media/android/webmediaplayer_android.cc ('k') | content/renderer/media/render_media_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698