| 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_PROXY_PPB_FILE_REF_PROXY_H_ | 5 #ifndef PPAPI_PROXY_PPB_FILE_REF_PROXY_H_ |
| 6 #define PPAPI_PROXY_PPB_FILE_REF_PROXY_H_ | 6 #define PPAPI_PROXY_PPB_FILE_REF_PROXY_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 48 // Creates a plugin resource from the given CreateInfo sent from the host. | 48 // Creates a plugin resource from the given CreateInfo sent from the host. |
| 49 // The value will be the result of calling SerializeFileRef on the host. | 49 // The value will be the result of calling SerializeFileRef on the host. |
| 50 // This represents passing the resource ownership to the plugin. This | 50 // This represents passing the resource ownership to the plugin. This |
| 51 // function also checks the validity of the result and returns 0 on failure. | 51 // function also checks the validity of the result and returns 0 on failure. |
| 52 // | 52 // |
| 53 // Various PPAPI functions return file refs from various interfaces, so this | 53 // Various PPAPI functions return file refs from various interfaces, so this |
| 54 // function is public so anybody can receive a file ref. | 54 // function is public so anybody can receive a file ref. |
| 55 static PP_Resource DeserializeFileRef( | 55 static PP_Resource DeserializeFileRef( |
| 56 const PPB_FileRef_CreateInfo& serialized); | 56 const PPB_FileRef_CreateInfo& serialized); |
| 57 | 57 |
| 58 static const InterfaceID kInterfaceID = INTERFACE_ID_PPB_FILE_REF; | 58 static const ApiID kApiID = API_ID_PPB_FILE_REF; |
| 59 | 59 |
| 60 private: | 60 private: |
| 61 // Message handlers. | 61 // Message handlers. |
| 62 void OnMsgCreate(const ppapi::HostResource& file_system, | 62 void OnMsgCreate(const ppapi::HostResource& file_system, |
| 63 const std::string& path, | 63 const std::string& path, |
| 64 PPB_FileRef_CreateInfo* result); | 64 PPB_FileRef_CreateInfo* result); |
| 65 void OnMsgGetParent(const ppapi::HostResource& host_resource, | 65 void OnMsgGetParent(const ppapi::HostResource& host_resource, |
| 66 PPB_FileRef_CreateInfo* result); | 66 PPB_FileRef_CreateInfo* result); |
| 67 void OnMsgMakeDirectory(const ppapi::HostResource& host_resource, | 67 void OnMsgMakeDirectory(const ppapi::HostResource& host_resource, |
| 68 PP_Bool make_ancestors, | 68 PP_Bool make_ancestors, |
| 69 uint32_t serialized_callback); | 69 uint32_t serialized_callback); |
| 70 void OnMsgTouch(const ppapi::HostResource& host_resource, | 70 void OnMsgTouch(const ppapi::HostResource& host_resource, |
| 71 PP_Time last_access, | 71 PP_Time last_access, |
| 72 PP_Time last_modified, | 72 PP_Time last_modified, |
| 73 uint32_t serialized_callback); | 73 uint32_t serialized_callback); |
| 74 void OnMsgDelete(const ppapi::HostResource& host_resource, | 74 void OnMsgDelete(const ppapi::HostResource& host_resource, |
| 75 uint32_t serialized_callback); | 75 uint32_t serialized_callback); |
| 76 void OnMsgRename(const ppapi::HostResource& file_ref, | 76 void OnMsgRename(const ppapi::HostResource& file_ref, |
| 77 const ppapi::HostResource& new_file_ref, | 77 const ppapi::HostResource& new_file_ref, |
| 78 uint32_t serialized_callback); | 78 uint32_t serialized_callback); |
| 79 | 79 |
| 80 DISALLOW_COPY_AND_ASSIGN(PPB_FileRef_Proxy); | 80 DISALLOW_COPY_AND_ASSIGN(PPB_FileRef_Proxy); |
| 81 }; | 81 }; |
| 82 | 82 |
| 83 } // namespace proxy | 83 } // namespace proxy |
| 84 } // namespace ppapi | 84 } // namespace ppapi |
| 85 | 85 |
| 86 #endif // PPAPI_PROXY_PPB_FILE_REF_PROXY_H_ | 86 #endif // PPAPI_PROXY_PPB_FILE_REF_PROXY_H_ |
| OLD | NEW |