OLD | NEW |
| (Empty) |
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 | |
3 * found in the LICENSE file. | |
4 */ | |
5 #ifndef LIBRARIES_NACL_MOUNTS_MOUNT_HTML5FS_H_ | |
6 #define LIBRARIES_NACL_MOUNTS_MOUNT_HTML5FS_H_ | |
7 | |
8 #include <pthread.h> | |
9 #include "nacl_mounts/mount.h" | |
10 #include "nacl_mounts/pepper_interface.h" | |
11 | |
12 class MountNode; | |
13 | |
14 class MountHtml5Fs: public Mount { | |
15 public: | |
16 virtual MountNode *Open(const Path& path, int mode); | |
17 virtual int Unlink(const Path& path); | |
18 virtual int Mkdir(const Path& path, int permissions); | |
19 virtual int Rmdir(const Path& path); | |
20 virtual int Remove(const Path& path); | |
21 | |
22 PP_Resource filesystem_resource() { return filesystem_resource_; } | |
23 | |
24 protected: | |
25 MountHtml5Fs(); | |
26 | |
27 virtual bool Init(int dev, StringMap_t& args, PepperInterface* ppapi); | |
28 virtual void Destroy(); | |
29 | |
30 bool IsFilesystemOpen(); | |
31 | |
32 private: | |
33 static void FilesystemOpenCallbackThunk(void* user_data, int32_t result); | |
34 void FilesystemOpenCallback(int32_t result); | |
35 | |
36 PP_Resource filesystem_resource_; | |
37 bool filesystem_open_; // protected by lock_. | |
38 | |
39 friend class Mount; | |
40 }; | |
41 | |
42 #endif // LIBRARIES_NACL_MOUNTS_MOUNT_HTML5FS_H_ | |
OLD | NEW |