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_SYSTEM_H_ | 5 #ifndef WEBKIT_PLUGINS_PPAPI_PPB_FILE_SYSTEM_IMPL_H_ |
6 #define WEBKIT_GLUE_PLUGINS_PEPPER_FILE_SYSTEM_H_ | 6 #define WEBKIT_PLUGINS_PPAPI_PPB_FILE_SYSTEM_IMPL_H_ |
7 | 7 |
8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
9 #include "base/file_path.h" | 9 #include "base/file_path.h" |
10 #include "ppapi/c/dev/pp_file_info_dev.h" | 10 #include "ppapi/c/dev/pp_file_info_dev.h" |
11 #include "webkit/glue/plugins/pepper_resource.h" | 11 #include "webkit/plugins/ppapi/resource.h" |
12 | 12 |
13 struct PPB_FileSystem_Dev; | 13 struct PPB_FileSystem_Dev; |
14 | 14 |
15 namespace pepper { | 15 namespace webkit { |
| 16 namespace plugins { |
| 17 namespace ppapi { |
16 | 18 |
17 class PluginInstance; | 19 class PluginInstance; |
18 | 20 |
19 class FileSystem : public Resource { | 21 class PPB_FileSystem_Impl : public Resource { |
20 public: | 22 public: |
21 // Returns a pointer to the interface implementing PPB_FileSystem that is | 23 // Returns a pointer to the interface implementing PPB_FileSystem that is |
22 // exposed to the plugin. | 24 // exposed to the plugin. |
23 static const PPB_FileSystem_Dev* GetInterface(); | 25 static const PPB_FileSystem_Dev* GetInterface(); |
24 | 26 |
25 FileSystem(PluginInstance* instance, PP_FileSystemType_Dev type); | 27 PPB_FileSystem_Impl(PluginInstance* instance, PP_FileSystemType_Dev type); |
26 virtual FileSystem* AsFileSystem(); | 28 virtual PPB_FileSystem_Impl* AsFileSystem(); |
27 | 29 |
28 PluginInstance* instance() { return instance_; } | 30 PluginInstance* instance() { return instance_; } |
29 PP_FileSystemType_Dev type() { return type_; } | 31 PP_FileSystemType_Dev type() { return type_; } |
30 const FilePath& root_path() const { return root_path_; } | 32 const FilePath& root_path() const { return root_path_; } |
31 void set_root_path(const FilePath& root_path) { root_path_ = root_path; } | 33 void set_root_path(const FilePath& root_path) { root_path_ = root_path; } |
32 bool opened() const { return opened_; } | 34 bool opened() const { return opened_; } |
33 void set_opened(bool opened) { opened_ = opened; } | 35 void set_opened(bool opened) { opened_ = opened; } |
34 | 36 |
35 private: | 37 private: |
36 PluginInstance* instance_; | 38 PluginInstance* instance_; |
37 PP_FileSystemType_Dev type_; | 39 PP_FileSystemType_Dev type_; |
38 FilePath root_path_; | 40 FilePath root_path_; |
39 bool opened_; | 41 bool opened_; |
| 42 |
| 43 DISALLOW_COPY_AND_ASSIGN(PPB_FileSystem_Impl); |
40 }; | 44 }; |
41 | 45 |
42 } // namespace pepper | 46 } // namespace ppapi |
| 47 } // namespace plugins |
| 48 } // namespace webkit |
43 | 49 |
44 #endif // WEBKIT_GLUE_PLUGINS_PEPPER_FILE_SYSTEM_H_ | 50 #endif // WEBKIT_PLUGINS_PPAPI_PPB_FILE_SYSTEM_IMPL_H_ |
OLD | NEW |