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

Side by Side Diff: ppapi/proxy/ppb_flash_file_proxy.h

Issue 10169040: Move the rest of the Flash functions to the thunk system. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 8 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 | Annotate | Revision Log
« no previous file with comments | « ppapi/proxy/ppapi_messages.h ('k') | ppapi/proxy/ppb_flash_file_proxy.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
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.
4
5 #ifndef PPAPI_PPB_FLASH_FILE_PROXY_H_
6 #define PPAPI_PPB_FLASH_FILE_PROXY_H_
7
8 #include <string>
9 #include <vector>
10
11 #include "ipc/ipc_platform_file.h"
12 #include "ppapi/c/pp_instance.h"
13 #include "ppapi/c/pp_module.h"
14 #include "ppapi/proxy/interface_proxy.h"
15
16 struct PP_FileInfo;
17 struct PPB_Flash_File_FileRef;
18 struct PPB_Flash_File_ModuleLocal;
19
20 namespace ppapi {
21
22 class HostResource;
23
24 namespace proxy {
25
26 struct SerializedDirEntry;
27
28 class PPB_Flash_File_ModuleLocal_Proxy : public InterfaceProxy {
29 public:
30 PPB_Flash_File_ModuleLocal_Proxy(Dispatcher* dispatcher);
31 virtual ~PPB_Flash_File_ModuleLocal_Proxy();
32
33 static const PPB_Flash_File_ModuleLocal* GetInterface();
34
35 // InterfaceProxy implementation.
36 virtual bool OnMessageReceived(const IPC::Message& msg);
37
38 private:
39 // Message handlers.
40 void OnMsgOpenFile(PP_Instance instance,
41 const std::string& path,
42 int32_t mode,
43 IPC::PlatformFileForTransit* file_handle,
44 int32_t* result);
45 void OnMsgRenameFile(PP_Instance instance,
46 const std::string& path_from,
47 const std::string& path_to,
48 int32_t* result);
49 void OnMsgDeleteFileOrDir(PP_Instance instance,
50 const std::string& path,
51 PP_Bool recursive,
52 int32_t* result);
53 void OnMsgCreateDir(PP_Instance instance,
54 const std::string& path,
55 int32_t* result);
56 void OnMsgQueryFile(PP_Instance instance,
57 const std::string& path,
58 PP_FileInfo* info,
59 int32_t* result);
60 void OnMsgGetDirContents(PP_Instance instance,
61 const std::string& path,
62 std::vector<SerializedDirEntry>* entries,
63 int32_t* result);
64
65 // When this proxy is in the host side, this value caches the interface
66 // pointer so we don't have to retrieve it from the dispatcher each time.
67 // In the plugin, this value is always NULL.
68 const PPB_Flash_File_ModuleLocal* ppb_flash_file_module_local_impl_;
69
70 DISALLOW_COPY_AND_ASSIGN(PPB_Flash_File_ModuleLocal_Proxy);
71 };
72
73 class PPB_Flash_File_FileRef_Proxy : public InterfaceProxy {
74 public:
75 PPB_Flash_File_FileRef_Proxy(Dispatcher* dispatcher);
76 virtual ~PPB_Flash_File_FileRef_Proxy();
77
78 static const PPB_Flash_File_FileRef* GetInterface();
79
80 // InterfaceProxy implementation.
81 virtual bool OnMessageReceived(const IPC::Message& msg);
82
83 private:
84 // Message handlers.
85 void OnMsgOpenFile(const ppapi::HostResource& host_resource,
86 int32_t mode,
87 IPC::PlatformFileForTransit* file_handle,
88 int32_t* result);
89 void OnMsgQueryFile(const ppapi::HostResource& host_resource,
90 PP_FileInfo* info,
91 int32_t* result);
92
93 // When this proxy is in the host side, this value caches the interface
94 // pointer so we don't have to retrieve it from the dispatcher each time.
95 // In the plugin, this value is always NULL.
96 const PPB_Flash_File_FileRef* ppb_flash_file_fileref_impl_;
97
98 DISALLOW_COPY_AND_ASSIGN(PPB_Flash_File_FileRef_Proxy);
99 };
100
101 } // namespace proxy
102 } // namespace ppapi
103
104 #endif // PPAPI_PPB_FLASH_FILE_PROXY_H_
OLDNEW
« no previous file with comments | « ppapi/proxy/ppapi_messages.h ('k') | ppapi/proxy/ppb_flash_file_proxy.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698