Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1890)

Unified Diff: content/browser/renderer_host/pepper/pepper_file_system_browser_host.h

Issue 26803004: PPAPI: Add PluginPrivateFileSystem (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 7 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: content/browser/renderer_host/pepper/pepper_file_system_browser_host.h
diff --git a/content/browser/renderer_host/pepper/pepper_file_system_browser_host.h b/content/browser/renderer_host/pepper/pepper_file_system_browser_host.h
index 53621e038077ccbdc59cf2f27d39ab0bf805570a..6f8a36ed6acb4e1f1142d9721fe43b2cfaba22d9 100644
--- a/content/browser/renderer_host/pepper/pepper_file_system_browser_host.h
+++ b/content/browser/renderer_host/pepper/pepper_file_system_browser_host.h
@@ -10,6 +10,7 @@
#include "base/basictypes.h"
#include "base/callback.h"
#include "base/memory/weak_ptr.h"
+#include "content/common/content_export.h"
#include "ppapi/c/pp_file_info.h"
#include "ppapi/c/private/ppb_isolated_file_system_private.h"
#include "ppapi/host/host_message_context.h"
@@ -22,7 +23,7 @@ namespace content {
class BrowserPpapiHost;
-class PepperFileSystemBrowserHost
+class CONTENT_EXPORT PepperFileSystemBrowserHost
: public ppapi::host::ResourceHost,
public base::SupportsWeakPtr<PepperFileSystemBrowserHost> {
public:
@@ -55,6 +56,8 @@ class PepperFileSystemBrowserHost
}
private:
+ friend class PepperFileSystemBrowserHostTest;
+
void OpenExistingWithContext(
const base::Closure& callback,
scoped_refptr<fileapi::FileSystemContext> fs_context);
@@ -62,14 +65,24 @@ class PepperFileSystemBrowserHost
ppapi::host::ReplyMessageContext reply_context,
fileapi::FileSystemType file_system_type,
scoped_refptr<fileapi::FileSystemContext> fs_context);
- void GotIsolatedFileSystemContext(
- ppapi::host::ReplyMessageContext reply_context,
- scoped_refptr<fileapi::FileSystemContext> fs_context);
void OpenFileSystemComplete(
ppapi::host::ReplyMessageContext reply_context,
const GURL& root,
const std::string& name,
base::PlatformFileError error);
+ void GotIsolatedFileSystemContext(
+ ppapi::host::ReplyMessageContext reply_context,
+ const std::string& fsid,
+ PP_IsolatedFileSystemType_Private type,
+ scoped_refptr<fileapi::FileSystemContext> fs_context);
+ void OpenPluginPrivateFileSystem(
+ ppapi::host::ReplyMessageContext reply_context,
+ const std::string& fsid,
+ scoped_refptr<fileapi::FileSystemContext> fs_context);
+ void OpenPluginPrivateFileSystemComplete(
+ ppapi::host::ReplyMessageContext reply_context,
+ const std::string& fsid,
+ base::PlatformFileError error);
int32_t OnHostMsgOpen(ppapi::host::HostMessageContext* context,
int64_t expected_size);
@@ -78,6 +91,16 @@ class PepperFileSystemBrowserHost
const std::string& fsid,
PP_IsolatedFileSystemType_Private type);
+ void SendReplyForIsolatedFileSystem(
+ ppapi::host::ReplyMessageContext reply_context,
+ const std::string& fsid,
+ int32_t error);
+
+ std::string GetPluginMimeType() const;
+
+ // Returns plugin ID generated from plugin's MIME type.
+ std::string GeneratePluginId(const std::string& mime_type) const;
+
BrowserPpapiHost* browser_ppapi_host_;
PP_FileSystemType type_;
@@ -86,6 +109,8 @@ class PepperFileSystemBrowserHost
scoped_refptr<fileapi::FileSystemContext> fs_context_;
bool called_open_; // whether open has been called.
+ std::string fsid_; // used only for isolated filesystems.
+
base::WeakPtrFactory<PepperFileSystemBrowserHost> weak_factory_;
DISALLOW_COPY_AND_ASSIGN(PepperFileSystemBrowserHost);

Powered by Google App Engine
This is Rietveld 408576698