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

Side by Side 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 unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef PEPPERFILESYSTEMPROVIDERHOST_H
6 #define PEPPERFILESYSTEMPROVIDERHOST_H
7
8 #include "ppapi/host/host_message_context.h"
9 #include "ppapi/host/resource_host.h"
10
11 namespace content {
12
13 class PepperFilesystemProviderBackend {
14 public:
15 virtual ~PepperFilesystemProviderBackend();
16 // Messages that interface with the provided filesystem backend
17 virtual int32_t SendMountRequest(
18 ppapi::host::HostMessageContext *context,
19 const base::ListValue&)=0;
20 virtual int32_t SendUnmountRequest(
21 ppapi::host::HostMessageContext* context,
22 const std::string& )=0;
23 virtual int32_t OnPluginResponse(
24 ppapi::host::HostMessageContext* context,
25 const base::ListValue&)=0;
26 virtual int32_t OnPluginWriteAck(
27 ppapi::host::HostMessageContext* context)=0;
28 virtual int32_t OnPluginNotification(
29 ppapi::host::HostMessageContext* context,
30 const base::ListValue&)=0;
31 };
32
33
34 class BrowserPpapiHost;
35
36 class PepperFilesystemProviderHost :
37 public ppapi::host::ResourceHost
38 {
39 public:
40 PepperFilesystemProviderHost( BrowserPpapiHost *host,
41 PP_Instance instance,
42 PP_Resource resource);
43 ~PepperFilesystemProviderHost()override;
44 private:
45 scoped_ptr<PepperFilesystemProviderBackend> backend_;
46
47 // ResourceMessageHandler interface
48 protected:
49 int32_t OnResourceMessageReceived(
50 const IPC::Message& msg, ppapi::host::HostMessageContext*context)override;
51 // Messages that interface with the provided filesystem backend
52 int32_t OnHostMsgMount(ppapi::host::HostMessageContext *context,
53 const base::ListValue&);
54 int32_t OnHostMsgUnmount(ppapi::host::HostMessageContext* context,
55 const std::string& );
56 int32_t OnHostMsgPluginResponse( ppapi::host::HostMessageContext* context,
57 const base::ListValue& );
58 int32_t OnHostMsgPluginWriteAck(ppapi::host::HostMessageContext* context);
59 int32_t OnHostMsgPluginNotification(
60 ppapi::host::HostMessageContext* context,
61 const base::ListValue&);
62 };
63 } // namespace content
64
65 #endif // PEPPERFILESYSTEMPROVIDERHOST_H
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698