Chromium Code Reviews| Index: net/base/mime_util.h |
| diff --git a/net/base/mime_util.h b/net/base/mime_util.h |
| index 09a3c7e3c7ec4a976eae0340789a76357b801635..eedf041ce93256da882ae3d6f5891b9def8a738e 100644 |
| --- a/net/base/mime_util.h |
| +++ b/net/base/mime_util.h |
| @@ -20,6 +20,7 @@ |
| #include <string> |
| #include <vector> |
| +#include "base/callback.h" |
| #include "base/files/file_path.h" |
| #include "net/base/net_export.h" |
| @@ -101,6 +102,19 @@ NET_EXPORT void ParseCodecString(const std::string& codecs, |
| std::vector<std::string>* codecs_out, |
| bool strip); |
| +// Returns true if the given |codec_id|, identified by a codec id string |
| +// described in RFC 6381, is supported. Returns false if the codec id is not |
| +// recognized or if that codec is not supported. |
| +NET_EXPORT bool IsCodecSupported(const std::string& codec_id); |
| + |
| +// The default implementation of IsCodecSupported, it can be overridden by |
| +// providing a custom callback via SetIsCodecSupportedCB. |
| +NET_EXPORT bool DefaultIsCodecSupported(const std::string& codec_id); |
| + |
| +// Provides a custom, platform-specific implementation of IsCodecSupported. |
| +typedef base::Callback<bool(const std::string&)> IsCodecSupportedCB; |
| +NET_EXPORT void SetIsCodecSupportedCB(IsCodecSupportedCB is_codec_supported_cb); |
|
Ryan Sleevi
2015/04/21 13:23:29
STYLE: Callbacks should *always* be passed as cons
servolk
2015/04/21 22:09:02
Changed to const-ref. Re typedef - I've posted my
|
| + |
| // Check to see if a particular MIME type is in our list which only supports a |
| // certain subset of codecs. |
| NET_EXPORT bool IsStrictMediaMimeType(const std::string& mime_type); |