OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef PPAPI_PPB_FLASH_FILE_PROXY_H_ | 5 #ifndef PPAPI_PPB_FLASH_FILE_PROXY_H_ |
6 #define PPAPI_PPB_FLASH_FILE_PROXY_H_ | 6 #define PPAPI_PPB_FLASH_FILE_PROXY_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
11 #include "ipc/ipc_platform_file.h" | 11 #include "ipc/ipc_platform_file.h" |
12 #include "ppapi/c/pp_instance.h" | 12 #include "ppapi/c/pp_instance.h" |
13 #include "ppapi/c/pp_module.h" | 13 #include "ppapi/c/pp_module.h" |
14 #include "ppapi/proxy/interface_proxy.h" | 14 #include "ppapi/proxy/interface_proxy.h" |
15 | 15 |
16 struct PP_FileInfo; | 16 struct PP_FileInfo; |
17 struct PPB_Flash_File_FileRef; | 17 struct PPB_Flash_File_FileRef; |
18 struct PPB_Flash_File_ModuleLocal; | 18 struct PPB_Flash_File_ModuleLocal; |
19 | 19 |
| 20 namespace ppapi { |
| 21 class HostResource; |
| 22 } |
| 23 |
20 namespace pp { | 24 namespace pp { |
21 namespace proxy { | 25 namespace proxy { |
22 | 26 |
23 class HostResource; | |
24 struct SerializedDirEntry; | 27 struct SerializedDirEntry; |
25 | 28 |
26 class PPB_Flash_File_ModuleLocal_Proxy : public InterfaceProxy { | 29 class PPB_Flash_File_ModuleLocal_Proxy : public InterfaceProxy { |
27 public: | 30 public: |
28 PPB_Flash_File_ModuleLocal_Proxy(Dispatcher* dispatcher, | 31 PPB_Flash_File_ModuleLocal_Proxy(Dispatcher* dispatcher, |
29 const void* target_interface); | 32 const void* target_interface); |
30 virtual ~PPB_Flash_File_ModuleLocal_Proxy(); | 33 virtual ~PPB_Flash_File_ModuleLocal_Proxy(); |
31 | 34 |
32 static const Info* GetInfo(); | 35 static const Info* GetInfo(); |
33 | 36 |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
76 | 79 |
77 const PPB_Flash_File_FileRef* ppb_flash_file_module_local_target() const { | 80 const PPB_Flash_File_FileRef* ppb_flash_file_module_local_target() const { |
78 return static_cast<const PPB_Flash_File_FileRef*>(target_interface()); | 81 return static_cast<const PPB_Flash_File_FileRef*>(target_interface()); |
79 } | 82 } |
80 | 83 |
81 // InterfaceProxy implementation. | 84 // InterfaceProxy implementation. |
82 virtual bool OnMessageReceived(const IPC::Message& msg); | 85 virtual bool OnMessageReceived(const IPC::Message& msg); |
83 | 86 |
84 private: | 87 private: |
85 // Message handlers. | 88 // Message handlers. |
86 void OnMsgOpenFile(const HostResource& host_resource, | 89 void OnMsgOpenFile(const ppapi::HostResource& host_resource, |
87 int32_t mode, | 90 int32_t mode, |
88 IPC::PlatformFileForTransit* file_handle, | 91 IPC::PlatformFileForTransit* file_handle, |
89 int32_t* result); | 92 int32_t* result); |
90 void OnMsgQueryFile(const HostResource& host_resource, | 93 void OnMsgQueryFile(const ppapi::HostResource& host_resource, |
91 PP_FileInfo* info, | 94 PP_FileInfo* info, |
92 int32_t* result); | 95 int32_t* result); |
93 }; | 96 }; |
94 | 97 |
95 } // namespace proxy | 98 } // namespace proxy |
96 } // namespace pp | 99 } // namespace pp |
97 | 100 |
98 #endif // PPAPI_PPB_FLASH_FILE_PROXY_H_ | 101 #endif // PPAPI_PPB_FLASH_FILE_PROXY_H_ |
OLD | NEW |