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 10 matching lines...) Expand all Loading... |
21 class HostResource; | 21 class HostResource; |
22 struct PPBFileRef_CreateInfo; | 22 struct PPBFileRef_CreateInfo; |
23 | 23 |
24 class PPB_FileRef_Proxy : public InterfaceProxy { | 24 class PPB_FileRef_Proxy : public InterfaceProxy { |
25 public: | 25 public: |
26 PPB_FileRef_Proxy(Dispatcher* dispatcher, const void* target_interface); | 26 PPB_FileRef_Proxy(Dispatcher* dispatcher, const void* target_interface); |
27 virtual ~PPB_FileRef_Proxy(); | 27 virtual ~PPB_FileRef_Proxy(); |
28 | 28 |
29 static const Info* GetInfo(); | 29 static const Info* GetInfo(); |
30 | 30 |
31 static PP_Resource CreateProxyResource(PP_Resource file_system, | 31 const PPB_FileRef_Dev* ppb_file_ref_target() const { |
32 const char* path); | 32 return static_cast<const PPB_FileRef_Dev*>(target_interface()); |
| 33 } |
33 | 34 |
34 // InterfaceProxy implementation. | 35 // InterfaceProxy implementation. |
35 virtual bool OnMessageReceived(const IPC::Message& msg); | 36 virtual bool OnMessageReceived(const IPC::Message& msg); |
36 | 37 |
37 // Takes a resource in the host and converts it into a serialized file ref | 38 // Takes a resource in the host and converts it into a serialized file ref |
38 // "create info" for reconstitution in the plugin. This struct contains all | 39 // "create info" for reconstitution in the plugin. This struct contains all |
39 // the necessary information about the file ref. | 40 // the necessary information about the file ref. |
40 // | 41 // |
41 // This function is not static because it needs access to the particular | 42 // This function is not static because it needs access to the particular |
42 // dispatcher and host interface. | 43 // dispatcher and host interface. |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
76 const HostResource& new_file_ref, | 77 const HostResource& new_file_ref, |
77 uint32_t serialized_callback); | 78 uint32_t serialized_callback); |
78 | 79 |
79 DISALLOW_COPY_AND_ASSIGN(PPB_FileRef_Proxy); | 80 DISALLOW_COPY_AND_ASSIGN(PPB_FileRef_Proxy); |
80 }; | 81 }; |
81 | 82 |
82 } // namespace proxy | 83 } // namespace proxy |
83 } // namespace pp | 84 } // namespace pp |
84 | 85 |
85 #endif // PPAPI_PROXY_PPB_FILE_REF_PROXY_H_ | 86 #endif // PPAPI_PROXY_PPB_FILE_REF_PROXY_H_ |
OLD | NEW |