| OLD | NEW |
| (Empty) |
| 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 | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #ifndef WEBKIT_PLUGINS_PPAPI_FILE_PATH_H_ | |
| 6 #define WEBKIT_PLUGINS_PPAPI_FILE_PATH_H_ | |
| 7 | |
| 8 #include <string> | |
| 9 | |
| 10 #include "base/file_path.h" | |
| 11 #include "webkit/plugins/webkit_plugins_export.h" | |
| 12 | |
| 13 namespace webkit { | |
| 14 namespace ppapi { | |
| 15 | |
| 16 class PluginModule; | |
| 17 | |
| 18 // TODO(vtl): Once we put |::FilePath| into the |base| namespace, get rid of the | |
| 19 // |Pepper| (or |PEPPER_|) prefixes. Right now, it's just too | |
| 20 // confusing/dangerous! | |
| 21 | |
| 22 class PepperFilePath { | |
| 23 public: | |
| 24 enum Domain { | |
| 25 DOMAIN_INVALID = 0, | |
| 26 DOMAIN_ABSOLUTE, | |
| 27 DOMAIN_MODULE_LOCAL, | |
| 28 | |
| 29 // Used for validity-checking. | |
| 30 DOMAIN_MAX_VALID = DOMAIN_MODULE_LOCAL | |
| 31 }; | |
| 32 | |
| 33 WEBKIT_PLUGINS_EXPORT PepperFilePath(); | |
| 34 WEBKIT_PLUGINS_EXPORT PepperFilePath(Domain d, const FilePath& p); | |
| 35 | |
| 36 static PepperFilePath MakeAbsolute(const FilePath& path); | |
| 37 static PepperFilePath MakeModuleLocal(PluginModule* module, | |
| 38 const char* utf8_path); | |
| 39 | |
| 40 Domain domain() const { return domain_; } | |
| 41 const FilePath& path() const { return path_; } | |
| 42 | |
| 43 private: | |
| 44 Domain domain_; | |
| 45 FilePath path_; | |
| 46 }; | |
| 47 | |
| 48 } // namespace ppapi | |
| 49 } // namespace webkit | |
| 50 | |
| 51 #endif // WEBKIT_PLUGINS_PPAPI_FILE_PATH_H_ | |
| OLD | NEW |