diff options
Diffstat (limited to 'chrome/common')
-rw-r--r-- | chrome/common/pepper_plugin_registry.cc | 2 | ||||
-rw-r--r-- | chrome/common/render_messages.cc | 20 | ||||
-rw-r--r-- | chrome/common/render_messages.h | 9 | ||||
-rw-r--r-- | chrome/common/render_messages_internal.h | 38 |
4 files changed, 69 insertions, 0 deletions
diff --git a/chrome/common/pepper_plugin_registry.cc b/chrome/common/pepper_plugin_registry.cc index 87a2bd3..92fae2e 100644 --- a/chrome/common/pepper_plugin_registry.cc +++ b/chrome/common/pepper_plugin_registry.cc @@ -193,6 +193,7 @@ PepperPluginRegistry::PepperPluginRegistry() { DLOG(ERROR) << "Failed to load pepper module: " << path.value(); continue; } + module->set_name(it->name); modules_[path] = module; } @@ -208,6 +209,7 @@ PepperPluginRegistry::PepperPluginRegistry() { DLOG(ERROR) << "Failed to load pepper module: " << path.value(); continue; } + module->set_name(plugins[i].name); modules_[path] = module; } } diff --git a/chrome/common/render_messages.cc b/chrome/common/render_messages.cc index 5d422da..b6e6d66 100644 --- a/chrome/common/render_messages.cc +++ b/chrome/common/render_messages.cc @@ -1109,4 +1109,24 @@ void ParamTraits<AudioBuffersState>::Log(const param_type& p, std::string* l) { l->append(")"); } +void ParamTraits<PepperDirEntry>::Write(Message* m, const param_type& p) { + WriteParam(m, p.name); + WriteParam(m, p.is_dir); +} + +bool ParamTraits<PepperDirEntry>::Read(const Message* m, + void** iter, + param_type* p) { + return ReadParam(m, iter, &p->name) && + ReadParam(m, iter, &p->is_dir); +} + +void ParamTraits<PepperDirEntry>::Log(const param_type& p, std::string* l) { + l->append("("); + LogParam(p.name, l); + l->append(", "); + LogParam(p.is_dir, l); + l->append(")"); +} + } // namespace IPC diff --git a/chrome/common/render_messages.h b/chrome/common/render_messages.h index 29d50e0..ce893d2 100644 --- a/chrome/common/render_messages.h +++ b/chrome/common/render_messages.h @@ -29,6 +29,7 @@ #include "third_party/WebKit/WebKit/chromium/public/WebStorageArea.h" #include "webkit/appcache/appcache_interfaces.h" // enum appcache::Status #include "webkit/fileapi/file_system_types.h" // enum fileapi::FileSystemType +#include "webkit/glue/plugins/pepper_dir_contents.h" #if defined(OS_MACOSX) struct FontDescriptor; @@ -606,6 +607,14 @@ struct ParamTraits<AudioBuffersState> { static void Log(const param_type& p, std::string* l); }; +template <> +struct ParamTraits<PepperDirEntry> { + typedef PepperDirEntry param_type; + static void Write(Message* m, const param_type& p); + static bool Read(const Message* m, void** iter, param_type* p); + static void Log(const param_type& p, std::string* l); +}; + } // namespace IPC #define MESSAGES_INTERNAL_FILE "chrome/common/render_messages_internal.h" diff --git a/chrome/common/render_messages_internal.h b/chrome/common/render_messages_internal.h index 1cfa70b3..75eacdf 100644 --- a/chrome/common/render_messages_internal.h +++ b/chrome/common/render_messages_internal.h @@ -2986,4 +2986,42 @@ IPC_BEGIN_MESSAGES(ViewHost) IPC_MESSAGE_ROUTED1(ViewHostMsg_UpdateContentRestrictions, int /* restrictions */) + // Trusted Pepper Filesystem messages ---------------------------------------- + + // Open the file. + IPC_SYNC_MESSAGE_CONTROL2_2(ViewHostMsg_PepperOpenFile, + FilePath /* path */, + int /* flags */, + base::PlatformFileError /* error_code */, + IPC::PlatformFileForTransit /* result */) + + // Rename the file. + IPC_SYNC_MESSAGE_CONTROL2_1(ViewHostMsg_PepperRenameFile, + FilePath /* path_from */, + FilePath /* path_to */, + base::PlatformFileError /* error_code */) + + // Delete the file. + IPC_SYNC_MESSAGE_CONTROL2_1(ViewHostMsg_PepperDeleteFileOrDir, + FilePath /* path */, + bool /* recursive */, + base::PlatformFileError /* error_code */) + + // Create the directory. + IPC_SYNC_MESSAGE_CONTROL1_1(ViewHostMsg_PepperCreateDir, + FilePath /* path */, + base::PlatformFileError /* error_code */) + + // Query the file's info. + IPC_SYNC_MESSAGE_CONTROL1_2(ViewHostMsg_PepperQueryFile, + FilePath /* path */, + base::PlatformFileInfo, /* info */ + base::PlatformFileError /* error_code */) + + // Get the directory's contents. + IPC_SYNC_MESSAGE_CONTROL1_2(ViewHostMsg_PepperGetDirContents, + FilePath /* path */, + PepperDirContents, /* contents */ + base::PlatformFileError /* error_code */) + IPC_END_MESSAGES(ViewHost) |