summaryrefslogtreecommitdiffstats
path: root/ppapi/proxy/ppb_flash_file_proxy.h
diff options
context:
space:
mode:
authorviettrungluu@chromium.org <viettrungluu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-02-24 18:58:01 +0000
committerviettrungluu@chromium.org <viettrungluu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-02-24 18:58:01 +0000
commitd07fa3791159ea88bd0efd37e6ab7589f21affcf (patch)
tree19026bcbf806c0c14fdd89617eea26918a8cfd11 /ppapi/proxy/ppb_flash_file_proxy.h
parent3fa964af1c44352d08fca3a4bb0cad6006b3640c (diff)
downloadchromium_src-d07fa3791159ea88bd0efd37e6ab7589f21affcf.zip
chromium_src-d07fa3791159ea88bd0efd37e6ab7589f21affcf.tar.gz
chromium_src-d07fa3791159ea88bd0efd37e6ab7589f21affcf.tar.bz2
PPB_Flash cleanup part 2: move all the file stuff to ppb_flash_file.*.
ppb_flash_file.* is intended to contain multiple (very similar) interfaces, of which the ModuleLocal stuff is one. BUG=none TEST="everything" still works Review URL: http://codereview.chromium.org/6579026 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@75921 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ppapi/proxy/ppb_flash_file_proxy.h')
-rw-r--r--ppapi/proxy/ppb_flash_file_proxy.h69
1 files changed, 69 insertions, 0 deletions
diff --git a/ppapi/proxy/ppb_flash_file_proxy.h b/ppapi/proxy/ppb_flash_file_proxy.h
new file mode 100644
index 0000000..be4821c
--- /dev/null
+++ b/ppapi/proxy/ppb_flash_file_proxy.h
@@ -0,0 +1,69 @@
+// Copyright (c) 2011 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 PPAPI_PPB_FLASH_FILE_PROXY_H_
+#define PPAPI_PPB_FLASH_FILE_PROXY_H_
+
+#include <vector>
+
+#include "ipc/ipc_platform_file.h"
+#include "ppapi/c/pp_instance.h"
+#include "ppapi/c/pp_module.h"
+#include "ppapi/proxy/interface_proxy.h"
+
+struct PP_FileInfo_Dev;
+struct PPB_Flash_File_ModuleLocal;
+
+namespace pp {
+namespace proxy {
+
+struct SerializedDirEntry;
+
+class PPB_Flash_File_ModuleLocal_Proxy : public InterfaceProxy {
+ public:
+ PPB_Flash_File_ModuleLocal_Proxy(Dispatcher* dispatcher,
+ const void* target_interface);
+ virtual ~PPB_Flash_File_ModuleLocal_Proxy();
+
+ static const Info* GetInfo();
+
+ const PPB_Flash_File_ModuleLocal* ppb_flash_file_module_local_target() const {
+ return static_cast<const PPB_Flash_File_ModuleLocal*>(target_interface());
+ }
+
+ // InterfaceProxy implementation.
+ virtual bool OnMessageReceived(const IPC::Message& msg);
+
+ private:
+ // Message handlers.
+ void OnMsgOpenFile(PP_Instance instance,
+ const std::string& path,
+ int32_t mode,
+ IPC::PlatformFileForTransit* file_handle,
+ int32_t* result);
+ void OnMsgRenameFile(PP_Instance instance,
+ const std::string& path_from,
+ const std::string& path_to,
+ int32_t* result);
+ void OnMsgDeleteFileOrDir(PP_Instance instance,
+ const std::string& path,
+ PP_Bool recursive,
+ int32_t* result);
+ void OnMsgCreateDir(PP_Instance instance,
+ const std::string& path,
+ int32_t* result);
+ void OnMsgQueryFile(PP_Instance instance,
+ const std::string& path,
+ PP_FileInfo_Dev* info,
+ int32_t* result);
+ void OnMsgGetDirContents(PP_Instance instance,
+ const std::string& path,
+ std::vector<pp::proxy::SerializedDirEntry>* entries,
+ int32_t* result);
+};
+
+} // namespace proxy
+} // namespace pp
+
+#endif // PPAPI_PPB_FLASH_FILE_PROXY_H_