| Index: chrome/renderer/pepper/pepper_ext_crx_file_system_renderer_host.h
|
| diff --git a/chrome/renderer/pepper/pepper_ext_crx_file_system_renderer_host.h b/chrome/renderer/pepper/pepper_ext_crx_file_system_renderer_host.h
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..e5611eafa10814d6db82d2b4e4fca9a31f8b41c4
|
| --- /dev/null
|
| +++ b/chrome/renderer/pepper/pepper_ext_crx_file_system_renderer_host.h
|
| @@ -0,0 +1,56 @@
|
| +// Copyright (c) 2013 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 CHROME_RENDERER_PEPPER_PEPPER_EXT_CRX_FILE_SYSTEM_RENDERER_HOST_H_
|
| +#define CHROME_RENDERER_PEPPER_PEPPER_EXT_CRX_FILE_SYSTEM_RENDERER_HOST_H_
|
| +
|
| +#include "googleurl/src/gurl.h"
|
| +#include "ppapi/c/pp_instance.h"
|
| +#include "ppapi/c/pp_resource.h"
|
| +#include "ppapi/host/file_system_registry.h"
|
| +#include "ppapi/host/host_message_context.h"
|
| +#include "ppapi/host/resource_host.h"
|
| +#include "ppapi/proxy/resource_message_params.h"
|
| +
|
| +namespace content {
|
| +class RendererPpapiHost;
|
| +}
|
| +
|
| +namespace chrome {
|
| +
|
| +// Renderer host of CRX filesystem resource, mainly to allow FileRef direct
|
| +// access (through FileSystemPeeker) on the host side.
|
| +class PepperExtCrxFileSystemRendererHost
|
| + : public ppapi::host::ResourceHost,
|
| + public ppapi::host::FileSystemRegistry::FileSystemPeeker {
|
| + public:
|
| + PepperExtCrxFileSystemRendererHost(content::RendererPpapiHost* host,
|
| + PP_Instance instance,
|
| + PP_Resource resource);
|
| + virtual ~PepperExtCrxFileSystemRendererHost();
|
| +
|
| + // ResourceHost override.
|
| + virtual int32_t OnResourceMessageReceived(
|
| + const IPC::Message& msg,
|
| + ppapi::host::HostMessageContext* context) OVERRIDE;
|
| +
|
| + // PepperFileSystemRegistry::FileSystemPeeker override.
|
| + virtual PP_FileSystemType GetType() const OVERRIDE;
|
| + virtual bool IsOpened() const OVERRIDE;
|
| + virtual const GURL& GetRootUrl() const OVERRIDE;
|
| +
|
| + private:
|
| + int32_t OnOpenFileSystem(ppapi::host::HostMessageContext* context,
|
| + const std::string& origin,
|
| + const std::string& fsid);
|
| +
|
| + bool opened_;
|
| + GURL root_url_;
|
| +
|
| + DISALLOW_COPY_AND_ASSIGN(PepperExtCrxFileSystemRendererHost);
|
| +};
|
| +
|
| +} // namespace chrome
|
| +
|
| +#endif // CHROME_RENDERER_PEPPER_PEPPER_EXT_CRX_FILE_SYSTEM_RENDERER_HOST_H_
|
|
|