diff options
author | victorhsieh@chromium.org <victorhsieh@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-05-08 18:04:58 +0000 |
---|---|---|
committer | victorhsieh@chromium.org <victorhsieh@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-05-08 18:04:58 +0000 |
commit | d196ccaf213718d4b3d33f2c07021ef86ce86253 (patch) | |
tree | 7d993de1cf5675e7730e3e1038b3c560f29818e4 /ppapi/cpp/file_system.cc | |
parent | 24e1ffbfc1e82294e909ce031e7aeaa8b8cca205 (diff) | |
download | chromium_src-d196ccaf213718d4b3d33f2c07021ef86ce86253.zip chromium_src-d196ccaf213718d4b3d33f2c07021ef86ce86253.tar.gz chromium_src-d196ccaf213718d4b3d33f2c07021ef86ce86253.tar.bz2 |
CRX FileSystem Pepper private API
pp::ExtCrxFileSystemPrivate is introduced in this change to allow plugin to mount (readonly) CRX extension directory as a filesystem. Files can be access through pp::ExtCrxFileRefPrivate (which is a subclass of pp::FileRef) just like normal file, and the path would look like "/manifest.json". See ppapi/example/crxfs for example.
Some keypoints in this change:
* pepper resource/host architecture:
- please refer to ppapi/proxy/ext_crx_file_system_private_resource.h.
* webkit/fileapi related:
- Changes run in browser
- Isoloated filesystem is the underlying filesystem
- Grant read permission to corresponding renderer of the plugin
- See chrome/browser/renderer_host/pepper/pepper_ext_crx_file_system_browser_host.cc
* extension related:
- Changes run in browser
- This is for getting extension installed directory to mount
TEST=out/Debug/chrome
--register-pepper-plugins="out/Debug/lib/libppapi_example_crxfs.so#PPAPI Tests##1.2.3;application/x-ppapi-example-crxfs" \
ppapi/examples/crxfs/crxfs.html
BUG=223301
Review URL: https://chromiumcodereview.appspot.com/14188019
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@198938 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ppapi/cpp/file_system.cc')
-rw-r--r-- | ppapi/cpp/file_system.cc | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/ppapi/cpp/file_system.cc b/ppapi/cpp/file_system.cc index 022288c..de14c36 100644 --- a/ppapi/cpp/file_system.cc +++ b/ppapi/cpp/file_system.cc @@ -25,6 +25,10 @@ template <> const char* interface_name<PPB_FileSystem_1_0>() { FileSystem::FileSystem() { } +FileSystem::FileSystem(PassRef, PP_Resource resource) + : Resource(PASS_REF, resource) { +} + FileSystem::FileSystem(const InstanceHandle& instance, PP_FileSystemType type) { if (!has_interface<PPB_FileSystem_1_0>()) |