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

Unified Diff: chrome/common/render_messages.h

Issue 340050: Add the plumbing and test code for plugins opening files from the sandbox. Th... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 1 month 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 | « chrome/browser/renderer_host/resource_message_filter.cc ('k') | chrome/common/render_messages_internal.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/common/render_messages.h
===================================================================
--- chrome/common/render_messages.h (revision 30698)
+++ chrome/common/render_messages.h (working copy)
@@ -396,6 +396,16 @@
#endif
};
+struct ViewMsg_OpenFileForPluginResponse_Params {
+ // Note: if we end up having to add a directory handle, this should be
+ // combined with the DatabaseOpenFileResponse_Params struct.
+#if defined(OS_WIN)
+ base::PlatformFile file_handle;
+#elif defined(OS_POSIX)
+ base::FileDescriptor file_handle;
+#endif
+};
+
// Parameters to describe a rendered page.
struct ViewHostMsg_DidPrintPage_Params {
// A shared memory handle to the EMF data. This data can be quite large so a
@@ -1775,6 +1785,20 @@
};
template <>
+struct ParamTraits<ViewMsg_OpenFileForPluginResponse_Params> {
+ typedef ViewMsg_OpenFileForPluginResponse_Params param_type;
+ static void Write(Message* m, const param_type& p) {
+ WriteParam(m, p.file_handle);
+ }
+ static bool Read(const Message* m, void** iter, param_type* p) {
+ return ReadParam(m, iter, &p->file_handle);
+ }
+ static void Log(const param_type& p, std::wstring* l) {
+ LogParam(p.file_handle, l);
+ }
+};
+
+template <>
struct ParamTraits<appcache::Status> {
typedef appcache::Status param_type;
static void Write(Message* m, const param_type& p) {
« no previous file with comments | « chrome/browser/renderer_host/resource_message_filter.cc ('k') | chrome/common/render_messages_internal.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698