| 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/ppb_file_ref.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 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, |
| 25 const FilePath& external_file_path); |
| 24 virtual ~FileRef(); | 26 virtual ~FileRef(); |
| 25 | 27 |
| 26 // Returns a pointer to the interface implementing PPB_FileRef that is | 28 // Returns a pointer to the interface implementing PPB_FileRef that is |
| 27 // exposed to the plugin. | 29 // exposed to the plugin. |
| 28 static const PPB_FileRef* GetInterface(); | 30 static const PPB_FileRef* GetInterface(); |
| 29 | 31 |
| 30 // Resource overrides. | 32 // Resource overrides. |
| 31 FileRef* AsFileRef() { return this; } | 33 FileRef* AsFileRef() { return this; } |
| 32 | 34 |
| 33 // PPB_FileRef implementation. | 35 // PPB_FileRef implementation. |
| (...skipping 12 matching lines...) Expand all Loading... |
| 46 private: | 48 private: |
| 47 FilePath system_path_; | 49 FilePath system_path_; |
| 48 PP_FileSystemType fs_type_; | 50 PP_FileSystemType fs_type_; |
| 49 std::string path_; // UTF-8 encoded. | 51 std::string path_; // UTF-8 encoded. |
| 50 std::string origin_; | 52 std::string origin_; |
| 51 }; | 53 }; |
| 52 | 54 |
| 53 } // namespace pepper | 55 } // namespace pepper |
| 54 | 56 |
| 55 #endif // WEBKIT_GLUE_PLUGINS_PEPPER_FILE_REF_H_ | 57 #endif // WEBKIT_GLUE_PLUGINS_PEPPER_FILE_REF_H_ |
| OLD | NEW |