diff options
author | viettrungluu@chromium.org <viettrungluu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-12-21 00:45:43 +0000 |
---|---|---|
committer | viettrungluu@chromium.org <viettrungluu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-12-21 00:45:43 +0000 |
commit | 64264efa8b4a0bf37b19042f295f9990a7f388c9 (patch) | |
tree | 5e7cbf44e04f00388078da62d6e0eed878da3d6d /webkit/plugins/ppapi/ppb_file_ref_impl.cc | |
parent | c85b0ba71b5a55647b01de9d345e46896979033d (diff) | |
download | chromium_src-64264efa8b4a0bf37b19042f295f9990a7f388c9.zip chromium_src-64264efa8b4a0bf37b19042f295f9990a7f388c9.tar.gz chromium_src-64264efa8b4a0bf37b19042f295f9990a7f388c9.tar.bz2 |
Properly cancel PPAPI callbacks.
This sets up infrastructure to properly cancel PPAPI callbacks (which have particular semantics), and converts a couple things to use them.
BUG=
TEST=test_shell_tests and PPAPI tests
Review URL: http://codereview.chromium.org/5562008
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@69773 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/plugins/ppapi/ppb_file_ref_impl.cc')
-rw-r--r-- | webkit/plugins/ppapi/ppb_file_ref_impl.cc | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/webkit/plugins/ppapi/ppb_file_ref_impl.cc b/webkit/plugins/ppapi/ppb_file_ref_impl.cc index 79676df..f400ce4 100644 --- a/webkit/plugins/ppapi/ppb_file_ref_impl.cc +++ b/webkit/plugins/ppapi/ppb_file_ref_impl.cc @@ -124,7 +124,7 @@ int32_t MakeDirectory(PP_Resource directory_ref_id, PluginInstance* instance = file_system->instance(); if (!instance->delegate()->MakeDirectory( directory_ref->GetSystemPath(), PPBoolToBool(make_ancestors), - new FileCallbacks(instance->module()->AsWeakPtr(), + new FileCallbacks(instance->module()->AsWeakPtr(), directory_ref_id, callback, NULL, NULL, NULL))) return PP_ERROR_FAILED; @@ -147,7 +147,7 @@ int32_t Query(PP_Resource file_ref_id, PluginInstance* instance = file_system->instance(); if (!instance->delegate()->Query( file_ref->GetSystemPath(), - new FileCallbacks(instance->module()->AsWeakPtr(), + new FileCallbacks(instance->module()->AsWeakPtr(), file_ref_id, callback, info, file_system, NULL))) return PP_ERROR_FAILED; @@ -172,7 +172,7 @@ int32_t Touch(PP_Resource file_ref_id, if (!instance->delegate()->Touch( file_ref->GetSystemPath(), base::Time::FromDoubleT(last_access_time), base::Time::FromDoubleT(last_modified_time), - new FileCallbacks(instance->module()->AsWeakPtr(), + new FileCallbacks(instance->module()->AsWeakPtr(), file_ref_id, callback, NULL, NULL, NULL))) return PP_ERROR_FAILED; @@ -194,7 +194,7 @@ int32_t Delete(PP_Resource file_ref_id, PluginInstance* instance = file_system->instance(); if (!instance->delegate()->Delete( file_ref->GetSystemPath(), - new FileCallbacks(instance->module()->AsWeakPtr(), + new FileCallbacks(instance->module()->AsWeakPtr(), file_ref_id, callback, NULL, NULL, NULL))) return PP_ERROR_FAILED; @@ -220,10 +220,12 @@ int32_t Rename(PP_Resource file_ref_id, (file_system->type() == PP_FILESYSTEMTYPE_EXTERNAL)) return PP_ERROR_NOACCESS; + // TODO(viettrungluu): Also cancel when the new file ref is destroyed? + // http://crbug.com/67624 PluginInstance* instance = file_system->instance(); if (!instance->delegate()->Rename( file_ref->GetSystemPath(), new_file_ref->GetSystemPath(), - new FileCallbacks(instance->module()->AsWeakPtr(), + new FileCallbacks(instance->module()->AsWeakPtr(), file_ref_id, callback, NULL, NULL, NULL))) return PP_ERROR_FAILED; |