Chromium Code Reviews

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

Issue 2822031: File API boilerplate. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 10 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff | | 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')
Property Changes:
Added: svn:eol-style
+ LF
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 "third_party/ppapi/c/ppb_file_ref.h"
11 #include "webkit/glue/plugins/pepper_resource.h"
12
13 namespace pepper {
14
15 class PluginModule;
16
17 class FileRef : public Resource {
18 public:
19 FileRef(PluginModule* module,
20 PP_FileSystemType file_system_type,
21 const std::string& validated_path,
22 const std::string& origin);
23 virtual ~FileRef();
24
25 // Returns a pointer to the interface implementing PPB_FileRef that is
26 // exposed to the plugin.
27 static const PPB_FileRef* GetInterface();
28
29 // Resource overrides.
30 FileRef* AsFileRef() { return this; }
31
32 // PPB_FileRef implementation.
33 std::string GetName() const;
34 scoped_refptr<FileRef> GetParent();
35
36 PP_FileSystemType file_system_type() const { return fs_type_; }
37 const std::string& path() const { return path_; }
38
39 private:
40 PP_FileSystemType fs_type_;
41 std::string path_; // UTF-8 encoded.
42 std::string origin_;
43 };
44
45 } // namespace pepper
46
47 #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