OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 WEBKIT_GLUE_PLUGINS_PEPPER_FILE_REF_H_ | 5 #ifndef WEBKIT_GLUE_PLUGINS_PEPPER_FILE_REF_H_ |
6 #define WEBKIT_GLUE_PLUGINS_PEPPER_FILE_REF_H_ | 6 #define WEBKIT_GLUE_PLUGINS_PEPPER_FILE_REF_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/file_path.h" | 10 #include "base/file_path.h" |
(...skipping 14 matching lines...) Expand all Loading... |
25 const std::string& validated_path); | 25 const std::string& validated_path); |
26 FileRef(PluginModule* module, | 26 FileRef(PluginModule* module, |
27 const FilePath& external_file_path); | 27 const FilePath& external_file_path); |
28 virtual ~FileRef(); | 28 virtual ~FileRef(); |
29 | 29 |
30 // Returns a pointer to the interface implementing PPB_FileRef that is | 30 // Returns a pointer to the interface implementing PPB_FileRef that is |
31 // exposed to the plugin. | 31 // exposed to the plugin. |
32 static const PPB_FileRef_Dev* GetInterface(); | 32 static const PPB_FileRef_Dev* GetInterface(); |
33 | 33 |
34 // Resource overrides. | 34 // Resource overrides. |
35 FileRef* AsFileRef() { return this; } | 35 virtual FileRef* AsFileRef(); |
36 | 36 |
37 // PPB_FileRef implementation. | 37 // PPB_FileRef implementation. |
38 std::string GetName() const; | 38 std::string GetName() const; |
39 scoped_refptr<FileRef> GetParent(); | 39 scoped_refptr<FileRef> GetParent(); |
40 | 40 |
41 // Returns the file system to which this FileRef belongs. | 41 // Returns the file system to which this FileRef belongs. |
42 scoped_refptr<FileSystem> GetFileSystem() const; | 42 scoped_refptr<FileSystem> GetFileSystem() const; |
43 | 43 |
44 // Returns the type of the file system to which this FileRef belongs. | 44 // Returns the type of the file system to which this FileRef belongs. |
45 PP_FileSystemType_Dev GetFileSystemType() const; | 45 PP_FileSystemType_Dev GetFileSystemType() const; |
46 | 46 |
47 // Returns the virtual path (i.e., the path that the pepper plugin sees) | 47 // Returns the virtual path (i.e., the path that the pepper plugin sees) |
48 // corresponding to this file. | 48 // corresponding to this file. |
49 std::string GetPath() const; | 49 std::string GetPath() const; |
50 | 50 |
51 // Returns the system path corresponding to this file. | 51 // Returns the system path corresponding to this file. |
52 FilePath GetSystemPath() const; | 52 FilePath GetSystemPath() const; |
53 | 53 |
54 private: | 54 private: |
55 scoped_refptr<FileSystem> file_system_; | 55 scoped_refptr<FileSystem> file_system_; |
56 std::string virtual_path_; // UTF-8 encoded | 56 std::string virtual_path_; // UTF-8 encoded |
57 FilePath system_path_; | 57 FilePath system_path_; |
58 }; | 58 }; |
59 | 59 |
60 } // namespace pepper | 60 } // namespace pepper |
61 | 61 |
62 #endif // WEBKIT_GLUE_PLUGINS_PEPPER_FILE_REF_H_ | 62 #endif // WEBKIT_GLUE_PLUGINS_PEPPER_FILE_REF_H_ |
OLD | NEW |