OLD | NEW |
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 |
(...skipping 30 matching lines...) Expand all Loading... |
41 // other classes should return Error (as defined by nacl_io/error.h). | 41 // other classes should return Error (as defined by nacl_io/error.h). |
42 class KernelProxy : protected KernelObject { | 42 class KernelProxy : protected KernelObject { |
43 public: | 43 public: |
44 typedef std::map<std::string, MountFactory*> MountFactoryMap_t; | 44 typedef std::map<std::string, MountFactory*> MountFactoryMap_t; |
45 | 45 |
46 KernelProxy(); | 46 KernelProxy(); |
47 virtual ~KernelProxy(); | 47 virtual ~KernelProxy(); |
48 | 48 |
49 // Takes ownership of |ppapi|. | 49 // Takes ownership of |ppapi|. |
50 // |ppapi| may be NULL. If so, no mount that uses pepper calls can be mounted. | 50 // |ppapi| may be NULL. If so, no mount that uses pepper calls can be mounted. |
51 virtual void Init(PepperInterface* ppapi); | 51 virtual Error Init(PepperInterface* ppapi); |
52 | 52 |
53 // NaCl-only function to read resources specified in the NMF file. | 53 // NaCl-only function to read resources specified in the NMF file. |
54 virtual int open_resource(const char* file); | 54 virtual int open_resource(const char* file); |
55 | 55 |
56 // KernelHandle and FD allocation and manipulation functions. | 56 // KernelHandle and FD allocation and manipulation functions. |
57 virtual int open(const char* path, int oflag); | 57 virtual int open(const char* path, int oflag); |
58 virtual int close(int fd); | 58 virtual int close(int fd); |
59 virtual int dup(int fd); | 59 virtual int dup(int fd); |
60 virtual int dup2(int fd, int newfd); | 60 virtual int dup2(int fd, int newfd); |
61 | 61 |
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
195 virtual int AcquireSocketHandle(int fd, ScopedKernelHandle* handle); | 195 virtual int AcquireSocketHandle(int fd, ScopedKernelHandle* handle); |
196 #endif | 196 #endif |
197 | 197 |
198 ScopedSignalEmitter signal_emitter_; | 198 ScopedSignalEmitter signal_emitter_; |
199 DISALLOW_COPY_AND_ASSIGN(KernelProxy); | 199 DISALLOW_COPY_AND_ASSIGN(KernelProxy); |
200 }; | 200 }; |
201 | 201 |
202 } // namespace nacl_io | 202 } // namespace nacl_io |
203 | 203 |
204 #endif // LIBRARIES_NACL_IO_KERNEL_PROXY_H_ | 204 #endif // LIBRARIES_NACL_IO_KERNEL_PROXY_H_ |
OLD | NEW |