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

Side by Side Diff: media/mojo/clients/mojo_cdm_factory.cc

Issue 2255943002: EME: Remove obsolete legacy APIs related to versions of prefixed EME (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix build and add bug reference for obsoletes Created 4 years, 4 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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 "media/mojo/clients/mojo_cdm_factory.h" 5 #include "media/mojo/clients/mojo_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/single_thread_task_runner.h" 9 #include "base/single_thread_task_runner.h"
10 #include "base/threading/thread_task_runner_handle.h" 10 #include "base/threading/thread_task_runner_handle.h"
(...skipping 12 matching lines...) Expand all
23 } 23 }
24 24
25 MojoCdmFactory::~MojoCdmFactory() {} 25 MojoCdmFactory::~MojoCdmFactory() {}
26 26
27 void MojoCdmFactory::Create( 27 void MojoCdmFactory::Create(
28 const std::string& key_system, 28 const std::string& key_system,
29 const GURL& security_origin, 29 const GURL& security_origin,
30 const CdmConfig& cdm_config, 30 const CdmConfig& cdm_config,
31 const SessionMessageCB& session_message_cb, 31 const SessionMessageCB& session_message_cb,
32 const SessionClosedCB& session_closed_cb, 32 const SessionClosedCB& session_closed_cb,
33 const LegacySessionErrorCB& legacy_session_error_cb,
34 const SessionKeysChangeCB& session_keys_change_cb, 33 const SessionKeysChangeCB& session_keys_change_cb,
35 const SessionExpirationUpdateCB& session_expiration_update_cb, 34 const SessionExpirationUpdateCB& session_expiration_update_cb,
36 const CdmCreatedCB& cdm_created_cb) { 35 const CdmCreatedCB& cdm_created_cb) {
37 DVLOG(2) << __FUNCTION__ << ": " << key_system; 36 DVLOG(2) << __FUNCTION__ << ": " << key_system;
38 37
39 if (!security_origin.is_valid()) { 38 if (!security_origin.is_valid()) {
40 base::ThreadTaskRunnerHandle::Get()->PostTask( 39 base::ThreadTaskRunnerHandle::Get()->PostTask(
41 FROM_HERE, base::Bind(cdm_created_cb, nullptr, "Invalid origin.")); 40 FROM_HERE, base::Bind(cdm_created_cb, nullptr, "Invalid origin."));
42 return; 41 return;
43 } 42 }
44 43
45 if (CanUseAesDecryptor(key_system)) { 44 if (CanUseAesDecryptor(key_system)) {
46 scoped_refptr<MediaKeys> cdm( 45 scoped_refptr<MediaKeys> cdm(
47 new AesDecryptor(security_origin, session_message_cb, session_closed_cb, 46 new AesDecryptor(security_origin, session_message_cb, session_closed_cb,
48 session_keys_change_cb)); 47 session_keys_change_cb));
49 base::ThreadTaskRunnerHandle::Get()->PostTask( 48 base::ThreadTaskRunnerHandle::Get()->PostTask(
50 FROM_HERE, base::Bind(cdm_created_cb, cdm, "")); 49 FROM_HERE, base::Bind(cdm_created_cb, cdm, ""));
51 return; 50 return;
52 } 51 }
53 52
54 mojom::ContentDecryptionModulePtr cdm_ptr; 53 mojom::ContentDecryptionModulePtr cdm_ptr;
55 shell::GetInterface<mojom::ContentDecryptionModule>(interface_provider_, 54 shell::GetInterface<mojom::ContentDecryptionModule>(interface_provider_,
56 &cdm_ptr); 55 &cdm_ptr);
57 56
58 MojoCdm::Create(key_system, security_origin, cdm_config, std::move(cdm_ptr), 57 MojoCdm::Create(key_system, security_origin, cdm_config, std::move(cdm_ptr),
59 session_message_cb, session_closed_cb, 58 session_message_cb, session_closed_cb, session_keys_change_cb,
60 legacy_session_error_cb, session_keys_change_cb,
61 session_expiration_update_cb, cdm_created_cb); 59 session_expiration_update_cb, cdm_created_cb);
62 } 60 }
63 61
64 } // namespace media 62 } // namespace media
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698