| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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_FILESYSTEM_H_ | 5 #ifndef LIBRARIES_NACL_IO_FILESYSTEM_H_ |
| 6 #define LIBRARIES_NACL_IO_FILESYSTEM_H_ | 6 #define LIBRARIES_NACL_IO_FILESYSTEM_H_ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| (...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 88 virtual Error Mkdir(const Path& path, int permissions) = 0; | 88 virtual Error Mkdir(const Path& path, int permissions) = 0; |
| 89 virtual Error Rmdir(const Path& path) = 0; | 89 virtual Error Rmdir(const Path& path) = 0; |
| 90 virtual Error Remove(const Path& path) = 0; | 90 virtual Error Remove(const Path& path) = 0; |
| 91 virtual Error Rename(const Path& path, const Path& newpath) = 0; | 91 virtual Error Rename(const Path& path, const Path& newpath) = 0; |
| 92 virtual Error Filesystem_VIoctl(int request, va_list args); | 92 virtual Error Filesystem_VIoctl(int request, va_list args); |
| 93 | 93 |
| 94 // Helper function that forwards to Filesystem_VIoctl. | 94 // Helper function that forwards to Filesystem_VIoctl. |
| 95 Error Filesystem_Ioctl(int request, ...); | 95 Error Filesystem_Ioctl(int request, ...); |
| 96 | 96 |
| 97 // Assumes that |node| is non-NULL. | 97 // Assumes that |node| is non-NULL. |
| 98 void OnNodeCreated(Node* node); | 98 virtual void OnNodeCreated(Node* node); |
| 99 | 99 |
| 100 // Assumes that |node| is non-NULL. | 100 // Assumes that |node| is non-NULL. |
| 101 void OnNodeDestroyed(Node* node); | 101 virtual void OnNodeDestroyed(Node* node); |
| 102 | 102 |
| 103 protected: | 103 protected: |
| 104 // Device number for the filesystem. | 104 // Device number for the filesystem. |
| 105 int dev_; | 105 int dev_; |
| 106 PepperInterface* ppapi_; // Weak reference. | 106 PepperInterface* ppapi_; // Weak reference. |
| 107 INodePool inode_pool_; | 107 INodePool inode_pool_; |
| 108 | 108 |
| 109 private: | 109 private: |
| 110 // May only be called by the KernelProxy when the Kernel's | 110 // May only be called by the KernelProxy when the Kernel's |
| 111 // lock is held, so we make it private. | 111 // lock is held, so we make it private. |
| 112 friend class KernelObject; | 112 friend class KernelObject; |
| 113 friend class KernelProxy; | 113 friend class KernelProxy; |
| 114 DISALLOW_COPY_AND_ASSIGN(Filesystem); | 114 DISALLOW_COPY_AND_ASSIGN(Filesystem); |
| 115 }; | 115 }; |
| 116 | 116 |
| 117 } // namespace nacl_io | 117 } // namespace nacl_io |
| 118 | 118 |
| 119 #endif // LIBRARIES_NACL_IO_FILESYSTEM_H_ | 119 #endif // LIBRARIES_NACL_IO_FILESYSTEM_H_ |
| OLD | NEW |