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

Side by Side Diff: native_client_sdk/src/libraries/nacl_io/kernel_proxy.h

Issue 304013002: [NaCl SDK] Create Filesystem nodes in /dev/fs/... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 6 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 LIBRARIES_NACL_IO_KERNEL_PROXY_H_ 5 #ifndef LIBRARIES_NACL_IO_KERNEL_PROXY_H_
6 #define LIBRARIES_NACL_IO_KERNEL_PROXY_H_ 6 #define LIBRARIES_NACL_IO_KERNEL_PROXY_H_
7 7
8 #include <map> 8 #include <map>
9 #include <string> 9 #include <string>
10 10
11 #include "nacl_io/devfs/dev_fs.h"
11 #include "nacl_io/event_emitter.h" 12 #include "nacl_io/event_emitter.h"
12 #include "nacl_io/fs_factory.h" 13 #include "nacl_io/fs_factory.h"
13 #include "nacl_io/host_resolver.h" 14 #include "nacl_io/host_resolver.h"
14 #include "nacl_io/kernel_object.h" 15 #include "nacl_io/kernel_object.h"
15 #include "nacl_io/nacl_io.h" 16 #include "nacl_io/nacl_io.h"
16 #include "nacl_io/ossignal.h" 17 #include "nacl_io/ossignal.h"
17 #include "nacl_io/ossocket.h" 18 #include "nacl_io/ossocket.h"
18 #include "nacl_io/ostypes.h" 19 #include "nacl_io/ostypes.h"
19 #include "nacl_io/osutime.h" 20 #include "nacl_io/osutime.h"
20 #include "nacl_io/stream/stream_fs.h" 21 #include "nacl_io/stream/stream_fs.h"
(...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after
199 int lvl, 200 int lvl,
200 int optname, 201 int optname,
201 const void* optval, 202 const void* optval,
202 socklen_t len); 203 socklen_t len);
203 virtual int shutdown(int fd, int how); 204 virtual int shutdown(int fd, int how);
204 virtual int socket(int domain, int type, int protocol); 205 virtual int socket(int domain, int type, int protocol);
205 virtual int socketpair(int domain, int type, int protocol, int* sv); 206 virtual int socketpair(int domain, int type, int protocol, int* sv);
206 #endif // PROVIDES_SOCKET_API 207 #endif // PROVIDES_SOCKET_API
207 208
208 protected: 209 protected:
210 Error MountInternal(const char* source,
211 const char* target,
212 const char* filesystemtype,
213 unsigned long mountflags,
214 const void* data,
215 bool create_fs_node,
216 ScopedFilesystem* out_filesystem);
217
218 Error CreateFsNode(const ScopedFilesystem& fs);
219
220 protected:
209 FsFactoryMap_t factories_; 221 FsFactoryMap_t factories_;
210 sdk_util::ScopedRef<StreamFs> stream_mount_; 222 sdk_util::ScopedRef<StreamFs> stream_fs_;
223 sdk_util::ScopedRef<DevFs> dev_fs_;
211 int dev_; 224 int dev_;
212 PepperInterface* ppapi_; 225 PepperInterface* ppapi_;
213 static KernelProxy *s_instance_; 226 static KernelProxy *s_instance_;
214 struct sigaction sigwinch_handler_; 227 struct sigaction sigwinch_handler_;
215 nacl_io_exit_handler_t exit_handler_; 228 nacl_io_exit_handler_t exit_handler_;
216 void* exit_handler_user_data_; 229 void* exit_handler_user_data_;
217 #ifdef PROVIDES_SOCKET_API 230 #ifdef PROVIDES_SOCKET_API
218 HostResolver host_resolver_; 231 HostResolver host_resolver_;
219 #endif 232 #endif
220 233
221 #ifdef PROVIDES_SOCKET_API 234 #ifdef PROVIDES_SOCKET_API
222 virtual int AcquireSocketHandle(int fd, ScopedKernelHandle* handle); 235 virtual int AcquireSocketHandle(int fd, ScopedKernelHandle* handle);
223 #endif 236 #endif
224 237
225 ScopedEventEmitter signal_emitter_; 238 ScopedEventEmitter signal_emitter_;
226 DISALLOW_COPY_AND_ASSIGN(KernelProxy); 239 DISALLOW_COPY_AND_ASSIGN(KernelProxy);
227 }; 240 };
228 241
229 } // namespace nacl_io 242 } // namespace nacl_io
230 243
231 #endif // LIBRARIES_NACL_IO_KERNEL_PROXY_H_ 244 #endif // LIBRARIES_NACL_IO_KERNEL_PROXY_H_
OLDNEW
« no previous file with comments | « native_client_sdk/src/libraries/nacl_io/kernel_object.cc ('k') | native_client_sdk/src/libraries/nacl_io/kernel_proxy.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698