summaryrefslogtreecommitdiffstats
path: root/chrome/renderer/renderer_webkitclient_impl.cc
diff options
context:
space:
mode:
authorjam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-12-13 17:00:42 +0000
committerjam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-12-13 17:00:42 +0000
commit9f547bfd7465f0bcb29ab1d0225dddf81e7ebed8 (patch)
treeb9991ef261fb6107a25947da1231c36e70919bd1 /chrome/renderer/renderer_webkitclient_impl.cc
parentdc8caba097e35e536697f3bf6605257317640d26 (diff)
downloadchromium_src-9f547bfd7465f0bcb29ab1d0225dddf81e7ebed8.zip
chromium_src-9f547bfd7465f0bcb29ab1d0225dddf81e7ebed8.tar.gz
chromium_src-9f547bfd7465f0bcb29ab1d0225dddf81e7ebed8.tar.bz2
Switch a bunch of remaining filters to derive from BrowserMessageFilters so that ResourceMessageFilter doesn't have to know about them and vice versa. A bunch of small cleanup in the process. I've added new message files for classes that want their messages dispatched on threads other than the IO.
Review URL: http://codereview.chromium.org/5698008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@69008 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/renderer/renderer_webkitclient_impl.cc')
-rw-r--r--chrome/renderer/renderer_webkitclient_impl.cc19
1 files changed, 11 insertions, 8 deletions
diff --git a/chrome/renderer/renderer_webkitclient_impl.cc b/chrome/renderer/renderer_webkitclient_impl.cc
index 90a2ee5..1025e69 100644
--- a/chrome/renderer/renderer_webkitclient_impl.cc
+++ b/chrome/renderer/renderer_webkitclient_impl.cc
@@ -12,6 +12,8 @@
#include "chrome/common/chrome_switches.h"
#include "chrome/common/database_util.h"
#include "chrome/common/file_system/webfilesystem_impl.h"
+#include "chrome/common/file_utilities_messages.h"
+#include "chrome/common/mime_registry_messages.h"
#include "chrome/common/render_messages.h"
#include "chrome/common/webblobregistry_impl.h"
#include "chrome/common/webmessageportchannel_impl.h"
@@ -324,8 +326,9 @@ WebString RendererWebKitClientImpl::MimeRegistry::mimeTypeForExtension(
// The sandbox restricts our access to the registry, so we need to proxy
// these calls over to the browser process.
std::string mime_type;
- RenderThread::current()->Send(new ViewHostMsg_GetMimeTypeFromExtension(
- webkit_glue::WebStringToFilePathString(file_extension), &mime_type));
+ RenderThread::current()->Send(
+ new MimeRegistryMsg_GetMimeTypeFromExtension(
+ webkit_glue::WebStringToFilePathString(file_extension), &mime_type));
return ASCIIToUTF16(mime_type);
}
@@ -338,7 +341,7 @@ WebString RendererWebKitClientImpl::MimeRegistry::mimeTypeFromFile(
// The sandbox restricts our access to the registry, so we need to proxy
// these calls over to the browser process.
std::string mime_type;
- RenderThread::current()->Send(new ViewHostMsg_GetMimeTypeFromFile(
+ RenderThread::current()->Send(new MimeRegistryMsg_GetMimeTypeFromFile(
FilePath(webkit_glue::WebStringToFilePathString(file_path)),
&mime_type));
return ASCIIToUTF16(mime_type);
@@ -354,8 +357,8 @@ WebString RendererWebKitClientImpl::MimeRegistry::preferredExtensionForMIMEType(
// these calls over to the browser process.
FilePath::StringType file_extension;
RenderThread::current()->Send(
- new ViewHostMsg_GetPreferredExtensionForMimeType(UTF16ToASCII(mime_type),
- &file_extension));
+ new MimeRegistryMsg_GetPreferredExtensionForMimeType(
+ UTF16ToASCII(mime_type), &file_extension));
return webkit_glue::FilePathStringToWebString(file_extension);
}
@@ -363,7 +366,7 @@ WebString RendererWebKitClientImpl::MimeRegistry::preferredExtensionForMIMEType(
bool RendererWebKitClientImpl::FileUtilities::getFileSize(const WebString& path,
long long& result) {
- if (SendSyncMessageFromAnyThread(new ViewHostMsg_GetFileSize(
+ if (SendSyncMessageFromAnyThread(new FileUtilitiesMsg_GetFileSize(
webkit_glue::WebStringToFilePath(path),
reinterpret_cast<int64*>(&result)))) {
return result >= 0;
@@ -384,7 +387,7 @@ bool RendererWebKitClientImpl::FileUtilities::getFileModificationTime(
const WebString& path,
double& result) {
base::Time time;
- if (SendSyncMessageFromAnyThread(new ViewHostMsg_GetFileModificationTime(
+ if (SendSyncMessageFromAnyThread(new FileUtilitiesMsg_GetFileModificationTime(
webkit_glue::WebStringToFilePath(path), &time))) {
result = time.ToDoubleT();
return !time.is_null();
@@ -398,7 +401,7 @@ base::PlatformFile RendererWebKitClientImpl::FileUtilities::openFile(
const WebString& path,
int mode) {
IPC::PlatformFileForTransit handle = IPC::InvalidPlatformFileForTransit();
- SendSyncMessageFromAnyThread(new ViewHostMsg_OpenFile(
+ SendSyncMessageFromAnyThread(new FileUtilitiesMsg_OpenFile(
webkit_glue::WebStringToFilePath(path), mode, &handle));
return IPC::PlatformFileForTransitToPlatformFile(handle);
}