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

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

Issue 1093383002: [WIP] Provided file system from NACL. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Moved several modules to chromeos folder. Created 5 years, 5 months 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_filesystem_provider_host.h
diff --git a/content/browser/renderer_host/pepper/pepper_filesystem_provider_host.h b/content/browser/renderer_host/pepper/pepper_filesystem_provider_host.h
new file mode 100644
index 0000000000000000000000000000000000000000..42ac093f02c38de67e9fe5852cdc2e28c9012a93
--- /dev/null
+++ b/content/browser/renderer_host/pepper/pepper_filesystem_provider_host.h
@@ -0,0 +1,65 @@
+// Copyright 2015 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 PEPPERFILESYSTEMPROVIDERHOST_H
+#define PEPPERFILESYSTEMPROVIDERHOST_H
+
+#include "ppapi/host/host_message_context.h"
+#include "ppapi/host/resource_host.h"
+
+namespace content {
+
+class PepperFilesystemProviderBackend {
+public:
+ virtual ~PepperFilesystemProviderBackend();
+ // Messages that interface with the provided filesystem backend
+ virtual int32_t SendMountRequest(
+ ppapi::host::HostMessageContext *context,
+ const base::ListValue&)=0;
+ virtual int32_t SendUnmountRequest(
+ ppapi::host::HostMessageContext* context,
+ const std::string& )=0;
+ virtual int32_t OnPluginResponse(
+ ppapi::host::HostMessageContext* context,
+ const base::ListValue&)=0;
+ virtual int32_t OnPluginWriteAck(
+ ppapi::host::HostMessageContext* context)=0;
+ virtual int32_t OnPluginNotification(
+ ppapi::host::HostMessageContext* context,
+ const base::ListValue&)=0;
+};
+
+
+class BrowserPpapiHost;
+
+class PepperFilesystemProviderHost :
+ public ppapi::host::ResourceHost
+{
+public:
+ PepperFilesystemProviderHost( BrowserPpapiHost *host,
+ PP_Instance instance,
+ PP_Resource resource);
+ ~PepperFilesystemProviderHost()override;
+private:
+ scoped_ptr<PepperFilesystemProviderBackend> backend_;
+
+ // ResourceMessageHandler interface
+protected:
+ int32_t OnResourceMessageReceived(
+ const IPC::Message& msg, ppapi::host::HostMessageContext*context)override;
+ // Messages that interface with the provided filesystem backend
+ int32_t OnHostMsgMount(ppapi::host::HostMessageContext *context,
+ const base::ListValue&);
+ int32_t OnHostMsgUnmount(ppapi::host::HostMessageContext* context,
+ const std::string& );
+ int32_t OnHostMsgPluginResponse( ppapi::host::HostMessageContext* context,
+ const base::ListValue& );
+ int32_t OnHostMsgPluginWriteAck(ppapi::host::HostMessageContext* context);
+ int32_t OnHostMsgPluginNotification(
+ ppapi::host::HostMessageContext* context,
+ const base::ListValue&);
+};
+} // namespace content
+
+#endif // PEPPERFILESYSTEMPROVIDERHOST_H

Powered by Google App Engine
This is Rietveld 408576698