Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(91)

Side by Side Diff: webkit/glue/plugins/pepper_file_ref.h

Issue 5828003: Move the Pepper implementation from webkit/glue/plugins/pepper_* to... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « webkit/glue/plugins/pepper_file_io.cc ('k') | webkit/glue/plugins/pepper_file_ref.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef WEBKIT_GLUE_PLUGINS_PEPPER_FILE_REF_H_
6 #define WEBKIT_GLUE_PLUGINS_PEPPER_FILE_REF_H_
7
8 #include <string>
9
10 #include "base/file_path.h"
11 #include "ppapi/c/dev/ppb_file_ref_dev.h"
12 #include "webkit/glue/plugins/pepper_resource.h"
13
14 namespace pepper {
15
16 class FileSystem;
17 class PluginInstance;
18 class PluginModule;
19
20 class FileRef : public Resource {
21 public:
22 FileRef();
23 FileRef(PluginModule* module,
24 scoped_refptr<FileSystem> file_system,
25 const std::string& validated_path);
26 FileRef(PluginModule* module,
27 const FilePath& external_file_path);
28 virtual ~FileRef();
29
30 // Returns a pointer to the interface implementing PPB_FileRef that is
31 // exposed to the plugin.
32 static const PPB_FileRef_Dev* GetInterface();
33
34 // Resource overrides.
35 virtual FileRef* AsFileRef();
36
37 // PPB_FileRef implementation.
38 std::string GetName() const;
39 scoped_refptr<FileRef> GetParent();
40
41 // Returns the file system to which this FileRef belongs.
42 scoped_refptr<FileSystem> GetFileSystem() const;
43
44 // Returns the type of the file system to which this FileRef belongs.
45 PP_FileSystemType_Dev GetFileSystemType() const;
46
47 // Returns the virtual path (i.e., the path that the pepper plugin sees)
48 // corresponding to this file.
49 std::string GetPath() const;
50
51 // Returns the system path corresponding to this file.
52 FilePath GetSystemPath() const;
53
54 private:
55 scoped_refptr<FileSystem> file_system_;
56 std::string virtual_path_; // UTF-8 encoded
57 FilePath system_path_;
58 };
59
60 } // namespace pepper
61
62 #endif // WEBKIT_GLUE_PLUGINS_PEPPER_FILE_REF_H_
OLDNEW
« no previous file with comments | « webkit/glue/plugins/pepper_file_io.cc ('k') | webkit/glue/plugins/pepper_file_ref.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698