| Index: content/renderer/pepper/pepper_plugin_delegate_impl.cc
|
| diff --git a/content/renderer/pepper/pepper_plugin_delegate_impl.cc b/content/renderer/pepper/pepper_plugin_delegate_impl.cc
|
| index 42bcf50a8dea5fb176b833c6b13df64b1193fbd0..39ad0d5f5f47e803d79cb74290a12e449572e723 100644
|
| --- a/content/renderer/pepper/pepper_plugin_delegate_impl.cc
|
| +++ b/content/renderer/pepper/pepper_plugin_delegate_impl.cc
|
| @@ -64,6 +64,7 @@
|
| #include "ppapi/c/dev/pp_video_dev.h"
|
| #include "ppapi/c/pp_errors.h"
|
| #include "ppapi/c/private/ppb_flash.h"
|
| +#include "ppapi/host/file_system_registry.h"
|
| #include "ppapi/host/ppapi_host.h"
|
| #include "ppapi/proxy/host_dispatcher.h"
|
| #include "ppapi/proxy/ppapi_messages.h"
|
| @@ -344,16 +345,6 @@ void CreateHostForInProcessModule(RenderViewImpl* render_view,
|
| render_view->PpapiPluginCreated(host_impl);
|
| }
|
|
|
| -template <typename HostType>
|
| -const HostType* GetRendererResourceHost(
|
| - PP_Instance instance, PP_Resource resource) {
|
| - const ppapi::host::PpapiHost* ppapi_host =
|
| - RendererPpapiHost::GetForPPInstance(instance)->GetPpapiHost();
|
| - if (!resource || !ppapi_host)
|
| - return NULL;
|
| - return static_cast<HostType*>(ppapi_host->GetResourceHost(resource));
|
| -}
|
| -
|
| } // namespace
|
|
|
| PepperPluginDelegateImpl::PepperPluginDelegateImpl(RenderViewImpl* render_view)
|
| @@ -1032,23 +1023,21 @@ void PepperPluginDelegateImpl::WillHandleMouseEvent() {
|
|
|
| bool PepperPluginDelegateImpl::IsFileSystemOpened(PP_Instance instance,
|
| PP_Resource resource) const {
|
| - const PepperFileSystemHost* host =
|
| - GetRendererResourceHost<PepperFileSystemHost>(instance, resource);
|
| - return host && host->IsOpened();
|
| + return ppapi::host::FileSystemRegistry::GetInstance()->
|
| + LookUp(instance, resource).IsOpened();
|
| }
|
|
|
| PP_FileSystemType PepperPluginDelegateImpl::GetFileSystemType(
|
| - PP_Instance instance, PP_Resource resource) const {
|
| - const PepperFileSystemHost* host =
|
| - GetRendererResourceHost<PepperFileSystemHost>(instance, resource);
|
| - return host ? host->GetType() : PP_FILESYSTEMTYPE_INVALID;
|
| + PP_Instance instance,
|
| + PP_Resource resource) const {
|
| + return ppapi::host::FileSystemRegistry::GetInstance()->
|
| + LookUp(instance, resource).GetType();
|
| }
|
|
|
| GURL PepperPluginDelegateImpl::GetFileSystemRootUrl(
|
| PP_Instance instance, PP_Resource resource) const {
|
| - const PepperFileSystemHost* host =
|
| - GetRendererResourceHost<PepperFileSystemHost>(instance, resource);
|
| - return host ? host->GetRootUrl() : GURL();
|
| + return ppapi::host::FileSystemRegistry::GetInstance()->
|
| + LookUp(instance, resource).GetRootUrl();
|
| }
|
|
|
| bool PepperPluginDelegateImpl::MakeDirectory(
|
|
|