diff options
author | brettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-02-21 23:49:16 +0000 |
---|---|---|
committer | brettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-02-21 23:49:16 +0000 |
commit | ce482dfe397df7f7c06901ade9f35b10fd32aa94 (patch) | |
tree | 88e2dca000032b47b12edfa908c8e8ec0f4ddab3 /ppapi/proxy/ppb_file_chooser_proxy.cc | |
parent | 563532cca9b9c670f77c16b70034e4fe2aad7e7e (diff) | |
download | chromium_src-ce482dfe397df7f7c06901ade9f35b10fd32aa94.zip chromium_src-ce482dfe397df7f7c06901ade9f35b10fd32aa94.tar.gz chromium_src-ce482dfe397df7f7c06901ade9f35b10fd32aa94.tar.bz2 |
Implement the filesystem proxy. This allows the FileRef tests (the ones which
don't use FileIO which isn't don yet) to pass in the proxy.
Hook up the code from the URLLoader that downloads to a file. This allows all
URLLoader tests to pass in the proxy.
Change code in dispatcher that zeros out the array to take into account
padding. It was only zero-filling half of the array since sizeof(enum) * # elts
seems to be half as large as the actual array due to padding on 64-bit systems.
Make the aborted completion callbacks run asynchronously. This was caught by
one of the file ref tests. We really need a system for doing this better, but
I don't want to do that in this patch.
TEST=ppapi_tests run under proxy
Review URL: http://codereview.chromium.org/6543028
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@75566 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ppapi/proxy/ppb_file_chooser_proxy.cc')
-rw-r--r-- | ppapi/proxy/ppb_file_chooser_proxy.cc | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/ppapi/proxy/ppb_file_chooser_proxy.cc b/ppapi/proxy/ppb_file_chooser_proxy.cc index a50908c4..9c997fb 100644 --- a/ppapi/proxy/ppb_file_chooser_proxy.cc +++ b/ppapi/proxy/ppb_file_chooser_proxy.cc @@ -45,8 +45,13 @@ FileChooser::FileChooser(const HostResource& resource) FileChooser::~FileChooser() { // Always need to fire completion callbacks to prevent a leak in the plugin. - if (current_show_callback_.func) - PP_RunCompletionCallback(¤t_show_callback_, PP_ERROR_ABORTED); + if (current_show_callback_.func) { + // TODO(brettw) the callbacks at this level should be refactored with a + // more automatic tracking system like we have in the renderer. + MessageLoop::current()->PostTask(FROM_HERE, NewRunnableFunction( + current_show_callback_.func, current_show_callback_.user_data, + static_cast<int32_t>(PP_ERROR_ABORTED))); + } // Any existing files we haven't transferred ownership to the plugin need // to be freed. |