| Index: webkit/plugins/ppapi/ppb_file_system_impl.cc
|
| diff --git a/webkit/plugins/ppapi/ppb_file_system_impl.cc b/webkit/plugins/ppapi/ppb_file_system_impl.cc
|
| index 2a4bb05f7876e52ecc6d0e5bfc4d023d886c6216..5022a7734bc4ae6af69db429fa8e260602844bed 100644
|
| --- a/webkit/plugins/ppapi/ppb_file_system_impl.cc
|
| +++ b/webkit/plugins/ppapi/ppb_file_system_impl.cc
|
| @@ -18,18 +18,16 @@
|
| #include "webkit/plugins/ppapi/plugin_module.h"
|
| #include "webkit/plugins/ppapi/ppapi_plugin_instance.h"
|
| #include "webkit/plugins/ppapi/ppb_directory_reader_impl.h"
|
| -#include "webkit/plugins/ppapi/resource.h"
|
| -#include "webkit/plugins/ppapi/resource_tracker.h"
|
| +#include "webkit/plugins/ppapi/resource_helper.h"
|
|
|
| using ppapi::thunk::PPB_FileSystem_API;
|
|
|
| namespace webkit {
|
| namespace ppapi {
|
|
|
| -PPB_FileSystem_Impl::PPB_FileSystem_Impl(PluginInstance* instance,
|
| +PPB_FileSystem_Impl::PPB_FileSystem_Impl(PP_Instance instance,
|
| PP_FileSystemType type)
|
| : Resource(instance),
|
| - instance_(instance),
|
| type_(type),
|
| opened_(false),
|
| called_open_(false) {
|
| @@ -40,7 +38,7 @@ PPB_FileSystem_Impl::~PPB_FileSystem_Impl() {
|
| }
|
|
|
| // static
|
| -PP_Resource PPB_FileSystem_Impl::Create(PluginInstance* instance,
|
| +PP_Resource PPB_FileSystem_Impl::Create(PP_Instance instance,
|
| PP_FileSystemType type) {
|
| if (type != PP_FILESYSTEMTYPE_EXTERNAL &&
|
| type != PP_FILESYSTEMTYPE_LOCALPERSISTENT &&
|
| @@ -64,14 +62,15 @@ int32_t PPB_FileSystem_Impl::Open(int64_t expected_size,
|
| type_ != PP_FILESYSTEMTYPE_LOCALTEMPORARY)
|
| return PP_ERROR_FAILED;
|
|
|
| + PluginInstance* instance = ResourceHelper::GetPluginInstance(this);
|
| fileapi::FileSystemType file_system_type =
|
| (type_ == PP_FILESYSTEMTYPE_LOCALTEMPORARY ?
|
| fileapi::kFileSystemTypeTemporary :
|
| fileapi::kFileSystemTypePersistent);
|
| - if (!instance()->delegate()->OpenFileSystem(
|
| - instance()->container()->element().document().url(),
|
| + if (!instance->delegate()->OpenFileSystem(
|
| + instance->container()->element().document().url(),
|
| file_system_type, expected_size,
|
| - new FileCallbacks(instance()->module()->AsWeakPtr(),
|
| + new FileCallbacks(instance->module()->AsWeakPtr(),
|
| pp_resource(), callback, NULL,
|
| scoped_refptr<PPB_FileSystem_Impl>(this), NULL)))
|
| return PP_ERROR_FAILED;
|
|
|