diff options
author | tfarina@chromium.org <tfarina@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-02-01 14:47:55 +0000 |
---|---|---|
committer | tfarina@chromium.org <tfarina@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-02-01 14:47:55 +0000 |
commit | bdd2d420304d257937e311f17dedca61c06711f4 (patch) | |
tree | 3678ff1cf7617c32c78af549f4abb0bf28fa1b47 /content | |
parent | c2454884f0878d17ed8096edb22cfaf3209c22ac (diff) | |
download | chromium_src-bdd2d420304d257937e311f17dedca61c06711f4.zip chromium_src-bdd2d420304d257937e311f17dedca61c06711f4.tar.gz chromium_src-bdd2d420304d257937e311f17dedca61c06711f4.tar.bz2 |
Move the rest of webkit/glue into content/child
One more step towards removing src/webkit/
BUG=265753
TEST=content_shell and content_unittests
R=jochen@chromium.org,jam@chromium.org
TBR=darin
Review URL: https://codereview.chromium.org/151023002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@248367 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content')
-rw-r--r-- | content/child/blink_glue.cc | 29 | ||||
-rw-r--r-- | content/child/blink_glue.h | 23 | ||||
-rw-r--r-- | content/child/fileapi/webfilesystem_impl.cc | 6 | ||||
-rw-r--r-- | content/child/simple_webmimeregistry_impl.cc | 91 | ||||
-rw-r--r-- | content/child/simple_webmimeregistry_impl.h | 49 | ||||
-rw-r--r-- | content/child/webfileutilities_impl.cc | 87 | ||||
-rw-r--r-- | content/child/webfileutilities_impl.h | 41 | ||||
-rw-r--r-- | content/content_child.gypi | 10 | ||||
-rw-r--r-- | content/content_common.gypi | 7 | ||||
-rw-r--r-- | content/content_plugin.gypi | 1 | ||||
-rw-r--r-- | content/content_renderer.gypi | 1 | ||||
-rw-r--r-- | content/content_shell.gypi | 1 | ||||
-rw-r--r-- | content/content_tests.gypi | 5 | ||||
-rw-r--r-- | content/plugin/DEPS | 1 | ||||
-rw-r--r-- | content/renderer/renderer_webkitplatformsupport_impl.cc | 12 | ||||
-rw-r--r-- | content/test/test_webkit_platform_support.cc | 1 | ||||
-rw-r--r-- | content/test/test_webkit_platform_support.h | 8 | ||||
-rw-r--r-- | content/utility/DEPS | 1 | ||||
-rw-r--r-- | content/worker/DEPS | 1 | ||||
-rw-r--r-- | content/worker/worker_webkitplatformsupport_impl.cc | 8 |
20 files changed, 346 insertions, 37 deletions
diff --git a/content/child/blink_glue.cc b/content/child/blink_glue.cc new file mode 100644 index 0000000..9a3af75 --- /dev/null +++ b/content/child/blink_glue.cc @@ -0,0 +1,29 @@ +// Copyright 2014 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 "content/child/blink_glue.h" + +#include "base/logging.h" +#include "third_party/WebKit/public/platform/WebFileInfo.h" + +namespace content { + +void FileInfoToWebFileInfo(const base::File::Info& file_info, + blink::WebFileInfo* web_file_info) { + DCHECK(web_file_info); + // WebKit now expects NaN as uninitialized/null Date. + if (file_info.last_modified.is_null()) + web_file_info->modificationTime = std::numeric_limits<double>::quiet_NaN(); + else + web_file_info->modificationTime = file_info.last_modified.ToDoubleT(); + web_file_info->length = file_info.size; + if (file_info.is_directory) + web_file_info->type = blink::WebFileInfo::TypeDirectory; + else + web_file_info->type = blink::WebFileInfo::TypeFile; +} + +COMPILE_ASSERT(std::numeric_limits<double>::has_quiet_NaN, has_quiet_NaN); + +} // namespace content diff --git a/content/child/blink_glue.h b/content/child/blink_glue.h new file mode 100644 index 0000000..0181472 --- /dev/null +++ b/content/child/blink_glue.h @@ -0,0 +1,23 @@ +// Copyright 2014 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. + +#ifndef CONTENT_CHILD_BLINK_GLUE_H_ +#define CONTENT_CHILD_BLINK_GLUE_H_ + +#include "base/files/file.h" +#include "content/common/content_export.h" + +namespace blink { +struct WebFileInfo; +} + +namespace content { + +// File info conversion +CONTENT_EXPORT void FileInfoToWebFileInfo(const base::File::Info& file_info, + blink::WebFileInfo* web_file_info); + +} // namespace content + +#endif // CONTENT_CHILD_BLINK_GLUE_H_ diff --git a/content/child/fileapi/webfilesystem_impl.cc b/content/child/fileapi/webfilesystem_impl.cc index 902c12d..a31055e 100644 --- a/content/child/fileapi/webfilesystem_impl.cc +++ b/content/child/fileapi/webfilesystem_impl.cc @@ -11,6 +11,7 @@ #include "base/strings/utf_string_conversions.h" #include "base/synchronization/waitable_event.h" #include "base/threading/thread_local.h" +#include "content/child/blink_glue.h" #include "content/child/child_thread.h" #include "content/child/fileapi/file_system_dispatcher.h" #include "content/child/fileapi/webfilewriter_impl.h" @@ -23,7 +24,6 @@ #include "webkit/child/worker_task_runner.h" #include "webkit/common/fileapi/directory_entry.h" #include "webkit/common/fileapi/file_system_util.h" -#include "webkit/glue/webkit_glue.h" using blink::WebFileInfo; using blink::WebFileSystemCallbacks; @@ -188,7 +188,7 @@ void ReadMetadataCallbackAdapter(int thread_id, int callbacks_id, WaitableCallbackResults* waitable_results, const base::File::Info& file_info) { WebFileInfo web_file_info; - webkit_glue::FileInfoToWebFileInfo(file_info, &web_file_info); + FileInfoToWebFileInfo(file_info, &web_file_info); CallbackFileSystemCallbacks( thread_id, callbacks_id, waitable_results, &WebFileSystemCallbacks::didReadMetadata, @@ -265,7 +265,7 @@ void DidCreateSnapshotFile( filesystem->GetAndUnregisterCallbacks(callbacks_id); WebFileInfo web_file_info; - webkit_glue::FileInfoToWebFileInfo(file_info, &web_file_info); + FileInfoToWebFileInfo(file_info, &web_file_info); web_file_info.platformPath = platform_path.AsUTF16Unsafe(); callbacks.didCreateSnapshotFile(web_file_info); diff --git a/content/child/simple_webmimeregistry_impl.cc b/content/child/simple_webmimeregistry_impl.cc new file mode 100644 index 0000000..2b135c1 --- /dev/null +++ b/content/child/simple_webmimeregistry_impl.cc @@ -0,0 +1,91 @@ +// Copyright 2014 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 "content/child/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 content { + +//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 content diff --git a/content/child/simple_webmimeregistry_impl.h b/content/child/simple_webmimeregistry_impl.h new file mode 100644 index 0000000..b0246d0 --- /dev/null +++ b/content/child/simple_webmimeregistry_impl.h @@ -0,0 +1,49 @@ +// Copyright 2014 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. + +#ifndef CONTENT_CHILD_SIMPLE_WEBMIMEREGISTRY_IMPL_H_ +#define CONTENT_CHILD_SIMPLE_WEBMIMEREGISTRY_IMPL_H_ + +#include <string> + +#include "base/compiler_specific.h" +#include "content/common/content_export.h" +#include "third_party/WebKit/public/platform/WebMimeRegistry.h" + +namespace content { + +class CONTENT_EXPORT SimpleWebMimeRegistryImpl : + NON_EXPORTED_BASE(public blink::WebMimeRegistry) { + public: + SimpleWebMimeRegistryImpl() {} + virtual ~SimpleWebMimeRegistryImpl() {} + + // Convert a WebString to ASCII, falling back on an empty string in the case + // of a non-ASCII string. + static std::string ToASCIIOrEmpty(const blink::WebString& string); + + // WebMimeRegistry methods: + virtual blink::WebMimeRegistry::SupportsType supportsMIMEType( + const blink::WebString&); + virtual blink::WebMimeRegistry::SupportsType supportsImageMIMEType( + const blink::WebString&); + virtual blink::WebMimeRegistry::SupportsType supportsJavaScriptMIMEType( + const blink::WebString&); + virtual blink::WebMimeRegistry::SupportsType supportsMediaMIMEType( + const blink::WebString&, + const blink::WebString&, + const blink::WebString&); + virtual bool supportsMediaSourceMIMEType(const blink::WebString&, + const blink::WebString&); + virtual blink::WebMimeRegistry::SupportsType supportsNonImageMIMEType( + const blink::WebString&); + virtual blink::WebString mimeTypeForExtension(const blink::WebString&); + virtual blink::WebString wellKnownMimeTypeForExtension( + const blink::WebString&); + virtual blink::WebString mimeTypeFromFile(const blink::WebString&); +}; + +} // namespace content + +#endif // CONTENT_CHILD_SIMPLE_WEBMIMEREGISTRY_IMPL_H_ diff --git a/content/child/webfileutilities_impl.cc b/content/child/webfileutilities_impl.cc new file mode 100644 index 0000000..9c05596 --- /dev/null +++ b/content/child/webfileutilities_impl.cc @@ -0,0 +1,87 @@ +// Copyright 2014 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 "content/child/webfileutilities_impl.h" + +#include "base/file_util.h" +#include "base/files/file_path.h" +#include "base/logging.h" +#include "content/child/blink_glue.h" +#include "net/base/file_stream.h" +#include "net/base/net_util.h" +#include "third_party/WebKit/public/platform/WebFileInfo.h" +#include "third_party/WebKit/public/platform/WebString.h" +#include "third_party/WebKit/public/platform/WebURL.h" + +using blink::WebString; + +namespace content { + +WebFileUtilitiesImpl::WebFileUtilitiesImpl() + : sandbox_enabled_(true) { +} + +WebFileUtilitiesImpl::~WebFileUtilitiesImpl() { +} + +bool WebFileUtilitiesImpl::getFileInfo(const WebString& path, + blink::WebFileInfo& web_file_info) { + if (sandbox_enabled_) { + NOTREACHED(); + return false; + } + // TODO(rvargas): convert this code to use base::File::Info. + base::File::Info file_info; + if (!base::GetFileInfo(base::FilePath::FromUTF16Unsafe(path), + reinterpret_cast<base::File::Info*>(&file_info))) + return false; + + FileInfoToWebFileInfo(file_info, &web_file_info); + web_file_info.platformPath = path; + return true; +} + +WebString WebFileUtilitiesImpl::directoryName(const WebString& path) { + return base::FilePath::FromUTF16Unsafe(path).DirName().AsUTF16Unsafe(); +} + +WebString WebFileUtilitiesImpl::baseName(const WebString& path) { + return base::FilePath::FromUTF16Unsafe(path).BaseName().AsUTF16Unsafe(); +} + +blink::WebURL WebFileUtilitiesImpl::filePathToURL(const WebString& path) { + return net::FilePathToFileURL(base::FilePath::FromUTF16Unsafe(path)); +} + +base::PlatformFile WebFileUtilitiesImpl::openFile(const WebString& path, + int mode) { + if (sandbox_enabled_) { + NOTREACHED(); + return base::kInvalidPlatformFileValue; + } + // mode==0 (read-only) is the only supported mode. + // TODO(kinuko): Remove this parameter. + DCHECK_EQ(0, mode); + return base::CreatePlatformFile( + base::FilePath::FromUTF16Unsafe(path), + base::PLATFORM_FILE_OPEN | base::PLATFORM_FILE_READ, + NULL, NULL); +} + +void WebFileUtilitiesImpl::closeFile(base::PlatformFile& handle) { + if (handle == base::kInvalidPlatformFileValue) + return; + if (base::ClosePlatformFile(handle)) + handle = base::kInvalidPlatformFileValue; +} + +int WebFileUtilitiesImpl::readFromFile(base::PlatformFile handle, + char* data, + int length) { + if (handle == base::kInvalidPlatformFileValue || !data || length <= 0) + return -1; + return base::ReadPlatformFileCurPosNoBestEffort(handle, data, length); +} + +} // namespace content diff --git a/content/child/webfileutilities_impl.h b/content/child/webfileutilities_impl.h new file mode 100644 index 0000000..c0119b6 --- /dev/null +++ b/content/child/webfileutilities_impl.h @@ -0,0 +1,41 @@ +// Copyright 2014 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. + +#ifndef CONTENT_CHILD_WEBFILEUTILITIES_IMPL_H_ +#define CONTENT_CHILD_WEBFILEUTILITIES_IMPL_H_ + +#include "base/platform_file.h" +#include "content/common/content_export.h" +#include "third_party/WebKit/public/platform/WebFileInfo.h" +#include "third_party/WebKit/public/platform/WebFileUtilities.h" + +namespace content { + +class CONTENT_EXPORT WebFileUtilitiesImpl + : NON_EXPORTED_BASE(public blink::WebFileUtilities) { + public: + WebFileUtilitiesImpl(); + virtual ~WebFileUtilitiesImpl(); + + // WebFileUtilities methods: + virtual bool getFileInfo(const blink::WebString& path, + blink::WebFileInfo& result); + virtual blink::WebString directoryName(const blink::WebString& path); + virtual blink::WebString baseName(const blink::WebString& path); + virtual blink::WebURL filePathToURL(const blink::WebString& path); + virtual base::PlatformFile openFile(const blink::WebString& path, int mode); + virtual void closeFile(base::PlatformFile& handle); + virtual int readFromFile(base::PlatformFile handle, char* data, int length); + + void set_sandbox_enabled(bool sandbox_enabled) { + sandbox_enabled_ = sandbox_enabled; + } + + protected: + bool sandbox_enabled_; +}; + +} // namespace content + +#endif // CONTENT_CHILD_WEBFILEUTILITIES_IMPL_H_ diff --git a/content/content_child.gypi b/content/content_child.gypi index 81cd97c..22ccaa4 100644 --- a/content/content_child.gypi +++ b/content/content_child.gypi @@ -29,6 +29,8 @@ 'child/appcache/appcache_frontend_impl.h', 'child/appcache/web_application_cache_host_impl.cc', 'child/appcache/web_application_cache_host_impl.h', + 'child/blink_glue.cc', + 'child/blink_glue.h', 'child/browser_font_resource_trusted.cc', 'child/browser_font_resource_trusted.h', 'child/child_histogram_message_filter.cc', @@ -137,6 +139,8 @@ 'child/service_worker/web_service_worker_impl.h', 'child/service_worker/web_service_worker_provider_impl.cc', 'child/service_worker/web_service_worker_provider_impl.h', + 'child/simple_webmimeregistry_impl.cc', + 'child/simple_webmimeregistry_impl.h', 'child/site_isolation_policy.cc', 'child/site_isolation_policy.h', 'child/socket_stream_dispatcher.cc', @@ -149,10 +153,12 @@ 'child/web_discardable_memory_impl.h', 'child/webblobregistry_impl.cc', 'child/webblobregistry_impl.h', - 'child/webkitplatformsupport_impl.cc', - 'child/webkitplatformsupport_impl.h', + 'child/webfileutilities_impl.cc', + 'child/webfileutilities_impl.h', 'child/webkitplatformsupport_child_impl.cc', 'child/webkitplatformsupport_child_impl.h', + 'child/webkitplatformsupport_impl.cc', + 'child/webkitplatformsupport_impl.h', 'child/webmessageportchannel_impl.cc', 'child/webmessageportchannel_impl.h', 'child/websocket_bridge.cc', diff --git a/content/content_common.gypi b/content/content_common.gypi index 3e5a8a6..750d799 100644 --- a/content/content_common.gypi +++ b/content/content_common.gypi @@ -391,8 +391,8 @@ 'common/url_schemes.cc', 'common/url_schemes.h', 'common/utility_messages.h', - 'common/view_messages.h', 'common/view_message_enums.h', + 'common/view_messages.h', 'common/webplugin_geometry.cc', 'common/webplugin_geometry.h', 'common/websocket.cc', @@ -456,11 +456,6 @@ '../webkit/storage_common.gyp:webkit_storage_common', ], }], - ['OS!="ios" and chrome_multiple_dll!=1', { - 'dependencies': [ - '../webkit/glue/webkit_glue.gyp:glue', - ], - }], ['OS=="mac"', { 'sources': [ 'common/gpu/client/gpu_memory_buffer_impl_io_surface.cc', diff --git a/content/content_plugin.gypi b/content/content_plugin.gypi index 5ad3b80..09d8959 100644 --- a/content/content_plugin.gypi +++ b/content/content_plugin.gypi @@ -9,7 +9,6 @@ '../skia/skia.gyp:skia', '../third_party/WebKit/public/blink.gyp:blink', '../third_party/npapi/npapi.gyp:npapi', - '../webkit/glue/webkit_glue.gyp:glue', ], 'include_dirs': [ '<(INTERMEDIATE_DIR)', diff --git a/content/content_renderer.gypi b/content/content_renderer.gypi index 55fc3b56..66df31b 100644 --- a/content/content_renderer.gypi +++ b/content/content_renderer.gypi @@ -23,7 +23,6 @@ '../webkit/child/webkit_child.gyp:webkit_child', '../webkit/common/gpu/webkit_gpu.gyp:webkit_gpu', '../webkit/common/webkit_common.gyp:webkit_common', - '../webkit/glue/webkit_glue.gyp:glue', '../webkit/renderer/compositor_bindings/compositor_bindings.gyp:webkit_compositor_bindings', '../webkit/renderer/compositor_bindings/compositor_bindings.gyp:webkit_compositor_support', '../webkit/storage_common.gyp:webkit_storage_common', diff --git a/content/content_shell.gypi b/content/content_shell.gypi index aa47b17..fb161d1 100644 --- a/content/content_shell.gypi +++ b/content/content_shell.gypi @@ -59,7 +59,6 @@ '../v8/tools/gyp/v8.gyp:v8', '../webkit/common/user_agent/webkit_user_agent.gyp:user_agent', '../webkit/common/webkit_common.gyp:webkit_common', - '../webkit/glue/webkit_glue.gyp:glue', '../webkit/webkit_resources.gyp:webkit_resources', ], 'include_dirs': [ diff --git a/content/content_tests.gypi b/content/content_tests.gypi index bb64aee..3849a1c 100644 --- a/content/content_tests.gypi +++ b/content/content_tests.gypi @@ -230,7 +230,6 @@ '../webkit/child/webkit_child.gyp:webkit_child', '../webkit/common/gpu/webkit_gpu.gyp:webkit_gpu', '../webkit/common/user_agent/webkit_user_agent.gyp:user_agent', - '../webkit/glue/webkit_glue.gyp:glue', '../webkit/renderer/compositor_bindings/compositor_bindings.gyp:webkit_compositor_support', '../webkit/storage_browser.gyp:webkit_storage_browser', '../webkit/storage_common.gyp:webkit_storage_common', @@ -674,7 +673,6 @@ '../ui/gl/gl.gyp:gl', '../v8/tools/gyp/v8.gyp:v8', '../webkit/common/webkit_common.gyp:webkit_common', - '../webkit/glue/webkit_glue.gyp:glue', '../webkit/child/webkit_child.gyp:webkit_child', '../webkit/storage_browser.gyp:webkit_storage_browser', '../webkit/storage_common.gyp:webkit_storage_common', @@ -934,7 +932,6 @@ '../ui/snapshot/snapshot.gyp:snapshot', '../ui/ui.gyp:ui', '../webkit/child/webkit_child.gyp:webkit_child', - '../webkit/glue/webkit_glue.gyp:glue', ], 'include_dirs': [ '..', @@ -1184,7 +1181,6 @@ # The following two dependencies provide the missing # symbol HeapProfilerStart in Linux component builds. '../webkit/child/webkit_child.gyp:webkit_child', - '../webkit/glue/webkit_glue.gyp:glue', ], 'include_dirs': [ '..', @@ -1216,7 +1212,6 @@ '../third_party/WebKit/public/blink.gyp:blink', # The following two dependencies provide the missing # symbol HeapProfilerStart in Linux component builds. - '../webkit/glue/webkit_glue.gyp:glue', '../webkit/child/webkit_child.gyp:webkit_child', ], 'include_dirs': [ diff --git a/content/plugin/DEPS b/content/plugin/DEPS index a87bacc..9fc12ed 100644 --- a/content/plugin/DEPS +++ b/content/plugin/DEPS @@ -5,6 +5,5 @@ include_rules = [ "+sandbox/win/src", "+skia/ext", "+third_party/npapi", - "+webkit/glue", ] diff --git a/content/renderer/renderer_webkitplatformsupport_impl.cc b/content/renderer/renderer_webkitplatformsupport_impl.cc index 1d3e471..85bdea3 100644 --- a/content/renderer/renderer_webkitplatformsupport_impl.cc +++ b/content/renderer/renderer_webkitplatformsupport_impl.cc @@ -14,15 +14,18 @@ #include "base/platform_file.h" #include "base/strings/string_number_conversions.h" #include "base/strings/utf_string_conversions.h" +#include "content/child/blink_glue.h" #include "content/child/database_util.h" #include "content/child/fileapi/webfilesystem_impl.h" #include "content/child/indexed_db/webidbfactory_impl.h" #include "content/child/npapi/npobject_util.h" #include "content/child/quota_dispatcher.h" #include "content/child/quota_message_filter.h" +#include "content/child/simple_webmimeregistry_impl.h" #include "content/child/thread_safe_sender.h" #include "content/child/web_database_observer_impl.h" #include "content/child/webblobregistry_impl.h" +#include "content/child/webfileutilities_impl.h" #include "content/child/webmessageportchannel_impl.h" #include "content/common/file_utilities_messages.h" #include "content/common/gpu/client/context_provider_command_buffer.h" @@ -73,9 +76,6 @@ #include "url/gurl.h" #include "webkit/common/gpu/context_provider_web_context.h" #include "webkit/common/quota/quota_types.h" -#include "webkit/glue/simple_webmimeregistry_impl.h" -#include "webkit/glue/webfileutilities_impl.h" -#include "webkit/glue/webkit_glue.h" #if defined(OS_WIN) #include "content/common/child_process_messages.h" @@ -140,7 +140,7 @@ base::LazyInstance<blink::WebDeviceOrientationData>::Leaky //------------------------------------------------------------------------------ class RendererWebKitPlatformSupportImpl::MimeRegistry - : public webkit_glue::SimpleWebMimeRegistryImpl { + : public SimpleWebMimeRegistryImpl { public: virtual blink::WebMimeRegistry::SupportsType supportsMediaMIMEType( const blink::WebString& mime_type, @@ -155,7 +155,7 @@ class RendererWebKitPlatformSupportImpl::MimeRegistry }; class RendererWebKitPlatformSupportImpl::FileUtilities - : public webkit_glue::WebFileUtilitiesImpl { + : public WebFileUtilitiesImpl { public: explicit FileUtilities(ThreadSafeSender* sender) : thread_safe_sender_(sender) {} @@ -486,7 +486,7 @@ bool RendererWebKitPlatformSupportImpl::FileUtilities::getFileInfo( status != base::File::FILE_OK) { return false; } - webkit_glue::FileInfoToWebFileInfo(file_info, &web_file_info); + FileInfoToWebFileInfo(file_info, &web_file_info); web_file_info.platformPath = path; return true; } diff --git a/content/test/test_webkit_platform_support.cc b/content/test/test_webkit_platform_support.cc index f013d77..49f7c90 100644 --- a/content/test/test_webkit_platform_support.cc +++ b/content/test/test_webkit_platform_support.cc @@ -34,7 +34,6 @@ #include "v8/include/v8.h" #include "webkit/browser/database/vfs_backend.h" #include "webkit/child/webkitplatformsupport_impl.h" -#include "webkit/glue/simple_webmimeregistry_impl.h" #include "webkit/renderer/compositor_bindings/web_compositor_support_impl.h" #if defined(OS_WIN) diff --git a/content/test/test_webkit_platform_support.h b/content/test/test_webkit_platform_support.h index ae5880f..1dfb906 100644 --- a/content/test/test_webkit_platform_support.h +++ b/content/test/test_webkit_platform_support.h @@ -7,12 +7,12 @@ #include "base/compiler_specific.h" #include "base/files/scoped_temp_dir.h" +#include "content/child/simple_webmimeregistry_impl.h" +#include "content/child/webfileutilities_impl.h" #include "content/child/webkitplatformsupport_child_impl.h" #include "content/test/mock_webclipboard_impl.h" #include "content/test/weburl_loader_mock_factory.h" #include "third_party/WebKit/public/platform/WebUnitTestSupport.h" -#include "webkit/glue/simple_webmimeregistry_impl.h" -#include "webkit/glue/webfileutilities_impl.h" #include "webkit/renderer/compositor_bindings/web_compositor_support_impl.h" namespace blink { @@ -97,9 +97,9 @@ class TestWebKitPlatformSupport virtual blink::WebData readFromFile(const blink::WebString& path); private: - webkit_glue::SimpleWebMimeRegistryImpl mime_registry_; + SimpleWebMimeRegistryImpl mime_registry_; scoped_ptr<MockWebClipboardImpl> mock_clipboard_; - webkit_glue::WebFileUtilitiesImpl file_utilities_; + WebFileUtilitiesImpl file_utilities_; base::ScopedTempDir file_system_root_; scoped_ptr<WebURLLoaderMockFactory> url_loader_factory_; webkit::WebCompositorSupportImpl compositor_support_; diff --git a/content/utility/DEPS b/content/utility/DEPS index f7630c38..0818b2c 100644 --- a/content/utility/DEPS +++ b/content/utility/DEPS @@ -2,5 +2,4 @@ include_rules = [ "+content/child", "+content/public/utility", "+sandbox/win/src", - "+webkit/glue", ] diff --git a/content/worker/DEPS b/content/worker/DEPS index 619c5b7..6e9ea80 100644 --- a/content/worker/DEPS +++ b/content/worker/DEPS @@ -2,6 +2,5 @@ include_rules = [ "+content/child", "+sandbox/win/src", "+v8/include/v8.h", - "+webkit/glue", ] diff --git a/content/worker/worker_webkitplatformsupport_impl.cc b/content/worker/worker_webkitplatformsupport_impl.cc index a83cd34..553f677 100644 --- a/content/worker/worker_webkitplatformsupport_impl.cc +++ b/content/worker/worker_webkitplatformsupport_impl.cc @@ -9,6 +9,7 @@ #include "base/message_loop/message_loop_proxy.h" #include "base/platform_file.h" #include "base/strings/utf_string_conversions.h" +#include "content/child/blink_glue.h" #include "content/child/database_util.h" #include "content/child/fileapi/webfilesystem_impl.h" #include "content/child/indexed_db/webidbfactory_impl.h" @@ -17,6 +18,7 @@ #include "content/child/thread_safe_sender.h" #include "content/child/web_database_observer_impl.h" #include "content/child/webblobregistry_impl.h" +#include "content/child/webfileutilities_impl.h" #include "content/child/webmessageportchannel_impl.h" #include "content/common/file_utilities_messages.h" #include "content/common/mime_registry_messages.h" @@ -28,8 +30,6 @@ #include "third_party/WebKit/public/platform/WebString.h" #include "third_party/WebKit/public/platform/WebURL.h" #include "webkit/common/quota/quota_types.h" -#include "webkit/glue/webfileutilities_impl.h" -#include "webkit/glue/webkit_glue.h" using blink::Platform; using blink::WebBlobRegistry; @@ -49,7 +49,7 @@ namespace content { // TODO(kinuko): Probably this could be consolidated into // RendererWebKitPlatformSupportImpl::FileUtilities. class WorkerWebKitPlatformSupportImpl::FileUtilities - : public webkit_glue::WebFileUtilitiesImpl { + : public WebFileUtilitiesImpl { public: explicit FileUtilities(ThreadSafeSender* sender) : thread_safe_sender_(sender) {} @@ -69,7 +69,7 @@ bool WorkerWebKitPlatformSupportImpl::FileUtilities::getFileInfo( status != base::File::FILE_OK) { return false; } - webkit_glue::FileInfoToWebFileInfo(file_info, &web_file_info); + FileInfoToWebFileInfo(file_info, &web_file_info); web_file_info.platformPath = path; return true; } |