1 // Copyright (c) 2011 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.
5 #ifndef PPAPI_PROXY_PPB_FILE_SYSTEM_PROXY_H_
6 #define PPAPI_PROXY_PPB_FILE_SYSTEM_PROXY_H_
10 #include "base/basictypes.h"
11 #include "ppapi/c/pp_instance.h"
12 #include "ppapi/c/pp_resource.h"
13 #include "ppapi/c/pp_time.h"
14 #include "ppapi/c/ppb_file_system.h"
15 #include "ppapi/proxy/interface_proxy.h"
16 #include "ppapi/proxy/proxy_completion_callback_factory.h"
17 #include "ppapi/utility/completion_callback_factory.h"
25 class PPB_FileSystem_Proxy
: public InterfaceProxy
{
27 explicit PPB_FileSystem_Proxy(Dispatcher
* dispatcher
);
28 virtual ~PPB_FileSystem_Proxy();
30 static const Info
* GetInfo();
32 static PP_Resource
CreateProxyResource(PP_Instance instance
,
33 PP_FileSystemType type
);
35 // InterfaceProxy implementation.
36 virtual bool OnMessageReceived(const IPC::Message
& msg
);
38 static const ApiID kApiID
= API_ID_PPB_FILE_SYSTEM
;
42 void OnMsgCreate(PP_Instance instance
,
44 ppapi::HostResource
* result
);
45 void OnMsgOpen(const ppapi::HostResource
& filesystem
,
46 int64_t expected_size
);
48 void OnMsgOpenComplete(const ppapi::HostResource
& filesystem
,
51 void OpenCompleteInHost(int32_t result
,
52 const ppapi::HostResource
& host_resource
);
54 ProxyCompletionCallbackFactory
<PPB_FileSystem_Proxy
> callback_factory_
;
56 DISALLOW_COPY_AND_ASSIGN(PPB_FileSystem_Proxy
);
62 #endif // PPAPI_PROXY_PPB_FILE_SYSTEM_PROXY_H_