ash: Update launcher background to 0.8 black.
[chromium-blink-merge.git] / ppapi / proxy / ppb_file_system_proxy.h
blob68197e7c112be6ecb836e070fc71fd9001477199
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_
8 #include <string>
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"
19 namespace ppapi {
21 class HostResource;
23 namespace proxy {
25 class PPB_FileSystem_Proxy : public InterfaceProxy {
26 public:
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;
40 private:
41 // Message handlers.
42 void OnMsgCreate(PP_Instance instance,
43 int type,
44 ppapi::HostResource* result);
45 void OnMsgOpen(const ppapi::HostResource& filesystem,
46 int64_t expected_size);
48 void OnMsgOpenComplete(const ppapi::HostResource& filesystem,
49 int32_t result);
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);
59 } // namespace proxy
60 } // namespace ppapi
62 #endif // PPAPI_PROXY_PPB_FILE_SYSTEM_PROXY_H_