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

Unified Diff: ppapi/c/trusted/ppb_file_io_trusted.h

Issue 7396002: More trivial cleanupi of ppapi/c/trusted headers (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 5 months 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 | « ppapi/c/trusted/ppb_buffer_trusted.h ('k') | ppapi/c/trusted/ppb_image_data_trusted.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ppapi/c/trusted/ppb_file_io_trusted.h
===================================================================
--- ppapi/c/trusted/ppb_file_io_trusted.h (revision 92804)
+++ ppapi/c/trusted/ppb_file_io_trusted.h (working copy)
@@ -2,47 +2,68 @@
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
-#ifndef PPAPI_C_PPB_FILE_IO_TRUSTED_H_
-#define PPAPI_C_PPB_FILE_IO_TRUSTED_H_
+/* From trusted/ppb_file_io_trusted.idl modified Mon Jul 18 10:45:10 2011. */
+
+#ifndef PPAPI_C_TRUSTED_PPB_FILE_IO_TRUSTED_H_
+#define PPAPI_C_TRUSTED_PPB_FILE_IO_TRUSTED_H_
+
+#include "ppapi/c/pp_completion_callback.h"
+#include "ppapi/c/pp_macros.h"
#include "ppapi/c/pp_resource.h"
#include "ppapi/c/pp_stdint.h"
-struct PP_CompletionCallback;
+/**
+ * @file
+ *
+ * This file defines the trusted file IO interface
+ */
+
+/**
+ * @addtogroup Interfaces
+ * @{
+ */
+/* Available only to trusted implementations. */
#define PPB_FILEIOTRUSTED_INTERFACE_0_4 "PPB_FileIOTrusted;0.4"
#define PPB_FILEIOTRUSTED_INTERFACE PPB_FILEIOTRUSTED_INTERFACE_0_4
-// Available only to trusted implementations.
struct PPB_FileIOTrusted {
- // Returns a file descriptor corresponding to the given FileIO object. On
- // Windows, returns a HANDLE; on all other platforms, returns a POSIX file
- // descriptor. The FileIO object must have been opened with a successful
- // call to FileIO::Open. The file descriptor will be closed automatically
- // when the FileIO object is closed or destroyed.
+ /**
+ * Returns a file descriptor corresponding to the given FileIO object. On
+ * Windows, returns a HANDLE; on all other platforms, returns a POSIX file
+ * descriptor. The FileIO object must have been opened with a successful
+ * call to FileIO::Open. The file descriptor will be closed automatically
+ * when the FileIO object is closed or destroyed.
+ */
int32_t (*GetOSFileDescriptor)(PP_Resource file_io);
-
- // Notifies the browser that underlying file will be modified. This gives
- // the browser the opportunity to apply quota restrictions and possibly
- // return an error to indicate that the write is not allowed.
+ /**
+ * Notifies the browser that underlying file will be modified. This gives
+ * the browser the opportunity to apply quota restrictions and possibly
+ * return an error to indicate that the write is not allowed.
+ */
int32_t (*WillWrite)(PP_Resource file_io,
int64_t offset,
int32_t bytes_to_write,
struct PP_CompletionCallback callback);
-
- // Notifies the browser that underlying file will be modified. This gives
- // the browser the opportunity to apply quota restrictions and possibly
- // return an error to indicate that the write is not allowed.
+ /**
+ * Notifies the browser that underlying file will be modified. This gives
+ * the browser the opportunity to apply quota restrictions and possibly
+ * return an error to indicate that the write is not allowed.
+ *
+ * TODO(darin): Maybe unify the above into a single WillChangeFileSize
+ * method? The above methods have the advantage of mapping to PPB_FileIO
+ * Write and SetLength calls. WillChangeFileSize would require the caller to
+ * compute the file size resulting from a Write call, which may be
+ * undesirable.
+ */
dmichael (off chromium) 2011/07/18 21:19:40 Is there any way to have comments go in to a separ
int32_t (*WillSetLength)(PP_Resource file_io,
int64_t length,
struct PP_CompletionCallback callback);
-
- // TODO(darin): Maybe unify the above into a single WillChangeFileSize
- // method? The above methods have the advantage of mapping to PPB_FileIO
- // Write and SetLength calls. WillChangeFileSize would require the caller to
- // compute the file size resulting from a Write call, which may be
- // undesirable.
};
+/**
+ * @}
+ */
-#endif /* PPAPI_C_PPB_FILE_IO_TRUSTED_H_ */
+#endif /* PPAPI_C_TRUSTED_PPB_FILE_IO_TRUSTED_H_ */
« no previous file with comments | « ppapi/c/trusted/ppb_buffer_trusted.h ('k') | ppapi/c/trusted/ppb_image_data_trusted.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698