| 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 |
| (...skipping 12 matching lines...) Expand all Loading... |
| 23 | 23 |
| 24 namespace proxy { | 24 namespace proxy { |
| 25 | 25 |
| 26 struct SerializedDirEntry; | 26 struct SerializedDirEntry; |
| 27 | 27 |
| 28 class PPB_Flash_File_ModuleLocal_Proxy : public InterfaceProxy { | 28 class PPB_Flash_File_ModuleLocal_Proxy : public InterfaceProxy { |
| 29 public: | 29 public: |
| 30 PPB_Flash_File_ModuleLocal_Proxy(Dispatcher* dispatcher); | 30 PPB_Flash_File_ModuleLocal_Proxy(Dispatcher* dispatcher); |
| 31 virtual ~PPB_Flash_File_ModuleLocal_Proxy(); | 31 virtual ~PPB_Flash_File_ModuleLocal_Proxy(); |
| 32 | 32 |
| 33 static const Info* GetInfo(); | 33 static const PPB_Flash_File_ModuleLocal* GetInterface(); |
| 34 | 34 |
| 35 // InterfaceProxy implementation. | 35 // InterfaceProxy implementation. |
| 36 virtual bool OnMessageReceived(const IPC::Message& msg); | 36 virtual bool OnMessageReceived(const IPC::Message& msg); |
| 37 | 37 |
| 38 private: | 38 private: |
| 39 // Message handlers. | 39 // Message handlers. |
| 40 void OnMsgOpenFile(PP_Instance instance, | 40 void OnMsgOpenFile(PP_Instance instance, |
| 41 const std::string& path, | 41 const std::string& path, |
| 42 int32_t mode, | 42 int32_t mode, |
| 43 IPC::PlatformFileForTransit* file_handle, | 43 IPC::PlatformFileForTransit* file_handle, |
| (...skipping 24 matching lines...) Expand all Loading... |
| 68 const PPB_Flash_File_ModuleLocal* ppb_flash_file_module_local_impl_; | 68 const PPB_Flash_File_ModuleLocal* ppb_flash_file_module_local_impl_; |
| 69 | 69 |
| 70 DISALLOW_COPY_AND_ASSIGN(PPB_Flash_File_ModuleLocal_Proxy); | 70 DISALLOW_COPY_AND_ASSIGN(PPB_Flash_File_ModuleLocal_Proxy); |
| 71 }; | 71 }; |
| 72 | 72 |
| 73 class PPB_Flash_File_FileRef_Proxy : public InterfaceProxy { | 73 class PPB_Flash_File_FileRef_Proxy : public InterfaceProxy { |
| 74 public: | 74 public: |
| 75 PPB_Flash_File_FileRef_Proxy(Dispatcher* dispatcher); | 75 PPB_Flash_File_FileRef_Proxy(Dispatcher* dispatcher); |
| 76 virtual ~PPB_Flash_File_FileRef_Proxy(); | 76 virtual ~PPB_Flash_File_FileRef_Proxy(); |
| 77 | 77 |
| 78 static const Info* GetInfo(); | 78 static const PPB_Flash_File_FileRef* GetInterface(); |
| 79 | 79 |
| 80 // InterfaceProxy implementation. | 80 // InterfaceProxy implementation. |
| 81 virtual bool OnMessageReceived(const IPC::Message& msg); | 81 virtual bool OnMessageReceived(const IPC::Message& msg); |
| 82 | 82 |
| 83 private: | 83 private: |
| 84 // Message handlers. | 84 // Message handlers. |
| 85 void OnMsgOpenFile(const ppapi::HostResource& host_resource, | 85 void OnMsgOpenFile(const ppapi::HostResource& host_resource, |
| 86 int32_t mode, | 86 int32_t mode, |
| 87 IPC::PlatformFileForTransit* file_handle, | 87 IPC::PlatformFileForTransit* file_handle, |
| 88 int32_t* result); | 88 int32_t* result); |
| 89 void OnMsgQueryFile(const ppapi::HostResource& host_resource, | 89 void OnMsgQueryFile(const ppapi::HostResource& host_resource, |
| 90 PP_FileInfo* info, | 90 PP_FileInfo* info, |
| 91 int32_t* result); | 91 int32_t* result); |
| 92 | 92 |
| 93 // When this proxy is in the host side, this value caches the interface | 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. | 94 // pointer so we don't have to retrieve it from the dispatcher each time. |
| 95 // In the plugin, this value is always NULL. | 95 // In the plugin, this value is always NULL. |
| 96 const PPB_Flash_File_FileRef* ppb_flash_file_fileref_impl_; | 96 const PPB_Flash_File_FileRef* ppb_flash_file_fileref_impl_; |
| 97 | 97 |
| 98 DISALLOW_COPY_AND_ASSIGN(PPB_Flash_File_FileRef_Proxy); | 98 DISALLOW_COPY_AND_ASSIGN(PPB_Flash_File_FileRef_Proxy); |
| 99 }; | 99 }; |
| 100 | 100 |
| 101 } // namespace proxy | 101 } // namespace proxy |
| 102 } // namespace ppapi | 102 } // namespace ppapi |
| 103 | 103 |
| 104 #endif // PPAPI_PPB_FLASH_FILE_PROXY_H_ | 104 #endif // PPAPI_PPB_FLASH_FILE_PROXY_H_ |
| OLD | NEW |