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

Unified Diff: components/html_viewer/web_mime_registry_impl.cc

Issue 1129643002: Moved media mime type and codec checks to media/base/mime_util.* (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Use media/base/mime_util.h in //components/mime_util/DEPS Created 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | components/mime_util/BUILD.gn » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/html_viewer/web_mime_registry_impl.cc
diff --git a/components/html_viewer/web_mime_registry_impl.cc b/components/html_viewer/web_mime_registry_impl.cc
index 976a777e0b7a750b6f6cff7bb6561a0c9bacf2d0..7954aba7b9ec3f6a994eff9caeb9043c3f721866 100644
--- a/components/html_viewer/web_mime_registry_impl.cc
+++ b/components/html_viewer/web_mime_registry_impl.cc
@@ -10,6 +10,7 @@
#include "base/strings/utf_string_conversions.h"
#include "components/mime_util/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"
@@ -63,7 +64,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.
@@ -71,18 +72,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.
@@ -97,7 +98,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);
}
« no previous file with comments | « no previous file | components/mime_util/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698