OLD | NEW |
---|---|
1 // Copyright (c) 2011 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_SHARED_IMPL_FILE_PATH_H_ | 5 #ifndef PPAPI_SHARED_IMPL_FILE_PATH_H_ |
6 #define PPAPI_SHARED_IMPL_FILE_PATH_H_ | 6 #define PPAPI_SHARED_IMPL_FILE_PATH_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
yzshen1
2012/11/21 00:38:59
no need to have this.
raymes
2012/11/21 22:44:53
Done.
| |
9 | 9 |
10 #include "base/file_path.h" | 10 #include "base/file_path.h" |
11 #include "ppapi/shared_impl/ppapi_shared_export.h" | 11 #include "ppapi/shared_impl/ppapi_shared_export.h" |
12 | 12 |
13 namespace ppapi { | 13 namespace ppapi { |
14 | 14 |
15 // TODO(vtl): Once we put |::FilePath| into the |base| namespace, get rid of the | 15 // TODO(vtl): Once we put |::FilePath| into the |base| namespace, get rid of the |
16 // |Pepper| (or |PEPPER_|) prefixes. Right now, it's just too | 16 // |Pepper| (or |PEPPER_|) prefixes. Right now, it's just too |
17 // confusing/dangerous! | 17 // confusing/dangerous! |
18 | 18 |
19 class PPAPI_SHARED_EXPORT PepperFilePath { | 19 class PPAPI_SHARED_EXPORT PepperFilePath { |
20 public: | 20 public: |
21 enum Domain { | 21 enum Domain { |
22 DOMAIN_INVALID = 0, | 22 DOMAIN_INVALID = 0, |
23 DOMAIN_ABSOLUTE, | 23 DOMAIN_ABSOLUTE, |
24 DOMAIN_MODULE_LOCAL, | 24 DOMAIN_MODULE_LOCAL, |
25 | 25 |
26 // Used for validity-checking. | 26 // Used for validity-checking. |
27 DOMAIN_MAX_VALID = DOMAIN_MODULE_LOCAL | 27 DOMAIN_MAX_VALID = DOMAIN_MODULE_LOCAL |
28 }; | 28 }; |
29 | 29 |
30 PepperFilePath(); | 30 PepperFilePath(); |
31 PepperFilePath(Domain d, const FilePath& p); | 31 PepperFilePath(Domain d, const FilePath& p); |
32 | 32 |
33 static PepperFilePath MakeAbsolute(const FilePath& path); | |
34 static PepperFilePath MakeModuleLocal(const std::string& name, | |
35 const char* utf8_path); | |
36 | |
37 Domain domain() const { return domain_; } | 33 Domain domain() const { return domain_; } |
38 const FilePath& path() const { return path_; } | 34 const FilePath& path() const { return path_; } |
39 | 35 |
40 private: | 36 private: |
41 Domain domain_; | 37 Domain domain_; |
42 FilePath path_; | 38 FilePath path_; |
43 }; | 39 }; |
44 | 40 |
45 } // namespace ppapi | 41 } // namespace ppapi |
46 | 42 |
47 #endif // PPAPI_SHARED_IMPL_FILE_PATH_H_ | 43 #endif // PPAPI_SHARED_IMPL_FILE_PATH_H_ |
OLD | NEW |