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 PPAPI_CPP_FILE_SYSTEM_H_ | 5 #ifndef PPAPI_CPP_FILE_SYSTEM_H_ |
6 #define PPAPI_CPP_FILE_SYSTEM_H_ | 6 #define PPAPI_CPP_FILE_SYSTEM_H_ |
7 | 7 |
8 #include "ppapi/c/pp_file_info.h" | 8 #include "ppapi/c/pp_file_info.h" |
9 #include "ppapi/c/pp_instance.h" | 9 #include "ppapi/c/pp_instance.h" |
10 #include "ppapi/c/pp_stdint.h" | 10 #include "ppapi/c/pp_stdint.h" |
(...skipping 10 matching lines...) Expand all Loading... | |
21 | 21 |
22 /// The <code>FileSystem</code> class identifies the file system type | 22 /// The <code>FileSystem</code> class identifies the file system type |
23 /// associated with a file. | 23 /// associated with a file. |
24 class FileSystem : public Resource { | 24 class FileSystem : public Resource { |
25 public: | 25 public: |
26 /// Constructs an is_null() filesystem resource. If you use this constructor, | 26 /// Constructs an is_null() filesystem resource. If you use this constructor, |
27 /// you will have to assign it to a "real" FileSystem object before you can | 27 /// you will have to assign it to a "real" FileSystem object before you can |
28 /// use it. | 28 /// use it. |
29 FileSystem(); | 29 FileSystem(); |
30 | 30 |
31 FileSystem(PassRef, PP_Resource resource); | |
yzshen1
2013/05/02 23:22:01
Add comments such as:
/// A constructor used when
victorhsieh
2013/05/03 17:26:58
Done.
| |
32 | |
31 /// This constructor creates a file system object of the given type. | 33 /// This constructor creates a file system object of the given type. |
32 /// | 34 /// |
33 /// @param[in] instance The instance with which this resource will be | 35 /// @param[in] instance The instance with which this resource will be |
34 /// associated. | 36 /// associated. |
35 /// | 37 /// |
36 /// @param[in] type A file system type as defined by | 38 /// @param[in] type A file system type as defined by |
37 /// <code>PP_FileSystemType</code> enum. | 39 /// <code>PP_FileSystemType</code> enum. |
38 FileSystem(const InstanceHandle& instance, PP_FileSystemType type); | 40 FileSystem(const InstanceHandle& instance, PP_FileSystemType type); |
39 | 41 |
40 /// Open() opens the file system. A file system must be opened before running | 42 /// Open() opens the file system. A file system must be opened before running |
41 /// any other operation on it. | 43 /// any other operation on it. |
42 /// | 44 /// |
43 /// @param[in] expected_size The expected size of the file system. Note that | 45 /// @param[in] expected_size The expected size of the file system. Note that |
44 /// this does not request quota; to do that, you must either invoke | 46 /// this does not request quota; to do that, you must either invoke |
45 /// requestQuota from JavaScript: | 47 /// requestQuota from JavaScript: |
46 /// http://www.html5rocks.com/en/tutorials/file/filesystem/#toc-requesting-quo ta | 48 /// http://www.html5rocks.com/en/tutorials/file/filesystem/#toc-requesting-quo ta |
47 /// or set the unlimitedStorage permission for Chrome Web Store apps: | 49 /// or set the unlimitedStorage permission for Chrome Web Store apps: |
48 /// http://code.google.com/chrome/extensions/manifest.html#permissions | 50 /// http://code.google.com/chrome/extensions/manifest.html#permissions |
49 /// | 51 /// |
50 /// @param[in] cc A <code>PP_CompletionCallback</code> to be called upon | 52 /// @param[in] cc A <code>PP_CompletionCallback</code> to be called upon |
51 /// completion of Open(). | 53 /// completion of Open(). |
52 /// | 54 /// |
53 /// @return An int32_t containing an error code from <code>pp_errors.h</code>. | 55 /// @return An int32_t containing an error code from <code>pp_errors.h</code>. |
54 int32_t Open(int64_t expected_size, const CompletionCallback& cc); | 56 int32_t Open(int64_t expected_size, const CompletionCallback& cc); |
55 }; | 57 }; |
56 | 58 |
57 } // namespace pp | 59 } // namespace pp |
58 | 60 |
59 #endif // PPAPI_CPP_FILE_SYSTEM_H_ | 61 #endif // PPAPI_CPP_FILE_SYSTEM_H_ |
OLD | NEW |