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

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

Issue 7210027: Part I of many. Moving FileIO, FileRef, and FileSystem out of Dev. For now, just copying over s... (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: '' Created 9 years, 6 months 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 | Annotate | Revision Log
« no previous file with comments | « ppapi/cpp/file_io.cc ('k') | ppapi/cpp/file_ref.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) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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_DEV_FILE_REF_DEV_H_ 5 #ifndef PPAPI_CPP_FILE_REF_H_
6 #define PPAPI_CPP_DEV_FILE_REF_DEV_H_ 6 #define PPAPI_CPP_FILE_REF_H_
7 7
8 #include "ppapi/c/dev/ppb_file_ref_dev.h"
9 #include "ppapi/c/pp_stdint.h" 8 #include "ppapi/c/pp_stdint.h"
9 #include "ppapi/c/ppb_file_ref.h"
10 #include "ppapi/cpp/resource.h" 10 #include "ppapi/cpp/resource.h"
11 #include "ppapi/cpp/var.h" 11 #include "ppapi/cpp/var.h"
12 12
13 namespace pp { 13 namespace pp {
14 14
15 class CompletionCallback; 15 class CompletionCallback;
16 class FileSystem_Dev; 16 class FileSystem;
17 17
18 class FileRef_Dev : public Resource { 18 class FileRef: public Resource {
19 public: 19 public:
20 // Creates an is_null() FileRef object. 20 // Creates an is_null() FileRef object.
21 FileRef_Dev() {} 21 FileRef() {}
22 22
23 // This constructor is used when we've gotten a PP_Resource as a return value 23 // This constructor is used when we've gotten a PP_Resource as a return value
24 // that we need to addref. 24 // that we need to addref.
25 explicit FileRef_Dev(PP_Resource resource); 25 explicit FileRef(PP_Resource resource);
26 26
27 // This constructor is used when we've gotten a PP_Resource as a return value 27 // This constructor is used when we've gotten a PP_Resource as a return value
28 // that has already been addref'ed for us. 28 // that has already been addref'ed for us.
29 struct PassRef {}; 29 struct PassRef {};
30 FileRef_Dev(PassRef, PP_Resource resource); 30 FileRef(PassRef, PP_Resource resource);
31 31
32 // Creates a FileRef pointing to a path in the given filesystem. 32 // Creates a FileRef pointing to a path in the given filesystem.
33 FileRef_Dev(const FileSystem_Dev& file_system, const char* path); 33 FileRef(const FileSystem& file_system, const char* path);
34 34
35 FileRef_Dev(const FileRef_Dev& other); 35 FileRef(const FileRef& other);
36 36
37 // Returns the file system type. 37 // Returns the file system type.
38 PP_FileSystemType_Dev GetFileSystemType() const; 38 PP_FileSystemType GetFileSystemType() const;
39 39
40 // Returns the name of the file. 40 // Returns the name of the file.
41 Var GetName() const; 41 Var GetName() const;
42 42
43 // Returns the absolute path of the file. See PPB_FileRef::GetPath for more 43 // Returns the absolute path of the file. See PPB_FileRef::GetPath for more
44 // details. 44 // details.
45 Var GetPath() const; 45 Var GetPath() const;
46 46
47 // Returns the parent directory of this file. See PPB_FileRef::GetParent for 47 // Returns the parent directory of this file. See PPB_FileRef::GetParent for
48 // more details. 48 // more details.
49 FileRef_Dev GetParent() const; 49 FileRef GetParent() const;
50 50
51 int32_t MakeDirectory(const CompletionCallback& cc); 51 int32_t MakeDirectory(const CompletionCallback& cc);
52 52
53 int32_t MakeDirectoryIncludingAncestors(const CompletionCallback& cc); 53 int32_t MakeDirectoryIncludingAncestors(const CompletionCallback& cc);
54 54
55 int32_t Touch(PP_Time last_access_time, 55 int32_t Touch(PP_Time last_access_time,
56 PP_Time last_modified_time, 56 PP_Time last_modified_time,
57 const CompletionCallback& cc); 57 const CompletionCallback& cc);
58 58
59 int32_t Delete(const CompletionCallback& cc); 59 int32_t Delete(const CompletionCallback& cc);
60 60
61 int32_t Rename(const FileRef_Dev& new_file_ref, const CompletionCallback& cc); 61 int32_t Rename(const FileRef& new_file_ref, const CompletionCallback& cc);
62 }; 62 };
63 63
64 } // namespace pp 64 } // namespace pp
65 65
66 #endif // PPAPI_CPP_FILE_REF_H_ 66 #endif // PPAPI_CPP_FILE_REF_H_
OLDNEW
« no previous file with comments | « ppapi/cpp/file_io.cc ('k') | ppapi/cpp/file_ref.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698