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

Unified Diff: webkit/glue/simple_webmimeregistry_impl.cc

Issue 151023002: Move the rest of webkit/glue into content/common (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rm webkit_glue.gyp Created 6 years, 11 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 | « webkit/glue/simple_webmimeregistry_impl.h ('k') | webkit/glue/webfileutilities_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/glue/simple_webmimeregistry_impl.cc
diff --git a/webkit/glue/simple_webmimeregistry_impl.cc b/webkit/glue/simple_webmimeregistry_impl.cc
deleted file mode 100644
index b6bdadc68cc1173984989ce01001862a6939ce11..0000000000000000000000000000000000000000
--- a/webkit/glue/simple_webmimeregistry_impl.cc
+++ /dev/null
@@ -1,91 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "webkit/glue/simple_webmimeregistry_impl.h"
-
-#include "base/files/file_path.h"
-#include "base/strings/string_util.h"
-#include "base/strings/sys_string_conversions.h"
-#include "base/strings/utf_string_conversions.h"
-#include "net/base/mime_util.h"
-#include "third_party/WebKit/public/platform/WebString.h"
-
-using blink::WebString;
-using blink::WebMimeRegistry;
-
-namespace webkit_glue {
-
-//static
-std::string SimpleWebMimeRegistryImpl::ToASCIIOrEmpty(const WebString& string) {
- return IsStringASCII(string) ? UTF16ToASCII(string) : std::string();
-}
-
-WebMimeRegistry::SupportsType SimpleWebMimeRegistryImpl::supportsMIMEType(
- const WebString& mime_type) {
- return net::IsSupportedMimeType(ToASCIIOrEmpty(mime_type)) ?
- WebMimeRegistry::IsSupported : WebMimeRegistry::IsNotSupported;
-}
-
-WebMimeRegistry::SupportsType SimpleWebMimeRegistryImpl::supportsImageMIMEType(
- const WebString& mime_type) {
- return net::IsSupportedImageMimeType(ToASCIIOrEmpty(mime_type)) ?
- WebMimeRegistry::IsSupported : WebMimeRegistry::IsNotSupported;
-}
-
-WebMimeRegistry::SupportsType
- SimpleWebMimeRegistryImpl::supportsJavaScriptMIMEType(
- const WebString& mime_type) {
- return net::IsSupportedJavascriptMimeType(ToASCIIOrEmpty(mime_type)) ?
- WebMimeRegistry::IsSupported : WebMimeRegistry::IsNotSupported;
-}
-
-// When debugging layout tests failures in the test shell,
-// see TestShellWebMimeRegistryImpl.
-WebMimeRegistry::SupportsType SimpleWebMimeRegistryImpl::supportsMediaMIMEType(
- const WebString& mime_type,
- const WebString& codecs,
- const WebString& key_system) {
- // Media features are only supported at the content/ layer.
- return IsNotSupported;
-}
-
-bool SimpleWebMimeRegistryImpl::supportsMediaSourceMIMEType(
- const WebString& mime_type,
- const WebString& codecs) {
- // Media features are only supported at the content/ layer.
- return IsNotSupported;
-}
-
-WebMimeRegistry::SupportsType
- SimpleWebMimeRegistryImpl::supportsNonImageMIMEType(
- const WebString& mime_type) {
- return net::IsSupportedNonImageMimeType(ToASCIIOrEmpty(mime_type)) ?
- WebMimeRegistry::IsSupported : WebMimeRegistry::IsNotSupported;
-}
-
-WebString SimpleWebMimeRegistryImpl::mimeTypeForExtension(
- const WebString& file_extension) {
- std::string mime_type;
- net::GetMimeTypeFromExtension(
- base::FilePath::FromUTF16Unsafe(file_extension).value(), &mime_type);
- return WebString::fromUTF8(mime_type);
-}
-
-WebString SimpleWebMimeRegistryImpl::wellKnownMimeTypeForExtension(
- const WebString& file_extension) {
- std::string mime_type;
- net::GetWellKnownMimeTypeFromExtension(
- base::FilePath::FromUTF16Unsafe(file_extension).value(), &mime_type);
- return WebString::fromUTF8(mime_type);
-}
-
-WebString SimpleWebMimeRegistryImpl::mimeTypeFromFile(
- const WebString& file_path) {
- std::string mime_type;
- net::GetMimeTypeFromFile(base::FilePath::FromUTF16Unsafe(file_path),
- &mime_type);
- return WebString::fromUTF8(mime_type);
-}
-
-} // namespace webkit_glue
« no previous file with comments | « webkit/glue/simple_webmimeregistry_impl.h ('k') | webkit/glue/webfileutilities_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698