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

Side by Side Diff: ppapi/cpp/file_system.h

Issue 52233002: [PPAPI] Added VarResource_Dev class. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: FileSystem constructor sets resource to null if not a file system on Release build. Created 7 years, 1 month 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
« no previous file with comments | « ppapi/cpp/dev/var_resource_dev.cc ('k') | ppapi/cpp/file_system.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 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 15 matching lines...) Expand all
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 /// The copy constructor for <code>FileSystem</code>. 31 /// The copy constructor for <code>FileSystem</code>.
32 /// 32 ///
33 /// @param[in] other A reference to a <code>FileSystem</code>. 33 /// @param[in] other A reference to a <code>FileSystem</code>.
34 FileSystem(const FileSystem& other); 34 FileSystem(const FileSystem& other);
35 35
36 /// Constructs a <code>FileSystem</code> from a <code>Resource</code>.
37 ///
38 /// @param[in] resource A <code>Resource</code> containing a file system.
39 explicit FileSystem(Resource resource);
yzshen1 2013/11/01 00:14:41 const & ?
Matt Giuca 2013/11/01 02:06:22 Done.
40
36 /// A constructor used when you have received a PP_Resource as a return 41 /// A constructor used when you have received a PP_Resource as a return
37 /// value that has already been reference counted. 42 /// value that has already been reference counted.
38 /// 43 ///
39 /// @param[in] resource A PP_Resource corresponding to a PPB_FileSystem. 44 /// @param[in] resource A PP_Resource corresponding to a PPB_FileSystem.
40 FileSystem(PassRef, PP_Resource resource); 45 FileSystem(PassRef, PP_Resource resource);
41 46
42 /// This constructor creates a file system object of the given type. 47 /// This constructor creates a file system object of the given type.
43 /// 48 ///
44 /// @param[in] instance The instance with which this resource will be 49 /// @param[in] instance The instance with which this resource will be
45 /// associated. 50 /// associated.
(...skipping 10 matching lines...) Expand all
56 /// requestQuota from JavaScript: 61 /// requestQuota from JavaScript:
57 /// http://www.html5rocks.com/en/tutorials/file/filesystem/#toc-requesting-quo ta 62 /// http://www.html5rocks.com/en/tutorials/file/filesystem/#toc-requesting-quo ta
58 /// or set the unlimitedStorage permission for Chrome Web Store apps: 63 /// or set the unlimitedStorage permission for Chrome Web Store apps:
59 /// http://code.google.com/chrome/extensions/manifest.html#permissions 64 /// http://code.google.com/chrome/extensions/manifest.html#permissions
60 /// 65 ///
61 /// @param[in] cc A <code>PP_CompletionCallback</code> to be called upon 66 /// @param[in] cc A <code>PP_CompletionCallback</code> to be called upon
62 /// completion of Open(). 67 /// completion of Open().
63 /// 68 ///
64 /// @return An int32_t containing an error code from <code>pp_errors.h</code>. 69 /// @return An int32_t containing an error code from <code>pp_errors.h</code>.
65 int32_t Open(int64_t expected_size, const CompletionCallback& cc); 70 int32_t Open(int64_t expected_size, const CompletionCallback& cc);
71
72 /// Checks whether a <code>Resource</code> is a file system, to test whether
73 /// it is appropriate for use with the <code>FileSystem</code> constructor.
74 ///
75 /// @param[in] resource A <code>Resource</code> to test.
76 ///
77 /// @return True if <code>resource</code> is a file system.
78 static bool ResourceIsFileSystem(const Resource& resource);
yzshen1 2013/11/01 00:14:41 Maybe 'Resource' is not necessary in the method na
Matt Giuca 2013/11/01 02:06:22 Done.
66 }; 79 };
67 80
68 } // namespace pp 81 } // namespace pp
69 82
70 #endif // PPAPI_CPP_FILE_SYSTEM_H_ 83 #endif // PPAPI_CPP_FILE_SYSTEM_H_
OLDNEW
« no previous file with comments | « ppapi/cpp/dev/var_resource_dev.cc ('k') | ppapi/cpp/file_system.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698