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

Unified Diff: webkit/glue/plugins/pepper_file_io.cc

Issue 3255003: Pull new PPAPI, rename non-P0 interfaces to Dev, rename DeviceContext2D to Gr... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 10 years, 4 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/glue/plugins/pepper_file_io.h ('k') | webkit/glue/plugins/pepper_file_ref.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/glue/plugins/pepper_file_io.cc
===================================================================
--- webkit/glue/plugins/pepper_file_io.cc (revision 57791)
+++ webkit/glue/plugins/pepper_file_io.cc (working copy)
@@ -5,10 +5,10 @@
#include "webkit/glue/plugins/pepper_file_io.h"
#include "base/logging.h"
+#include "third_party/ppapi/c/dev/ppb_file_io_dev.h"
+#include "third_party/ppapi/c/dev/ppb_file_io_trusted_dev.h"
#include "third_party/ppapi/c/pp_completion_callback.h"
#include "third_party/ppapi/c/pp_errors.h"
-#include "third_party/ppapi/c/ppb_file_io.h"
-#include "third_party/ppapi/c/ppb_file_io_trusted.h"
#include "webkit/glue/plugins/pepper_file_ref.h"
#include "webkit/glue/plugins/pepper_plugin_module.h"
#include "webkit/glue/plugins/pepper_resource_tracker.h"
@@ -46,12 +46,11 @@
}
int32_t Query(PP_Resource file_io_id,
- PP_FileInfo* info,
+ PP_FileInfo_Dev* info,
PP_CompletionCallback callback) {
scoped_refptr<FileIO> file_io(Resource::GetAs<FileIO>(file_io_id));
if (!file_io)
return PP_ERROR_BADRESOURCE;
-
return file_io->Query(info, callback);
}
@@ -62,7 +61,6 @@
scoped_refptr<FileIO> file_io(Resource::GetAs<FileIO>(file_io_id));
if (!file_io)
return PP_ERROR_BADRESOURCE;
-
return file_io->Touch(last_access_time, last_modified_time, callback);
}
@@ -74,7 +72,6 @@
scoped_refptr<FileIO> file_io(Resource::GetAs<FileIO>(file_io_id));
if (!file_io)
return PP_ERROR_BADRESOURCE;
-
return file_io->Read(offset, buffer, bytes_to_read, callback);
}
@@ -86,7 +83,6 @@
scoped_refptr<FileIO> file_io(Resource::GetAs<FileIO>(file_io_id));
if (!file_io)
return PP_ERROR_BADRESOURCE;
-
return file_io->Write(offset, buffer, bytes_to_write, callback);
}
@@ -96,7 +92,6 @@
scoped_refptr<FileIO> file_io(Resource::GetAs<FileIO>(file_io_id));
if (!file_io)
return PP_ERROR_BADRESOURCE;
-
return file_io->SetLength(length, callback);
}
@@ -105,7 +100,6 @@
scoped_refptr<FileIO> file_io(Resource::GetAs<FileIO>(file_io_id));
if (!file_io)
return PP_ERROR_BADRESOURCE;
-
return file_io->Flush(callback);
}
@@ -113,11 +107,10 @@
scoped_refptr<FileIO> file_io(Resource::GetAs<FileIO>(file_io_id));
if (!file_io)
return;
-
file_io->Close();
}
-const PPB_FileIO ppb_fileio = {
+const PPB_FileIO_Dev ppb_fileio = {
&Create,
&IsFileIO,
&Open,
@@ -134,7 +127,6 @@
scoped_refptr<FileIO> file_io(Resource::GetAs<FileIO>(file_io_id));
if (!file_io)
return PP_ERROR_BADRESOURCE;
-
return file_io->GetOSFileDescriptor();
}
@@ -145,7 +137,6 @@
scoped_refptr<FileIO> file_io(Resource::GetAs<FileIO>(file_io_id));
if (!file_io)
return PP_ERROR_BADRESOURCE;
-
return file_io->WillWrite(offset, bytes_to_write, callback);
}
@@ -155,11 +146,10 @@
scoped_refptr<FileIO> file_io(Resource::GetAs<FileIO>(file_io_id));
if (!file_io)
return PP_ERROR_BADRESOURCE;
-
return file_io->WillSetLength(length, callback);
}
-const PPB_FileIOTrusted ppb_fileiotrusted = {
+const PPB_FileIOTrusted_Dev ppb_fileiotrusted = {
&GetOSFileDescriptor,
&WillWrite,
&WillSetLength
@@ -174,12 +164,12 @@
}
// static
-const PPB_FileIO* FileIO::GetInterface() {
+const PPB_FileIO_Dev* FileIO::GetInterface() {
return &ppb_fileio;
}
// static
-const PPB_FileIOTrusted* FileIO::GetTrustedInterface() {
+const PPB_FileIOTrusted_Dev* FileIO::GetTrustedInterface() {
return &ppb_fileiotrusted;
}
@@ -190,7 +180,7 @@
return PP_ERROR_FAILED;
}
-int32_t FileIO::Query(PP_FileInfo* info,
+int32_t FileIO::Query(PP_FileInfo_Dev* info,
PP_CompletionCallback callback) {
NOTIMPLEMENTED(); // TODO(darin): Implement me!
return PP_ERROR_FAILED;
« no previous file with comments | « webkit/glue/plugins/pepper_file_io.h ('k') | webkit/glue/plugins/pepper_file_ref.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698