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

Unified Diff: webkit/plugins/ppapi/ppb_file_io_impl.h

Issue 7006022: Revert 87415 - Convert more interfaces to the new thunk system. This goes up to and including (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 years, 7 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 | « webkit/plugins/ppapi/ppb_file_chooser_impl.cc ('k') | webkit/plugins/ppapi/ppb_file_io_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/plugins/ppapi/ppb_file_io_impl.h
===================================================================
--- webkit/plugins/ppapi/ppb_file_io_impl.h (revision 87436)
+++ webkit/plugins/ppapi/ppb_file_io_impl.h (working copy)
@@ -13,7 +13,6 @@
#include "base/platform_file.h"
#include "ppapi/c/dev/pp_file_info_dev.h"
#include "ppapi/c/pp_time.h"
-#include "ppapi/thunk/ppb_file_io_api.h"
#include "webkit/plugins/ppapi/callbacks.h"
#include "webkit/plugins/ppapi/plugin_delegate.h"
#include "webkit/plugins/ppapi/resource.h"
@@ -28,45 +27,52 @@
class PluginModule;
class PPB_FileRef_Impl;
-class PPB_FileIO_Impl : public Resource,
- public ::ppapi::thunk::PPB_FileIO_API {
+class PPB_FileIO_Impl : public Resource {
public:
explicit PPB_FileIO_Impl(PluginInstance* instance);
virtual ~PPB_FileIO_Impl();
- static PP_Resource Create(PP_Instance instance);
+ // Returns a pointer to the interface implementing PPB_FileIO that is exposed
+ // to the plugin.
+ static const PPB_FileIO_Dev* GetInterface();
- // ResourceObjectBase overrides.
- ::ppapi::thunk::PPB_FileIO_API* AsPPB_FileIO_API();
+ // Returns a pointer to the interface implementing PPB_FileIOTrusted that is
+ // exposed to the plugin.
+ static const PPB_FileIOTrusted_Dev* GetTrustedInterface();
- // PPB_FileIO_API implementation.
- virtual int32_t Open(PP_Resource file_ref,
- int32_t open_flags,
- PP_CompletionCallback callback) OVERRIDE;
- virtual int32_t Query(PP_FileInfo_Dev* info,
- PP_CompletionCallback callback) OVERRIDE;
- virtual int32_t Touch(PP_Time last_access_time,
- PP_Time last_modified_time,
- PP_CompletionCallback callback) OVERRIDE;
- virtual int32_t Read(int64_t offset,
- char* buffer,
- int32_t bytes_to_read,
- PP_CompletionCallback callback) OVERRIDE;
- virtual int32_t Write(int64_t offset,
- const char* buffer,
- int32_t bytes_to_write,
- PP_CompletionCallback callback) OVERRIDE;
- virtual int32_t SetLength(int64_t length,
- PP_CompletionCallback callback) OVERRIDE;
- virtual int32_t Flush(PP_CompletionCallback callback) OVERRIDE;
- virtual void Close() OVERRIDE;
- virtual int32_t GetOSFileDescriptor() OVERRIDE;
- virtual int32_t WillWrite(int64_t offset,
- int32_t bytes_to_write,
- PP_CompletionCallback callback) OVERRIDE;
- virtual int32_t WillSetLength(int64_t length,
- PP_CompletionCallback callback) OVERRIDE;
+ // Resource overrides.
+ virtual PPB_FileIO_Impl* AsPPB_FileIO_Impl();
+ // PPB_FileIO implementation.
+ int32_t Open(PPB_FileRef_Impl* file_ref,
+ int32_t open_flags,
+ PP_CompletionCallback callback);
+ int32_t Query(PP_FileInfo_Dev* info,
+ PP_CompletionCallback callback);
+ int32_t Touch(PP_Time last_access_time,
+ PP_Time last_modified_time,
+ PP_CompletionCallback callback);
+ int32_t Read(int64_t offset,
+ char* buffer,
+ int32_t bytes_to_read,
+ PP_CompletionCallback callback);
+ int32_t Write(int64_t offset,
+ const char* buffer,
+ int32_t bytes_to_write,
+ PP_CompletionCallback callback);
+ int32_t SetLength(int64_t length,
+ PP_CompletionCallback callback);
+ int32_t Flush(PP_CompletionCallback callback);
+ void Close();
+
+ // PPB_FileIOTrusted implementation.
+ int32_t GetOSFileDescriptor();
+ int32_t WillWrite(int64_t offset,
+ int32_t bytes_to_write,
+ PP_CompletionCallback callback);
+ int32_t WillSetLength(int64_t length,
+ PP_CompletionCallback callback);
+
private:
// Verifies:
// - that |callback| is valid (only nonblocking operation supported);
« no previous file with comments | « webkit/plugins/ppapi/ppb_file_chooser_impl.cc ('k') | webkit/plugins/ppapi/ppb_file_io_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698