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

Side by Side Diff: android_webview/renderer/aw_key_systems.cc

Issue 253593002: Componentize EncryptedMediaMessageFilter and rename it CdmMessageFilter. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed the empty library problem in macos build. 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 unified diff | Download patch
« no previous file with comments | « android_webview/renderer/DEPS ('k') | chrome/browser/DEPS » ('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 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 "android_webview/renderer/aw_key_systems.h" 5 #include "android_webview/renderer/aw_key_systems.h"
6 6 #include "components/cdm/renderer/widevine_key_systems.h"
7 #include <string>
8
9 #include "base/command_line.h"
10 #include "base/logging.h"
11 #include "content/public/common/eme_codec.h"
12 #include "third_party/widevine/cdm/widevine_cdm_common.h"
13
14 using content::KeySystemInfo;
15
16 namespace {
17
18 // Return |name|'s parent key system.
19 std::string GetDirectParentName(const std::string& name) {
20 int last_period = name.find_last_of('.');
21 DCHECK_GT(last_period, 0);
22 return name.substr(0, last_period);
23 }
24
25 void AddWidevineWithCodecs(const std::string& key_system_name,
26 bool add_parent_name,
27 std::vector<KeySystemInfo>* concrete_key_systems) {
28 KeySystemInfo info(key_system_name);
29
30 if (add_parent_name)
31 info.parent_key_system = GetDirectParentName(key_system_name);
32
33 info.supported_codecs = content::EME_CODEC_MP4_ALL;
34
35 concrete_key_systems->push_back(info);
36 }
37
38 } // namespace
39 7
40 namespace android_webview { 8 namespace android_webview {
41 9
42 void AwAddKeySystems( 10 void AwAddKeySystems(
43 std::vector<KeySystemInfo>* key_systems_info) { 11 std::vector<content::KeySystemInfo>* key_systems_info) {
44 AddWidevineWithCodecs(kWidevineKeySystem, true, key_systems_info); 12 cdm::AddAndroidWidevine(key_systems_info);
45 } 13 }
46 14
47 } // namespace android_webview 15 } // namespace android_webview
OLDNEW
« no previous file with comments | « android_webview/renderer/DEPS ('k') | chrome/browser/DEPS » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698