| Index: mojo/services/html_viewer/webmimeregistry_impl.cc
|
| diff --git a/mojo/services/html_viewer/webmimeregistry_impl.cc b/mojo/services/html_viewer/webmimeregistry_impl.cc
|
| index c839610700e7188bd0acb5babd2cd2f2e2c77a98..3b983203049ee30c25ad81fa7cd4c07c6bbeb44b 100644
|
| --- a/mojo/services/html_viewer/webmimeregistry_impl.cc
|
| +++ b/mojo/services/html_viewer/webmimeregistry_impl.cc
|
| @@ -8,9 +8,10 @@
|
| #include "base/strings/string_util.h"
|
| #include "base/strings/sys_string_conversions.h"
|
| #include "base/strings/utf_string_conversions.h"
|
| +#include "content/common/mime_util.h"
|
| #include "media/base/key_systems.h"
|
| +#include "media/base/mime_util.h"
|
| #include "media/filters/stream_parser_factory.h"
|
| -#include "net/base/mime_util.h"
|
| #include "third_party/WebKit/public/platform/WebString.h"
|
|
|
| namespace html_viewer {
|
| @@ -25,7 +26,7 @@ std::string ToASCIIOrEmpty(const blink::WebString& string) {
|
|
|
| blink::WebMimeRegistry::SupportsType WebMimeRegistryImpl::supportsMIMEType(
|
| const blink::WebString& mime_type) {
|
| - return net::IsSupportedMimeType(ToASCIIOrEmpty(mime_type)) ?
|
| + return content::IsSupportedMimeType(ToASCIIOrEmpty(mime_type)) ?
|
| blink::WebMimeRegistry::IsSupported :
|
| blink::WebMimeRegistry::IsNotSupported;
|
| }
|
| @@ -62,7 +63,7 @@ blink::WebMimeRegistry::SupportsType WebMimeRegistryImpl::supportsMediaMIMEType(
|
| const blink::WebString& key_system) {
|
| const std::string mime_type_ascii = ToASCIIOrEmpty(mime_type);
|
| // Not supporting the container is a flat-out no.
|
| - if (!net::IsSupportedMediaMimeType(mime_type_ascii))
|
| + if (!media::IsSupportedMediaMimeType(mime_type_ascii))
|
| return IsNotSupported;
|
|
|
| // Mojo does not currently support any key systems.
|
| @@ -70,18 +71,18 @@ blink::WebMimeRegistry::SupportsType WebMimeRegistryImpl::supportsMediaMIMEType(
|
| return IsNotSupported;
|
|
|
| // Check list of strict codecs to see if it is supported.
|
| - if (net::IsStrictMediaMimeType(mime_type_ascii)) {
|
| + if (media::IsStrictMediaMimeType(mime_type_ascii)) {
|
| // Check if the codecs are a perfect match.
|
| std::vector<std::string> strict_codecs;
|
| - net::ParseCodecString(ToASCIIOrEmpty(codecs), &strict_codecs, false);
|
| + media::ParseCodecString(ToASCIIOrEmpty(codecs), &strict_codecs, false);
|
| return static_cast<WebMimeRegistry::SupportsType>(
|
| - net::IsSupportedStrictMediaMimeType(mime_type_ascii, strict_codecs));
|
| + media::IsSupportedStrictMediaMimeType(mime_type_ascii, strict_codecs));
|
| }
|
|
|
| // If we don't recognize the codec, it's possible we support it.
|
| std::vector<std::string> parsed_codecs;
|
| - net::ParseCodecString(ToASCIIOrEmpty(codecs), &parsed_codecs, true);
|
| - if (!net::AreSupportedMediaCodecs(parsed_codecs))
|
| + media::ParseCodecString(ToASCIIOrEmpty(codecs), &parsed_codecs, true);
|
| + if (!media::AreSupportedMediaCodecs(parsed_codecs))
|
| return MayBeSupported;
|
|
|
| // Otherwise we have a perfect match.
|
| @@ -96,7 +97,7 @@ bool WebMimeRegistryImpl::supportsMediaSourceMIMEType(
|
| return false;
|
|
|
| std::vector<std::string> parsed_codec_ids;
|
| - net::ParseCodecString(ToASCIIOrEmpty(codecs), &parsed_codec_ids, false);
|
| + media::ParseCodecString(ToASCIIOrEmpty(codecs), &parsed_codec_ids, false);
|
| return media::StreamParserFactory::IsTypeSupported(mime_type_ascii,
|
| parsed_codec_ids);
|
| }
|
| @@ -117,9 +118,9 @@ bool WebMimeRegistryImpl::supportsEncryptedMediaMIMEType(
|
| const std::string mime_type_ascii = base::UTF16ToASCII(mime_type);
|
|
|
| std::vector<std::string> codec_vector;
|
| - bool strip_suffix = !net::IsStrictMediaMimeType(mime_type_ascii);
|
| - net::ParseCodecString(base::UTF16ToASCII(codecs), &codec_vector,
|
| - strip_suffix);
|
| + bool strip_suffix = !media::IsStrictMediaMimeType(mime_type_ascii);
|
| + media::ParseCodecString(base::UTF16ToASCII(codecs), &codec_vector,
|
| + strip_suffix);
|
|
|
| return media::IsSupportedKeySystemWithMediaMimeType(
|
| mime_type_ascii, codec_vector, base::UTF16ToASCII(key_system));
|
|
|