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

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

Issue 13726024: Refactor FileSystem (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 7 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
OLDNEW
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 15 matching lines...) Expand all
26 namespace proxy { 26 namespace proxy {
27 27
28 class SerializedVarReturnValue; 28 class SerializedVarReturnValue;
29 29
30 class PPAPI_PROXY_EXPORT PPB_FileRef_Proxy 30 class PPAPI_PROXY_EXPORT PPB_FileRef_Proxy
31 : public NON_EXPORTED_BASE(InterfaceProxy) { 31 : public NON_EXPORTED_BASE(InterfaceProxy) {
32 public: 32 public:
33 explicit PPB_FileRef_Proxy(Dispatcher* dispatcher); 33 explicit PPB_FileRef_Proxy(Dispatcher* dispatcher);
34 virtual ~PPB_FileRef_Proxy(); 34 virtual ~PPB_FileRef_Proxy();
35 35
36 static PP_Resource CreateProxyResource(PP_Resource file_system, 36 static PP_Resource CreateProxyResource(PP_Instance instance,
37 PP_Resource file_system,
37 const char* path); 38 const char* path);
38 static PP_Resource CreateProxyResource( 39 static PP_Resource CreateProxyResource(
39 const PPB_FileRef_CreateInfo& serialized); 40 const PPB_FileRef_CreateInfo& serialized);
40 41
41 // InterfaceProxy implementation. 42 // InterfaceProxy implementation.
42 virtual bool OnMessageReceived(const IPC::Message& msg); 43 virtual bool OnMessageReceived(const IPC::Message& msg);
43 44
44 // Takes a resource in the host and converts it into a serialized file ref 45 // Takes a resource in the host and converts it into a serialized file ref
45 // "create info" for reconstitution in the plugin. This struct contains all 46 // "create info" for reconstitution in the plugin. This struct contains all
46 // the necessary information about the file ref. 47 // the necessary information about the file ref.
(...skipping 10 matching lines...) Expand all
57 // 58 //
58 // Various PPAPI functions return file refs from various interfaces, so this 59 // Various PPAPI functions return file refs from various interfaces, so this
59 // function is public so anybody can receive a file ref. 60 // function is public so anybody can receive a file ref.
60 static PP_Resource DeserializeFileRef( 61 static PP_Resource DeserializeFileRef(
61 const PPB_FileRef_CreateInfo& serialized); 62 const PPB_FileRef_CreateInfo& serialized);
62 63
63 static const ApiID kApiID = API_ID_PPB_FILE_REF; 64 static const ApiID kApiID = API_ID_PPB_FILE_REF;
64 65
65 private: 66 private:
66 // Plugin -> host message handlers. 67 // Plugin -> host message handlers.
67 void OnMsgCreate(const HostResource& file_system, 68 void OnMsgCreate(PP_Instance instance,
69 PP_Resource file_system,
68 const std::string& path, 70 const std::string& path,
69 PPB_FileRef_CreateInfo* result); 71 PPB_FileRef_CreateInfo* result);
70 void OnMsgGetParent(const HostResource& host_resource, 72 void OnMsgGetParent(const HostResource& host_resource,
71 PPB_FileRef_CreateInfo* result); 73 PPB_FileRef_CreateInfo* result);
72 void OnMsgMakeDirectory(const HostResource& host_resource, 74 void OnMsgMakeDirectory(const HostResource& host_resource,
73 PP_Bool make_ancestors, 75 PP_Bool make_ancestors,
74 uint32_t callback_id); 76 uint32_t callback_id);
75 void OnMsgTouch(const HostResource& host_resource, 77 void OnMsgTouch(const HostResource& host_resource,
76 PP_Time last_access, 78 PP_Time last_access,
77 PP_Time last_modified, 79 PP_Time last_modified,
(...skipping 28 matching lines...) Expand all
106 108
107 ProxyCompletionCallbackFactory<PPB_FileRef_Proxy> callback_factory_; 109 ProxyCompletionCallbackFactory<PPB_FileRef_Proxy> callback_factory_;
108 110
109 DISALLOW_COPY_AND_ASSIGN(PPB_FileRef_Proxy); 111 DISALLOW_COPY_AND_ASSIGN(PPB_FileRef_Proxy);
110 }; 112 };
111 113
112 } // namespace proxy 114 } // namespace proxy
113 } // namespace ppapi 115 } // namespace ppapi
114 116
115 #endif // PPAPI_PROXY_PPB_FILE_REF_PROXY_H_ 117 #endif // PPAPI_PROXY_PPB_FILE_REF_PROXY_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698