summaryrefslogtreecommitdiffstats
path: root/ppapi/cpp/private/ext_crx_file_system_private.h
diff options
context:
space:
mode:
authorvictorhsieh@chromium.org <victorhsieh@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-05-08 18:04:58 +0000
committervictorhsieh@chromium.org <victorhsieh@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-05-08 18:04:58 +0000
commitd196ccaf213718d4b3d33f2c07021ef86ce86253 (patch)
tree7d993de1cf5675e7730e3e1038b3c560f29818e4 /ppapi/cpp/private/ext_crx_file_system_private.h
parent24e1ffbfc1e82294e909ce031e7aeaa8b8cca205 (diff)
downloadchromium_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/private/ext_crx_file_system_private.h')
-rw-r--r--ppapi/cpp/private/ext_crx_file_system_private.h31
1 files changed, 31 insertions, 0 deletions
diff --git a/ppapi/cpp/private/ext_crx_file_system_private.h b/ppapi/cpp/private/ext_crx_file_system_private.h
new file mode 100644
index 0000000..e307f91
--- /dev/null
+++ b/ppapi/cpp/private/ext_crx_file_system_private.h
@@ -0,0 +1,31 @@
+// 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 PPAPI_CPP_PRIVATE_EXTENSION_CRX_FILE_SYSTEM_PRIVATE_H_
+#define PPAPI_CPP_PRIVATE_EXTENSION_CRX_FILE_SYSTEM_PRIVATE_H_
+
+#include "ppapi/c/pp_instance.h"
+#include "ppapi/cpp/completion_callback.h"
+#include "ppapi/cpp/file_system.h"
+#include "ppapi/cpp/instance_handle.h"
+
+namespace pp {
+
+class CompletionCallback;
+
+class ExtCrxFileSystemPrivate {
+ public:
+ ExtCrxFileSystemPrivate();
+ explicit ExtCrxFileSystemPrivate(const InstanceHandle& instance);
+ virtual ~ExtCrxFileSystemPrivate();
+
+ int32_t Open(const CompletionCallbackWithOutput<pp::FileSystem>& cc);
+
+ private:
+ PP_Instance instance_;
+};
+
+} // namespace pp
+
+#endif // PPAPI_CPP_PRIVATE_EXTENSION_CRX_FILE_SYSTEM_PRIVATE_H_