diff options
author | nfullagar@chromium.org <nfullagar@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-12-06 06:56:02 +0000 |
---|---|---|
committer | nfullagar@chromium.org <nfullagar@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-12-06 06:56:02 +0000 |
commit | d1c6cae2db53723e0db10dc4364c89a1c0333980 (patch) | |
tree | 0a3de5914619191d6bbfe03b0190ecb1e4a059f6 /ppapi | |
parent | c52e0391f3985940c7741fa76ffa376f39b98b38 (diff) | |
download | chromium_src-d1c6cae2db53723e0db10dc4364c89a1c0333980.zip chromium_src-d1c6cae2db53723e0db10dc4364c89a1c0333980.tar.gz chromium_src-d1c6cae2db53723e0db10dc4364c89a1c0333980.tar.bz2 |
Explicitly support FileIO interface 1.0, to restore functioning SRPC
proxy for Mini-Ninjas and other clients. This CL isn't enough to
restore PPAPI tests on the bots for the SRPC proxy, for that we'll need to
either implement missing new interfaces for SRPC proxy or disable the
tests that exercise the new interfaces that are currently not proxied in SRPC.
BUG=http://code.google.com/p/chromium/issues/detail?id=164009
TEST=Mini-Ninjas, From Dust
Review URL: https://chromiumcodereview.appspot.com/11437031
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@171436 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ppapi')
5 files changed, 10 insertions, 12 deletions
diff --git a/ppapi/native_client/src/shared/ppapi_proxy/browser_globals.cc b/ppapi/native_client/src/shared/ppapi_proxy/browser_globals.cc index 8589cdb..8bf6664 100644 --- a/ppapi/native_client/src/shared/ppapi_proxy/browser_globals.cc +++ b/ppapi/native_client/src/shared/ppapi_proxy/browser_globals.cc @@ -375,11 +375,10 @@ const PPB_WheelInputEvent* PPBWheelInputEventInterface() { return ppb; } -// Dev interfaces. -const PPB_FileIO* PPBFileIOInterface() { - static const PPB_FileIO* ppb = - static_cast<const PPB_FileIO*>( - GetBrowserInterfaceSafe(PPB_FILEIO_INTERFACE)); +const PPB_FileIO_1_0* PPBFileIOInterface() { + static const PPB_FileIO_1_0* ppb = + static_cast<const PPB_FileIO_1_0*>( + GetBrowserInterfaceSafe(PPB_FILEIO_INTERFACE_1_0)); return ppb; } diff --git a/ppapi/native_client/src/shared/ppapi_proxy/browser_globals.h b/ppapi/native_client/src/shared/ppapi_proxy/browser_globals.h index d103bd8..66c179c 100644 --- a/ppapi/native_client/src/shared/ppapi_proxy/browser_globals.h +++ b/ppapi/native_client/src/shared/ppapi_proxy/browser_globals.h @@ -102,7 +102,7 @@ const void* GetBrowserInterfaceSafe(const char* interface_name); // under both trusted and untrusted compilation. const PPB_Core* PPBCoreInterface(); // shared const PPB_MouseCursor_1_0* PPBMouseCursorInterface(); -const PPB_FileIO* PPBFileIOInterface(); +const PPB_FileIO_1_0* PPBFileIOInterface(); const PPB_FileRef* PPBFileRefInterface(); const PPB_FileSystem* PPBFileSystemInterface(); const PPB_Find_Dev* PPBFindInterface(); diff --git a/ppapi/native_client/src/shared/ppapi_proxy/plugin_ppb.cc b/ppapi/native_client/src/shared/ppapi_proxy/plugin_ppb.cc index cb2f837..6635d5c 100644 --- a/ppapi/native_client/src/shared/ppapi_proxy/plugin_ppb.cc +++ b/ppapi/native_client/src/shared/ppapi_proxy/plugin_ppb.cc @@ -64,7 +64,7 @@ InterfaceMapElement interface_map[] = { { PPB_CORE_INTERFACE, PluginCore::GetInterface(), true }, { PPB_MOUSECURSOR_INTERFACE_1_0, PluginMouseCursor::GetInterface(), true }, - { PPB_FILEIO_INTERFACE, PluginFileIO::GetInterface(), true }, + { PPB_FILEIO_INTERFACE_1_0, PluginFileIO::GetInterface1_0(), true }, { PPB_FILEREF_INTERFACE, PluginFileRef::GetInterface(), true }, { PPB_FILESYSTEM_INTERFACE, PluginFileSystem::GetInterface(), true }, { PPB_FIND_DEV_INTERFACE, PluginFind::GetInterface(), true }, diff --git a/ppapi/native_client/src/shared/ppapi_proxy/plugin_ppb_file_io.cc b/ppapi/native_client/src/shared/ppapi_proxy/plugin_ppb_file_io.cc index b538532..51766d2 100644 --- a/ppapi/native_client/src/shared/ppapi_proxy/plugin_ppb_file_io.cc +++ b/ppapi/native_client/src/shared/ppapi_proxy/plugin_ppb_file_io.cc @@ -284,8 +284,8 @@ void Close(PP_Resource file_io) { } // namespace -const PPB_FileIO* PluginFileIO::GetInterface() { - static const PPB_FileIO file_io_interface = { +const PPB_FileIO_1_0* PluginFileIO::GetInterface1_0() { + static const PPB_FileIO_1_0 file_io_interface = { Create, IsFileIO, Open, @@ -295,8 +295,7 @@ const PPB_FileIO* PluginFileIO::GetInterface() { Write, SetLength, Flush, - Close, - NULL // TODO: support ReadToArray + Close }; return &file_io_interface; } diff --git a/ppapi/native_client/src/shared/ppapi_proxy/plugin_ppb_file_io.h b/ppapi/native_client/src/shared/ppapi_proxy/plugin_ppb_file_io.h index e80a24f..9cfd91f 100644 --- a/ppapi/native_client/src/shared/ppapi_proxy/plugin_ppb_file_io.h +++ b/ppapi/native_client/src/shared/ppapi_proxy/plugin_ppb_file_io.h @@ -13,7 +13,7 @@ namespace ppapi_proxy { // Implements the untrusted side of the PPB_FileIO interface. class PluginFileIO { public: - static const PPB_FileIO* GetInterface(); + static const PPB_FileIO_1_0* GetInterface1_0(); private: NACL_DISALLOW_COPY_AND_ASSIGN(PluginFileIO); |