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" |
11 #include "third_party/ppapi/c/ppb_file_ref.h" | 11 #include "third_party/ppapi/c/dev/ppb_file_ref_dev.h" |
12 #include "webkit/glue/plugins/pepper_resource.h" | 12 #include "webkit/glue/plugins/pepper_resource.h" |
13 | 13 |
14 namespace pepper { | 14 namespace pepper { |
15 | 15 |
16 class PluginModule; | 16 class PluginModule; |
17 | 17 |
18 class FileRef : public Resource { | 18 class FileRef : public Resource { |
19 public: | 19 public: |
20 FileRef(PluginModule* module, | 20 FileRef(PluginModule* module, |
21 PP_FileSystemType file_system_type, | 21 PP_FileSystemType_Dev file_system_type, |
22 const std::string& validated_path, | 22 const std::string& validated_path, |
23 const std::string& origin); | 23 const std::string& origin); |
24 FileRef(PluginModule* module, | 24 FileRef(PluginModule* module, |
25 const FilePath& external_file_path); | 25 const FilePath& external_file_path); |
26 virtual ~FileRef(); | 26 virtual ~FileRef(); |
27 | 27 |
28 // Returns a pointer to the interface implementing PPB_FileRef that is | 28 // Returns a pointer to the interface implementing PPB_FileRef that is |
29 // exposed to the plugin. | 29 // exposed to the plugin. |
30 static const PPB_FileRef* GetInterface(); | 30 static const PPB_FileRef_Dev* GetInterface(); |
31 | 31 |
32 // Resource overrides. | 32 // Resource overrides. |
33 FileRef* AsFileRef() { return this; } | 33 FileRef* AsFileRef() { return this; } |
34 | 34 |
35 // PPB_FileRef implementation. | 35 // PPB_FileRef implementation. |
36 std::string GetName() const; | 36 std::string GetName() const; |
37 scoped_refptr<FileRef> GetParent(); | 37 scoped_refptr<FileRef> GetParent(); |
38 | 38 |
39 PP_FileSystemType file_system_type() const { return fs_type_; } | 39 PP_FileSystemType_Dev file_system_type() const { return fs_type_; } |
40 | 40 |
41 // Returns the virtual path (i.e., the path that the pepper plugin sees) | 41 // Returns the virtual path (i.e., the path that the pepper plugin sees) |
42 // corresponding to this file. | 42 // corresponding to this file. |
43 const std::string& path() const { return path_; } | 43 const std::string& path() const { return path_; } |
44 | 44 |
45 // Returns the system path corresponding to this file. | 45 // Returns the system path corresponding to this file. |
46 const FilePath& system_path() const { return system_path_; } | 46 const FilePath& system_path() const { return system_path_; } |
47 | 47 |
48 private: | 48 private: |
49 FilePath system_path_; | 49 FilePath system_path_; |
50 PP_FileSystemType fs_type_; | 50 PP_FileSystemType_Dev fs_type_; |
51 std::string path_; // UTF-8 encoded. | 51 std::string path_; // UTF-8 encoded. |
52 std::string origin_; | 52 std::string origin_; |
53 }; | 53 }; |
54 | 54 |
55 } // namespace pepper | 55 } // namespace pepper |
56 | 56 |
57 #endif // WEBKIT_GLUE_PLUGINS_PEPPER_FILE_REF_H_ | 57 #endif // WEBKIT_GLUE_PLUGINS_PEPPER_FILE_REF_H_ |
OLD | NEW |