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

Side by Side Diff: webkit/media/crypto/key_systems.cc

Issue 15028015: Conditionally build support for Pepper-based CDMs. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Use AppendAscii() where possible. Created 7 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 | Annotate | Revision Log
« no previous file with comments | « webkit/media/crypto/key_systems.h ('k') | webkit/media/crypto/key_systems_info.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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 <map> 5 #include <map>
6 6
7 #include "webkit/media/crypto/key_systems.h" 7 #include "webkit/media/crypto/key_systems.h"
8 8
9 #include "base/lazy_instance.h" 9 #include "base/lazy_instance.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after
142 } 142 }
143 143
144 std::string KeySystemNameForUMA(const WebKit::WebString& key_system) { 144 std::string KeySystemNameForUMA(const WebKit::WebString& key_system) {
145 return KeySystemNameForUMAGeneric(std::string(key_system.utf8().data())); 145 return KeySystemNameForUMAGeneric(std::string(key_system.utf8().data()));
146 } 146 }
147 147
148 bool CanUseAesDecryptor(const std::string& key_system) { 148 bool CanUseAesDecryptor(const std::string& key_system) {
149 return CanUseBuiltInAesDecryptor(key_system); 149 return CanUseBuiltInAesDecryptor(key_system);
150 } 150 }
151 151
152 std::string GetPluginType(const std::string& key_system) { 152 #if defined(ENABLE_PEPPER_CDMS)
153 for (int i = 0; i < kNumKeySystemToPluginTypeMapping; ++i) { 153 std::string GetPepperType(const std::string& key_system) {
154 if (kKeySystemToPluginTypeMapping[i].key_system == key_system) 154 for (int i = 0; i < kNumKeySystemToPepperTypeMapping; ++i) {
155 return kKeySystemToPluginTypeMapping[i].plugin_type; 155 if (kKeySystemToPepperTypeMapping[i].key_system == key_system)
156 return kKeySystemToPepperTypeMapping[i].type;
156 } 157 }
157 158
158 return std::string(); 159 return std::string();
159 } 160 }
161 #endif // defined(ENABLE_PEPPER_CDMS)
160 162
161 } // namespace webkit_media 163 } // namespace webkit_media
OLDNEW
« no previous file with comments | « webkit/media/crypto/key_systems.h ('k') | webkit/media/crypto/key_systems_info.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698