diff options
Diffstat (limited to 'chrome/common')
-rw-r--r-- | chrome/common/file_utilities_messages.cc | 8 | ||||
-rw-r--r-- | chrome/common/file_utilities_messages.h | 35 | ||||
-rw-r--r-- | chrome/common/mime_registry_messages.cc | 8 | ||||
-rw-r--r-- | chrome/common/mime_registry_messages.h | 28 | ||||
-rw-r--r-- | chrome/common/render_messages_internal.h | 28 |
5 files changed, 79 insertions, 28 deletions
diff --git a/chrome/common/file_utilities_messages.cc b/chrome/common/file_utilities_messages.cc new file mode 100644 index 0000000..b1236ae --- /dev/null +++ b/chrome/common/file_utilities_messages.cc @@ -0,0 +1,8 @@ +// Copyright (c) 2010 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 "chrome/common/common_param_traits.h" + +#define IPC_MESSAGE_IMPL +#include "chrome/common/file_utilities_messages.h" diff --git a/chrome/common/file_utilities_messages.h b/chrome/common/file_utilities_messages.h new file mode 100644 index 0000000..6b8157d --- /dev/null +++ b/chrome/common/file_utilities_messages.h @@ -0,0 +1,35 @@ +// Copyright (c) 2010 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 CHROME_COMMON_FILE_UTILITIES_MESSAGES_H_ +#define CHROME_COMMON_FILE_UTILITIES_MESSAGES_H_ +#pragma once + +#include "base/time.h" +#include "ipc/ipc_message_macros.h" +#include "ipc/ipc_param_traits.h" +#include "ipc/ipc_platform_file.h" + +#define IPC_MESSAGE_START FileUtilitiesMsgStart + +// File utilities messages sent from the renderer to the browser. + +// Get file size in bytes. Set result to -1 if failed to get the file size. +IPC_SYNC_MESSAGE_CONTROL1_1(FileUtilitiesMsg_GetFileSize, + FilePath /* path */, + int64 /* result */) + +// Get file modification time in seconds. Set result to 0 if failed to get the +// file modification time. +IPC_SYNC_MESSAGE_CONTROL1_1(FileUtilitiesMsg_GetFileModificationTime, + FilePath /* path */, + base::Time /* result */) + +// Open the file. +IPC_SYNC_MESSAGE_CONTROL2_1(FileUtilitiesMsg_OpenFile, + FilePath /* path */, + int /* mode */, + IPC::PlatformFileForTransit /* result */) + +#endif // CHROME_COMMON_FILE_UTILITIES_MESSAGES_H_ diff --git a/chrome/common/mime_registry_messages.cc b/chrome/common/mime_registry_messages.cc new file mode 100644 index 0000000..e8c2b9b --- /dev/null +++ b/chrome/common/mime_registry_messages.cc @@ -0,0 +1,8 @@ +// Copyright (c) 2010 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 "chrome/common/common_param_traits.h" + +#define IPC_MESSAGE_IMPL +#include "chrome/common/mime_registry_messages.h" diff --git a/chrome/common/mime_registry_messages.h b/chrome/common/mime_registry_messages.h new file mode 100644 index 0000000..636009f --- /dev/null +++ b/chrome/common/mime_registry_messages.h @@ -0,0 +1,28 @@ +// Copyright (c) 2010 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 CHROME_COMMON_MIME_REGISTRY_MESSAGES_H_ +#define CHROME_COMMON_MIME_REGISTRY_MESSAGES_H_ +#pragma once + +#include "base/file_path.h" +#include "ipc/ipc_message_macros.h" +#include "ipc/ipc_param_traits.h" + +#define IPC_MESSAGE_START MimeRegistryMsgStart + +// Mime registry messages sent from the renderer to the browser. + +// Sent to query MIME information. +IPC_SYNC_MESSAGE_CONTROL1_1(MimeRegistryMsg_GetMimeTypeFromExtension, + FilePath::StringType /* extension */, + std::string /* mime_type */) +IPC_SYNC_MESSAGE_CONTROL1_1(MimeRegistryMsg_GetMimeTypeFromFile, + FilePath /* file_path */, + std::string /* mime_type */) +IPC_SYNC_MESSAGE_CONTROL1_1(MimeRegistryMsg_GetPreferredExtensionForMimeType, + std::string /* mime_type */, + FilePath::StringType /* extension */) + +#endif // CHROME_COMMON_MIME_REGISTRY_MESSAGES_H_ diff --git a/chrome/common/render_messages_internal.h b/chrome/common/render_messages_internal.h index 29c4a7f..fa1ce45 100644 --- a/chrome/common/render_messages_internal.h +++ b/chrome/common/render_messages_internal.h @@ -1931,17 +1931,6 @@ IPC_MESSAGE_ROUTED4(ViewHostMsg_DidDownloadFavIcon, bool /* true if there was a network error */, SkBitmap /* image_data */) -// Sent to query MIME information. -IPC_SYNC_MESSAGE_CONTROL1_1(ViewHostMsg_GetMimeTypeFromExtension, - FilePath::StringType /* extension */, - std::string /* mime_type */) -IPC_SYNC_MESSAGE_CONTROL1_1(ViewHostMsg_GetMimeTypeFromFile, - FilePath /* file_path */, - std::string /* mime_type */) -IPC_SYNC_MESSAGE_CONTROL1_1(ViewHostMsg_GetPreferredExtensionForMimeType, - std::string /* mime_type */, - FilePath::StringType /* extension */) - // Get the CPBrowsingContext associated with the renderer sending this // message. IPC_SYNC_MESSAGE_CONTROL0_1(ViewHostMsg_GetCPBrowsingContext, @@ -2660,23 +2649,6 @@ IPC_MESSAGE_CONTROL1(ViewHostMsg_IDBTransactionDidCompleteTaskEvents, IPC_MESSAGE_CONTROL1(ViewHostMsg_IDBTransactionDestroyed, int32 /* idb_transaction_id */) -// Get file size in bytes. Set result to -1 if failed to get the file size. -IPC_SYNC_MESSAGE_CONTROL1_1(ViewHostMsg_GetFileSize, - FilePath /* path */, - int64 /* result */) - -// Get file modification time in seconds. Set result to 0 if failed to get the -// file modification time. -IPC_SYNC_MESSAGE_CONTROL1_1(ViewHostMsg_GetFileModificationTime, - FilePath /* path */, - base::Time /* result */) - -// Open the file. -IPC_SYNC_MESSAGE_CONTROL2_1(ViewHostMsg_OpenFile, - FilePath /* path */, - int /* mode */, - IPC::PlatformFileForTransit /* result */) - // Opens a file asynchronously. The response returns a file descriptor // and an error code from base/platform_file.h. IPC_MESSAGE_ROUTED3(ViewHostMsg_AsyncOpenFile, |