diff options
author | bbudge@chromium.org <bbudge@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-01-19 04:16:36 +0000 |
---|---|---|
committer | bbudge@chromium.org <bbudge@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-01-19 04:16:36 +0000 |
commit | c77144727785be9a25c10a7954e38a3a579b417a (patch) | |
tree | 5fe5083e10e8af5ec822848a07cb04b416682496 /content/renderer/pepper/pepper_in_process_resource_creation.cc | |
parent | 7a6acd091023b662745562592406b5efbc1a5b42 (diff) | |
download | chromium_src-c77144727785be9a25c10a7954e38a3a579b417a.zip chromium_src-c77144727785be9a25c10a7954e38a3a579b417a.tar.gz chromium_src-c77144727785be9a25c10a7954e38a3a579b417a.tar.bz2 |
Refactor FileIO to the new resource host system.
Taking over from Victor's CL: https://codereview.chromium.org/11419131/
Re-landing, with a fix. The original waited to reset the file state until
after the callback had completed. This is too late, as the client should be
able to perform another file operation during the callback.
Changeset #1 is the original patch. The fix is in change set #2
Original author=Victor Hsieh
BUG=none
TEST=browser_tests --gtest_filter=PPAPINaClNewlibTest.FileIO*
Review URL: https://chromiumcodereview.appspot.com/11941022
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@177830 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content/renderer/pepper/pepper_in_process_resource_creation.cc')
-rw-r--r-- | content/renderer/pepper/pepper_in_process_resource_creation.cc | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/content/renderer/pepper/pepper_in_process_resource_creation.cc b/content/renderer/pepper/pepper_in_process_resource_creation.cc index 3d6d12b..5976b68 100644 --- a/content/renderer/pepper/pepper_in_process_resource_creation.cc +++ b/content/renderer/pepper/pepper_in_process_resource_creation.cc @@ -15,6 +15,7 @@ #include "ppapi/host/ppapi_host.h" #include "ppapi/proxy/browser_font_resource_trusted.h" #include "ppapi/proxy/file_chooser_resource.h" +#include "ppapi/proxy/file_io_resource.h" #include "ppapi/proxy/graphics_2d_resource.h" #include "ppapi/proxy/ppapi_messages.h" #include "ppapi/proxy/printing_resource.h" @@ -68,6 +69,13 @@ PP_Resource PepperInProcessResourceCreation::CreateFileChooser( instance, mode, accept_types))->GetReference(); } +PP_Resource PepperInProcessResourceCreation::CreateFileIO( + PP_Instance instance) { + return (new ppapi::proxy::FileIOResource( + host_impl_->in_process_router()->GetPluginConnection(), + instance))->GetReference(); +} + PP_Resource PepperInProcessResourceCreation::CreateGraphics2D( PP_Instance instance, const PP_Size& size, |