| Index: ppapi/native_client/src/trusted/plugin/temporary_file.h
|
| diff --git a/ppapi/native_client/src/trusted/plugin/temporary_file.h b/ppapi/native_client/src/trusted/plugin/temporary_file.h
|
| index fcfc7df4ad7eeba508463613653d6aa60b413598..4bc8f7140e389054d1d6e7d84408c0a5e342acbb 100644
|
| --- a/ppapi/native_client/src/trusted/plugin/temporary_file.h
|
| +++ b/ppapi/native_client/src/trusted/plugin/temporary_file.h
|
| @@ -9,7 +9,6 @@
|
| #include "native_client/src/trusted/desc/nacl_desc_wrapper.h"
|
|
|
| #include "ppapi/c/private/pp_file_handle.h"
|
| -#include "ppapi/cpp/completion_callback.h"
|
|
|
| namespace plugin {
|
|
|
| @@ -43,7 +42,7 @@ class TempFile {
|
| // Opens a temporary file object and descriptor wrapper referring to the file.
|
| // If |writeable| is true, the descriptor will be opened for writing, and
|
| // write_wrapper will return a valid pointer, otherwise it will return NULL.
|
| - void Open(const pp::CompletionCallback& cb, bool writeable);
|
| + int32_t Open(bool writeable);
|
| // Resets file position of the handle, for reuse.
|
| bool Reset();
|
|
|
| @@ -51,11 +50,13 @@ class TempFile {
|
| // The nacl::DescWrapper* for the writeable version of the file.
|
| nacl::DescWrapper* write_wrapper() { return write_wrapper_.get(); }
|
| nacl::DescWrapper* read_wrapper() { return read_wrapper_.get(); }
|
| - nacl::DescWrapper* release_read_wrapper() {
|
| - return read_wrapper_.release();
|
| - }
|
|
|
| - PP_FileHandle* existing_handle() { return &existing_handle_; }
|
| + // Returns the handle to the file repesented and resets the internal handle
|
| + // and all wrappers.
|
| + PP_FileHandle TakeFileHandle();
|
| +
|
| + // Used by GetNexeFd() to set the underlying internal handle.
|
| + PP_FileHandle* internal_handle() { return &internal_handle_; }
|
|
|
| private:
|
| NACL_DISALLOW_COPY_AND_ASSIGN(TempFile);
|
| @@ -63,7 +64,7 @@ class TempFile {
|
| Plugin* plugin_;
|
| nacl::scoped_ptr<nacl::DescWrapper> read_wrapper_;
|
| nacl::scoped_ptr<nacl::DescWrapper> write_wrapper_;
|
| - PP_FileHandle existing_handle_;
|
| + PP_FileHandle internal_handle_;
|
| };
|
|
|
| } // namespace plugin
|
|
|