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

Side by Side Diff: media/cdm/default_cdm_factory.cc

Issue 2568463003: media: Rename MediaKeys to ContentDecryptionModule (Closed)
Patch Set: comments addressed Created 4 years 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
« no previous file with comments | « media/cdm/cdm_adapter_unittest.cc ('k') | media/cdm/json_web_key.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/cdm/default_cdm_factory.h" 5 #include "media/cdm/default_cdm_factory.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/bind_helpers.h" 8 #include "base/bind_helpers.h"
9 #include "base/location.h" 9 #include "base/location.h"
10 #include "base/single_thread_task_runner.h" 10 #include "base/single_thread_task_runner.h"
11 #include "base/threading/thread_task_runner_handle.h" 11 #include "base/threading/thread_task_runner_handle.h"
12 #include "media/base/content_decryption_module.h"
12 #include "media/base/key_system_names.h" 13 #include "media/base/key_system_names.h"
13 #include "media/base/key_systems.h" 14 #include "media/base/key_systems.h"
14 #include "media/base/media_switches.h" 15 #include "media/base/media_switches.h"
15 #include "media/cdm/aes_decryptor.h" 16 #include "media/cdm/aes_decryptor.h"
16 #include "url/gurl.h" 17 #include "url/gurl.h"
17 18
18 namespace media { 19 namespace media {
19 20
20 DefaultCdmFactory::DefaultCdmFactory() { 21 DefaultCdmFactory::DefaultCdmFactory() {
21 } 22 }
(...skipping 26 matching lines...) Expand all
48 return; 49 return;
49 } 50 }
50 51
51 if (!ShouldCreateAesDecryptor(key_system)) { 52 if (!ShouldCreateAesDecryptor(key_system)) {
52 base::ThreadTaskRunnerHandle::Get()->PostTask( 53 base::ThreadTaskRunnerHandle::Get()->PostTask(
53 FROM_HERE, 54 FROM_HERE,
54 base::Bind(cdm_created_cb, nullptr, "Unsupported key system.")); 55 base::Bind(cdm_created_cb, nullptr, "Unsupported key system."));
55 return; 56 return;
56 } 57 }
57 58
58 scoped_refptr<MediaKeys> cdm( 59 scoped_refptr<ContentDecryptionModule> cdm(
59 new AesDecryptor(security_origin, session_message_cb, session_closed_cb, 60 new AesDecryptor(security_origin, session_message_cb, session_closed_cb,
60 session_keys_change_cb)); 61 session_keys_change_cb));
61 base::ThreadTaskRunnerHandle::Get()->PostTask( 62 base::ThreadTaskRunnerHandle::Get()->PostTask(
62 FROM_HERE, base::Bind(cdm_created_cb, cdm, "")); 63 FROM_HERE, base::Bind(cdm_created_cb, cdm, ""));
63 } 64 }
64 65
65 } // namespace media 66 } // namespace media
OLDNEW
« no previous file with comments | « media/cdm/cdm_adapter_unittest.cc ('k') | media/cdm/json_web_key.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698