summaryrefslogtreecommitdiffstats
path: root/webkit/plugins
diff options
context:
space:
mode:
Diffstat (limited to 'webkit/plugins')
-rw-r--r--webkit/plugins/ppapi/ppb_file_io_impl.cc433
-rw-r--r--webkit/plugins/ppapi/ppb_file_io_impl.h110
-rw-r--r--webkit/plugins/ppapi/resource_creation_impl.cc5
-rw-r--r--webkit/plugins/ppapi/resource_creation_impl.h1
4 files changed, 0 insertions, 549 deletions
diff --git a/webkit/plugins/ppapi/ppb_file_io_impl.cc b/webkit/plugins/ppapi/ppb_file_io_impl.cc
deleted file mode 100644
index 6167a8c..0000000
--- a/webkit/plugins/ppapi/ppb_file_io_impl.cc
+++ /dev/null
@@ -1,433 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "webkit/plugins/ppapi/ppb_file_io_impl.h"
-
-#include "base/bind.h"
-#include "base/callback.h"
-#include "base/callback_helpers.h"
-#include "base/file_util.h"
-#include "base/file_util_proxy.h"
-#include "base/message_loop_proxy.h"
-#include "base/platform_file.h"
-#include "base/logging.h"
-#include "base/time.h"
-#include "ppapi/c/ppb_file_io.h"
-#include "ppapi/c/trusted/ppb_file_io_trusted.h"
-#include "ppapi/c/pp_completion_callback.h"
-#include "ppapi/c/pp_errors.h"
-#include "ppapi/shared_impl/file_type_conversion.h"
-#include "ppapi/shared_impl/time_conversion.h"
-#include "ppapi/thunk/enter.h"
-#include "ppapi/thunk/ppb_file_ref_api.h"
-#include "webkit/plugins/ppapi/common.h"
-#include "webkit/plugins/ppapi/file_callbacks.h"
-#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/ppb_file_ref_impl.h"
-#include "webkit/plugins/ppapi/ppb_file_system_impl.h"
-#include "webkit/plugins/ppapi/quota_file_io.h"
-#include "webkit/plugins/ppapi/resource_helper.h"
-
-using ppapi::PPTimeToTime;
-using ppapi::TimeToPPTime;
-using ppapi::TrackedCallback;
-using ppapi::thunk::PPB_FileRef_API;
-
-namespace webkit {
-namespace ppapi {
-
-namespace {
-
-typedef base::Callback<void (base::PlatformFileError)> PlatformGeneralCallback;
-
-class PlatformGeneralCallbackTranslator
- : public fileapi::FileSystemCallbackDispatcher {
- public:
- PlatformGeneralCallbackTranslator(
- const PlatformGeneralCallback& callback)
- : callback_(callback) {}
-
- virtual ~PlatformGeneralCallbackTranslator() {}
-
- virtual void DidSucceed() OVERRIDE {
- callback_.Run(base::PLATFORM_FILE_OK);
- }
-
- virtual void DidReadMetadata(
- const base::PlatformFileInfo& file_info,
- const FilePath& platform_path) OVERRIDE {
- NOTREACHED();
- }
-
- virtual void DidReadDirectory(
- const std::vector<base::FileUtilProxy::Entry>& entries,
- bool has_more) OVERRIDE {
- NOTREACHED();
- }
-
- virtual void DidOpenFileSystem(const std::string& name,
- const GURL& root) OVERRIDE {
- NOTREACHED();
- }
-
- virtual void DidFail(base::PlatformFileError error_code) OVERRIDE {
- callback_.Run(error_code);
- }
-
- virtual void DidWrite(int64 bytes, bool complete) OVERRIDE {
- NOTREACHED();
- }
-
- virtual void DidOpenFile(base::PlatformFile file) OVERRIDE {
- NOTREACHED();
- }
-
- private:
- PlatformGeneralCallback callback_;
-};
-
-} // namespace
-
-PPB_FileIO_Impl::PPB_FileIO_Impl(PP_Instance instance)
- : ::ppapi::PPB_FileIO_Shared(instance),
- file_(base::kInvalidPlatformFileValue),
- ALLOW_THIS_IN_INITIALIZER_LIST(weak_factory_(this)) {
-}
-
-PPB_FileIO_Impl::~PPB_FileIO_Impl() {
- Close();
-}
-
-int32_t PPB_FileIO_Impl::OpenValidated(
- PP_Resource file_ref_resource,
- PPB_FileRef_API* file_ref_api,
- int32_t open_flags,
- scoped_refptr<TrackedCallback> callback) {
- PPB_FileRef_Impl* file_ref = static_cast<PPB_FileRef_Impl*>(file_ref_api);
-
- int flags = 0;
- if (!::ppapi::PepperFileOpenFlagsToPlatformFileFlags(open_flags, &flags))
- return PP_ERROR_BADARGUMENT;
-
- PluginDelegate* plugin_delegate = GetPluginDelegate();
- if (!plugin_delegate)
- return PP_ERROR_BADARGUMENT;
-
- if (file_ref->HasValidFileSystem()) {
- file_system_url_ = file_ref->GetFileSystemURL();
- if (!plugin_delegate->AsyncOpenFileSystemURL(
- file_system_url_, flags,
- base::Bind(
- &PPB_FileIO_Impl::ExecutePlatformOpenFileSystemURLCallback,
- weak_factory_.GetWeakPtr())))
- return PP_ERROR_FAILED;
- } else {
- if (file_system_type_ != PP_FILESYSTEMTYPE_EXTERNAL)
- return PP_ERROR_FAILED;
- if (!plugin_delegate->AsyncOpenFile(
- file_ref->GetSystemPath(), flags,
- base::Bind(&PPB_FileIO_Impl::ExecutePlatformOpenFileCallback,
- weak_factory_.GetWeakPtr())))
- return PP_ERROR_FAILED;
- }
-
- RegisterCallback(OPERATION_EXCLUSIVE, callback, NULL, NULL);
- return PP_OK_COMPLETIONPENDING;
-}
-
-int32_t PPB_FileIO_Impl::QueryValidated(
- PP_FileInfo* info,
- scoped_refptr<TrackedCallback> callback) {
- PluginDelegate* plugin_delegate = GetPluginDelegate();
- if (!plugin_delegate)
- return PP_ERROR_FAILED;
-
- if (!base::FileUtilProxy::GetFileInfoFromPlatformFile(
- plugin_delegate->GetFileThreadMessageLoopProxy(), file_,
- base::Bind(&PPB_FileIO_Impl::ExecutePlatformQueryCallback,
- weak_factory_.GetWeakPtr())))
- return PP_ERROR_FAILED;
-
- RegisterCallback(OPERATION_EXCLUSIVE, callback, NULL, info);
- return PP_OK_COMPLETIONPENDING;
-}
-
-int32_t PPB_FileIO_Impl::TouchValidated(
- PP_Time last_access_time,
- PP_Time last_modified_time,
- scoped_refptr<TrackedCallback> callback) {
- PluginDelegate* plugin_delegate = GetPluginDelegate();
- if (!plugin_delegate)
- return PP_ERROR_FAILED;
-
- if (file_system_type_ != PP_FILESYSTEMTYPE_EXTERNAL) {
- if (!plugin_delegate->Touch(
- file_system_url_,
- PPTimeToTime(last_access_time),
- PPTimeToTime(last_modified_time),
- new PlatformGeneralCallbackTranslator(
- base::Bind(&PPB_FileIO_Impl::ExecutePlatformGeneralCallback,
- weak_factory_.GetWeakPtr()))))
- return PP_ERROR_FAILED;
- } else {
- // TODO(nhiroki): fix a failure of FileIO.Touch for an external filesystem
- // on Mac and Linux due to sandbox restrictions (http://crbug.com/101128).
- if (!base::FileUtilProxy::Touch(
- plugin_delegate->GetFileThreadMessageLoopProxy(),
- file_, PPTimeToTime(last_access_time),
- PPTimeToTime(last_modified_time),
- base::Bind(&PPB_FileIO_Impl::ExecutePlatformGeneralCallback,
- weak_factory_.GetWeakPtr())))
- return PP_ERROR_FAILED;
- }
-
- RegisterCallback(OPERATION_EXCLUSIVE, callback, NULL, NULL);
- return PP_OK_COMPLETIONPENDING;
-}
-
-int32_t PPB_FileIO_Impl::ReadValidated(
- int64_t offset,
- const PP_ArrayOutput& output_array_buffer,
- int32_t max_read_length,
- scoped_refptr<TrackedCallback> callback) {
- PluginDelegate* plugin_delegate = GetPluginDelegate();
- if (!plugin_delegate)
- return PP_ERROR_FAILED;
-
- if (!base::FileUtilProxy::Read(
- plugin_delegate->GetFileThreadMessageLoopProxy(), file_, offset,
- max_read_length,
- base::Bind(&PPB_FileIO_Impl::ExecutePlatformReadCallback,
- weak_factory_.GetWeakPtr())))
- return PP_ERROR_FAILED;
-
- RegisterCallback(OPERATION_READ, callback, &output_array_buffer, NULL);
- return PP_OK_COMPLETIONPENDING;
-}
-
-int32_t PPB_FileIO_Impl::WriteValidated(
- int64_t offset,
- const char* buffer,
- int32_t bytes_to_write,
- scoped_refptr<TrackedCallback> callback) {
- PluginDelegate* plugin_delegate = GetPluginDelegate();
- if (!plugin_delegate)
- return PP_ERROR_FAILED;
-
- if (quota_file_io_.get()) {
- if (!quota_file_io_->Write(
- offset, buffer, bytes_to_write,
- base::Bind(&PPB_FileIO_Impl::ExecutePlatformWriteCallback,
- weak_factory_.GetWeakPtr())))
- return PP_ERROR_FAILED;
- } else {
- if (!base::FileUtilProxy::Write(
- plugin_delegate->GetFileThreadMessageLoopProxy(), file_, offset,
- buffer, bytes_to_write,
- base::Bind(&PPB_FileIO_Impl::ExecutePlatformWriteCallback,
- weak_factory_.GetWeakPtr())))
- return PP_ERROR_FAILED;
- }
-
- RegisterCallback(OPERATION_WRITE, callback, NULL, NULL);
- return PP_OK_COMPLETIONPENDING;
-}
-
-int32_t PPB_FileIO_Impl::SetLengthValidated(
- int64_t length,
- scoped_refptr<TrackedCallback> callback) {
- PluginDelegate* plugin_delegate = GetPluginDelegate();
- if (!plugin_delegate)
- return PP_ERROR_FAILED;
-
- if (file_system_type_ != PP_FILESYSTEMTYPE_EXTERNAL) {
- if (!plugin_delegate->SetLength(
- file_system_url_, length,
- new PlatformGeneralCallbackTranslator(
- base::Bind(&PPB_FileIO_Impl::ExecutePlatformGeneralCallback,
- weak_factory_.GetWeakPtr()))))
- return PP_ERROR_FAILED;
- } else {
- // TODO(nhiroki): fix a failure of FileIO.SetLength for an external
- // filesystem on Mac due to sandbox restrictions (http://crbug.com/156077).
- if (!base::FileUtilProxy::Truncate(
- plugin_delegate->GetFileThreadMessageLoopProxy(), file_, length,
- base::Bind(&PPB_FileIO_Impl::ExecutePlatformGeneralCallback,
- weak_factory_.GetWeakPtr())))
- return PP_ERROR_FAILED;
- }
-
- RegisterCallback(OPERATION_EXCLUSIVE, callback, NULL, NULL);
- return PP_OK_COMPLETIONPENDING;
-}
-
-int32_t PPB_FileIO_Impl::FlushValidated(
- scoped_refptr<TrackedCallback> callback) {
- PluginDelegate* plugin_delegate = GetPluginDelegate();
- if (!plugin_delegate)
- return PP_ERROR_FAILED;
-
- if (!base::FileUtilProxy::Flush(
- plugin_delegate->GetFileThreadMessageLoopProxy(), file_,
- base::Bind(&PPB_FileIO_Impl::ExecutePlatformGeneralCallback,
- weak_factory_.GetWeakPtr())))
- return PP_ERROR_FAILED;
-
- RegisterCallback(OPERATION_EXCLUSIVE, callback, NULL, NULL);
- return PP_OK_COMPLETIONPENDING;
-}
-
-void PPB_FileIO_Impl::Close() {
- PluginDelegate* plugin_delegate = GetPluginDelegate();
- if (file_ != base::kInvalidPlatformFileValue && plugin_delegate) {
- base::FileUtilProxy::Close(
- plugin_delegate->GetFileThreadMessageLoopProxy(),
- file_,
- base::ResetAndReturn(&notify_close_file_callback_));
- file_ = base::kInvalidPlatformFileValue;
- quota_file_io_.reset();
- }
- // TODO(viettrungluu): Check what happens to the callback (probably the
- // wrong thing). May need to post abort here. crbug.com/69457
-}
-
-int32_t PPB_FileIO_Impl::GetOSFileDescriptor() {
-#if defined(OS_POSIX)
- return file_;
-#elif defined(OS_WIN)
- return reinterpret_cast<uintptr_t>(file_);
-#else
-#error "Platform not supported."
-#endif
-}
-
-int32_t PPB_FileIO_Impl::WillWrite(int64_t offset,
- int32_t bytes_to_write,
- scoped_refptr<TrackedCallback> callback) {
- int32_t rv = CommonCallValidation(true, OPERATION_EXCLUSIVE);
- if (rv != PP_OK)
- return rv;
-
- if (!quota_file_io_.get())
- return PP_OK;
-
- if (!quota_file_io_->WillWrite(
- offset, bytes_to_write,
- base::Bind(&PPB_FileIO_Impl::ExecutePlatformWillWriteCallback,
- weak_factory_.GetWeakPtr())))
- return PP_ERROR_FAILED;
-
- RegisterCallback(OPERATION_EXCLUSIVE, callback, NULL, NULL);
- return PP_OK_COMPLETIONPENDING;
-}
-
-int32_t PPB_FileIO_Impl::WillSetLength(
- int64_t length,
- scoped_refptr<TrackedCallback> callback) {
- int32_t rv = CommonCallValidation(true, OPERATION_EXCLUSIVE);
- if (rv != PP_OK)
- return rv;
-
- if (!quota_file_io_.get())
- return PP_OK;
-
- if (!quota_file_io_->WillSetLength(
- length,
- base::Bind(&PPB_FileIO_Impl::ExecutePlatformGeneralCallback,
- weak_factory_.GetWeakPtr())))
- return PP_ERROR_FAILED;
-
- RegisterCallback(OPERATION_EXCLUSIVE, callback, NULL, NULL);
- return PP_OK_COMPLETIONPENDING;
-}
-
-PluginDelegate* PPB_FileIO_Impl::GetPluginDelegate() {
- return ResourceHelper::GetPluginDelegate(this);
-}
-
-void PPB_FileIO_Impl::ExecutePlatformGeneralCallback(
- base::PlatformFileError error_code) {
- ExecuteGeneralCallback(::ppapi::PlatformFileErrorToPepperError(error_code));
-}
-
-void PPB_FileIO_Impl::ExecutePlatformOpenFileCallback(
- base::PlatformFileError error_code,
- base::PassPlatformFile file) {
- DCHECK(file_ == base::kInvalidPlatformFileValue);
- file_ = file.ReleaseValue();
-
- DCHECK(!quota_file_io_.get());
- if (file_ != base::kInvalidPlatformFileValue &&
- (file_system_type_ == PP_FILESYSTEMTYPE_LOCALTEMPORARY ||
- file_system_type_ == PP_FILESYSTEMTYPE_LOCALPERSISTENT)) {
- quota_file_io_.reset(new QuotaFileIO(
- pp_instance(), file_, file_system_url_, file_system_type_));
- }
-
- ExecuteOpenFileCallback(::ppapi::PlatformFileErrorToPepperError(error_code));
-}
-
-void PPB_FileIO_Impl::ExecutePlatformOpenFileSystemURLCallback(
- base::PlatformFileError error_code,
- base::PassPlatformFile file,
- const PluginDelegate::NotifyCloseFileCallback& callback) {
- if (error_code == base::PLATFORM_FILE_OK)
- notify_close_file_callback_ = callback;
- ExecutePlatformOpenFileCallback(error_code, file);
-}
-
-void PPB_FileIO_Impl::ExecutePlatformQueryCallback(
- base::PlatformFileError error_code,
- const base::PlatformFileInfo& file_info) {
- PP_FileInfo pp_info;
- pp_info.size = file_info.size;
- pp_info.creation_time = TimeToPPTime(file_info.creation_time);
- pp_info.last_access_time = TimeToPPTime(file_info.last_accessed);
- pp_info.last_modified_time = TimeToPPTime(file_info.last_modified);
- pp_info.system_type = file_system_type_;
- if (file_info.is_directory)
- pp_info.type = PP_FILETYPE_DIRECTORY;
- else
- pp_info.type = PP_FILETYPE_REGULAR;
-
- ExecuteQueryCallback(::ppapi::PlatformFileErrorToPepperError(error_code),
- pp_info);
-}
-
-void PPB_FileIO_Impl::ExecutePlatformReadCallback(
- base::PlatformFileError error_code,
- const char* data, int bytes_read) {
- // Map the error code, OK getting mapped to the # of bytes read.
- int32_t pp_result = ::ppapi::PlatformFileErrorToPepperError(error_code);
- pp_result = pp_result == PP_OK ? bytes_read : pp_result;
- ExecuteReadCallback(pp_result, data);
-}
-
-void PPB_FileIO_Impl::ExecutePlatformWriteCallback(
- base::PlatformFileError error_code,
- int bytes_written) {
- int32_t pp_result = ::ppapi::PlatformFileErrorToPepperError(error_code);
- ExecuteGeneralCallback(pp_result == PP_OK ? bytes_written : pp_result);
-}
-
-void PPB_FileIO_Impl::ExecutePlatformWillWriteCallback(
- base::PlatformFileError error_code,
- int bytes_written) {
- if (pending_op_ != OPERATION_EXCLUSIVE || callbacks_.empty()) {
- NOTREACHED();
- return;
- }
-
- if (error_code != base::PLATFORM_FILE_OK) {
- RunAndRemoveFirstPendingCallback(
- ::ppapi::PlatformFileErrorToPepperError(error_code));
- } else {
- RunAndRemoveFirstPendingCallback(bytes_written);
- }
-}
-
-} // namespace ppapi
-} // namespace webkit
diff --git a/webkit/plugins/ppapi/ppb_file_io_impl.h b/webkit/plugins/ppapi/ppb_file_io_impl.h
deleted file mode 100644
index a6f9e89..0000000
--- a/webkit/plugins/ppapi/ppb_file_io_impl.h
+++ /dev/null
@@ -1,110 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef WEBKIT_PLUGINS_PPAPI_PPB_FILE_IO_IMPL_H_
-#define WEBKIT_PLUGINS_PPAPI_PPB_FILE_IO_IMPL_H_
-
-#include "base/basictypes.h"
-#include "base/compiler_specific.h"
-#include "base/memory/ref_counted.h"
-#include "base/memory/scoped_ptr.h"
-#include "base/memory/weak_ptr.h"
-#include "ppapi/shared_impl/ppb_file_io_shared.h"
-#include "webkit/plugins/ppapi/plugin_delegate.h"
-
-namespace webkit {
-namespace ppapi {
-
-class QuotaFileIO;
-
-class PPB_FileIO_Impl : public ::ppapi::PPB_FileIO_Shared {
- public:
- explicit PPB_FileIO_Impl(PP_Instance instance);
- virtual ~PPB_FileIO_Impl();
-
- // PPB_FileIO_API implementation (most of the operations are implemented
- // as the "Validated" versions below).
- virtual void Close() OVERRIDE;
- virtual int32_t GetOSFileDescriptor() OVERRIDE;
- virtual int32_t WillWrite(
- int64_t offset,
- int32_t bytes_to_write,
- scoped_refptr< ::ppapi::TrackedCallback> callback) OVERRIDE;
- virtual int32_t WillSetLength(
- int64_t length,
- scoped_refptr< ::ppapi::TrackedCallback> callback) OVERRIDE;
-
- private:
- // FileIOImpl overrides.
- virtual int32_t OpenValidated(
- PP_Resource file_ref_resource,
- ::ppapi::thunk::PPB_FileRef_API* file_ref_api,
- int32_t open_flags,
- scoped_refptr< ::ppapi::TrackedCallback> callback) OVERRIDE;
- virtual int32_t QueryValidated(
- PP_FileInfo* info,
- scoped_refptr< ::ppapi::TrackedCallback> callback) OVERRIDE;
- virtual int32_t TouchValidated(
- PP_Time last_access_time,
- PP_Time last_modified_time,
- scoped_refptr< ::ppapi::TrackedCallback> callback) OVERRIDE;
- virtual int32_t ReadValidated(
- int64_t offset,
- const PP_ArrayOutput& output_array_buffer,
- int32_t max_read_length,
- scoped_refptr< ::ppapi::TrackedCallback> callback) OVERRIDE;
- virtual int32_t WriteValidated(
- int64_t offset,
- const char* buffer,
- int32_t bytes_to_write,
- scoped_refptr< ::ppapi::TrackedCallback> callback) OVERRIDE;
- virtual int32_t SetLengthValidated(
- int64_t length,
- scoped_refptr< ::ppapi::TrackedCallback> callback) OVERRIDE;
- virtual int32_t FlushValidated(
- scoped_refptr< ::ppapi::TrackedCallback> callback) OVERRIDE;
-
- // Returns the plugin delegate for this resource if it exists, or NULL if it
- // doesn't. Calling code should always check for NULL.
- PluginDelegate* GetPluginDelegate();
-
- // Callback handlers. These mostly convert the PlatformFileError to the
- // PP_Error code and call the shared (non-"Platform") version.
- void ExecutePlatformGeneralCallback(base::PlatformFileError error_code);
- void ExecutePlatformOpenFileCallback(base::PlatformFileError error_code,
- base::PassPlatformFile file);
- void ExecutePlatformOpenFileSystemURLCallback(
- base::PlatformFileError error_code,
- base::PassPlatformFile file,
- const PluginDelegate::NotifyCloseFileCallback& callback);
- void ExecutePlatformQueryCallback(base::PlatformFileError error_code,
- const base::PlatformFileInfo& file_info);
- void ExecutePlatformReadCallback(base::PlatformFileError error_code,
- const char* data, int bytes_read);
- void ExecutePlatformWriteCallback(base::PlatformFileError error_code,
- int bytes_written);
- void ExecutePlatformWillWriteCallback(base::PlatformFileError error_code,
- int bytes_written);
-
- base::PlatformFile file_;
-
- // Valid only for PP_FILESYSTEMTYPE_LOCAL{PERSISTENT,TEMPORARY}.
- GURL file_system_url_;
-
- // Callback function for notifying when the file handle is closed.
- PluginDelegate::NotifyCloseFileCallback notify_close_file_callback_;
-
- // Pointer to a QuotaFileIO instance, which is valid only while a file
- // of type PP_FILESYSTEMTYPE_LOCAL{PERSISTENT,TEMPORARY} is opened.
- scoped_ptr<QuotaFileIO> quota_file_io_;
-
- base::WeakPtrFactory<PPB_FileIO_Impl> weak_factory_;
-
- DISALLOW_COPY_AND_ASSIGN(PPB_FileIO_Impl);
-};
-
-} // namespace ppapi
-} // namespace webkit
-
-#endif // WEBKIT_PLUGINS_PPAPI_PPB_FILE_IO_IMPL_H_
diff --git a/webkit/plugins/ppapi/resource_creation_impl.cc b/webkit/plugins/ppapi/resource_creation_impl.cc
index 1ef878f..44f535c 100644
--- a/webkit/plugins/ppapi/resource_creation_impl.cc
+++ b/webkit/plugins/ppapi/resource_creation_impl.cc
@@ -14,7 +14,6 @@
#include "webkit/plugins/ppapi/ppb_broker_impl.h"
#include "webkit/plugins/ppapi/ppb_buffer_impl.h"
#include "webkit/plugins/ppapi/ppb_directory_reader_impl.h"
-#include "webkit/plugins/ppapi/ppb_file_io_impl.h"
#include "webkit/plugins/ppapi/ppb_file_ref_impl.h"
#include "webkit/plugins/ppapi/ppb_file_system_impl.h"
#include "webkit/plugins/ppapi/ppb_flash_message_loop_impl.h"
@@ -85,10 +84,6 @@ PP_Resource ResourceCreationImpl::CreateDirectoryReader(
return PPB_DirectoryReader_Impl::Create(directory_ref);
}
-PP_Resource ResourceCreationImpl::CreateFileIO(PP_Instance instance) {
- return (new PPB_FileIO_Impl(instance))->GetReference();
-}
-
PP_Resource ResourceCreationImpl::CreateFileRef(PP_Resource file_system,
const char* path) {
PPB_FileRef_Impl* res = PPB_FileRef_Impl::CreateInternal(file_system, path);
diff --git a/webkit/plugins/ppapi/resource_creation_impl.h b/webkit/plugins/ppapi/resource_creation_impl.h
index 7216b46..9549354 100644
--- a/webkit/plugins/ppapi/resource_creation_impl.h
+++ b/webkit/plugins/ppapi/resource_creation_impl.h
@@ -35,7 +35,6 @@ class WEBKIT_PLUGINS_EXPORT ResourceCreationImpl
virtual PP_Resource CreateBuffer(PP_Instance instance,
uint32_t size) OVERRIDE;
virtual PP_Resource CreateDirectoryReader(PP_Resource directory_ref) OVERRIDE;
- virtual PP_Resource CreateFileIO(PP_Instance instance) OVERRIDE;
virtual PP_Resource CreateFileRef(PP_Resource file_system,
const char* path) OVERRIDE;
virtual PP_Resource CreateFileSystem(PP_Instance instance,