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
3 // found in the LICENSE file.
5 #ifndef WEBKIT_MEDIA_CRYPTO_KEY_SYSTEMS_H_
6 #define WEBKIT_MEDIA_CRYPTO_KEY_SYSTEMS_H_
11 #include "base/memory/scoped_ptr.h"
17 namespace webkit_media
{
19 // Returns whether |key_sytem| is supported at all.
20 // Call IsSupportedKeySystemWithMediaMimeType() to determine whether a
21 // |key_system| supports a specific type of media.
22 bool IsSupportedKeySystem(const WebKit::WebString
& key_system
);
24 // Returns whether |key_sytem| supports the specified media type and codec(s).
25 bool IsSupportedKeySystemWithMediaMimeType(
26 const std::string
& mime_type
,
27 const std::vector
<std::string
>& codecs
,
28 const std::string
& key_system
);
30 // Returns a name for |key_system| suitable to UMA logging.
31 std::string
KeySystemNameForUMA(const std::string
& key_system
);
32 std::string
KeySystemNameForUMA(const WebKit::WebString
& key_system
);
34 // Returns whether AesDecryptor can be used for the given |key_system|.
35 bool CanUseAesDecryptor(const std::string
& key_system
);
37 // Returns the plugin type given a |key_system|.
38 // Returns an empty string if no plugin type is found for |key_system|.
39 std::string
GetPluginType(const std::string
& key_system
);
41 } // namespace webkit_media
43 #endif // WEBKIT_MEDIA_CRYPTO_KEY_SYSTEMS_H_