Index: ppapi/cpp/private/file_io_private.h |
diff --git a/ppapi/cpp/private/file_io_private.h b/ppapi/cpp/private/file_io_private.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..c291be564bc6e9b1e233a6289e2aba4bb42e75c9 |
--- /dev/null |
+++ b/ppapi/cpp/private/file_io_private.h |
@@ -0,0 +1,42 @@ |
+// Copyright (c) 2013 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 PPAPI_CPP_PRIVATE_FILE_IO_PRIVATE_H_ |
+#define PPAPI_CPP_PRIVATE_FILE_IO_PRIVATE_H_ |
+ |
+#include "ppapi/c/pp_stdint.h" |
+#include "ppapi/c/private/pp_file_handle.h" |
+#include "ppapi/cpp/completion_callback.h" |
+#include "ppapi/cpp/file_io.h" |
+ |
+namespace pp { |
+ |
+class FileIO; |
+ |
+class FileIO_Private : public FileIO { |
+ public: |
+ FileIO_Private(); |
+ explicit FileIO_Private(const InstanceHandle& instance); |
+ |
+ // This interface may leak the memory and file handle if the factory |
+ // of |cc| is destructed. We need to use |
+ // CompletionCallbackWithOutput to prevent the memory leak and |
+ // create something like PassFileHandle to prevent the handle leak. |
+ // See https://codereview.chromium.org/13032002/#ps33001 |
+ // |
+ // Currently, TestCompletionCallbackWithOutput won't work for non |
+ // vector types, so we should fix it first. |
+ // http://crbug.com/224741 |
+ // |
+ // Meanwhile, this interface should be used only from tests and |
+ // other code should use the C interface of this API. |
+ // |
+ // TODO(hamaji): Fix. http://crbug.com/224745 |
+ int32_t RequestOSFileHandle(PP_FileHandle* result_handle, |
+ const CompletionCallback& cc); |
+}; |
+ |
+} // namespace pp |
+ |
+#endif // PPAPI_CPP_PRIVATE_FILE_IO_PRIVATE_H_ |