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_DIRECTORY_READER_H_ | 5 #ifndef WEBKIT_GLUE_PLUGINS_PEPPER_DIRECTORY_READER_H_ |
6 #define WEBKIT_GLUE_PLUGINS_PEPPER_DIRECTORY_READER_H_ | 6 #define WEBKIT_GLUE_PLUGINS_PEPPER_DIRECTORY_READER_H_ |
7 | 7 |
8 #include "third_party/ppapi/c/ppb_directory_reader.h" | |
9 #include "webkit/glue/plugins/pepper_resource.h" | 8 #include "webkit/glue/plugins/pepper_resource.h" |
10 | 9 |
| 10 struct PP_CompletionCallback; |
| 11 struct PP_DirectoryEntry_Dev; |
| 12 struct PPB_DirectoryReader_Dev; |
| 13 |
11 namespace pepper { | 14 namespace pepper { |
12 | 15 |
13 class FileRef; | 16 class FileRef; |
14 | 17 |
15 class DirectoryReader : public Resource { | 18 class DirectoryReader : public Resource { |
16 public: | 19 public: |
17 explicit DirectoryReader(FileRef* directory_ref); | 20 explicit DirectoryReader(FileRef* directory_ref); |
18 virtual ~DirectoryReader(); | 21 virtual ~DirectoryReader(); |
19 | 22 |
20 // Returns a pointer to the interface implementing PPB_DirectoryReader that | 23 // Returns a pointer to the interface implementing PPB_DirectoryReader that |
21 // is exposed to the plugin. | 24 // is exposed to the plugin. |
22 static const PPB_DirectoryReader* GetInterface(); | 25 static const PPB_DirectoryReader_Dev* GetInterface(); |
23 | 26 |
24 // Resource overrides. | 27 // Resource overrides. |
25 DirectoryReader* AsDirectoryReader() { return this; } | 28 DirectoryReader* AsDirectoryReader() { return this; } |
26 | 29 |
27 // PPB_DirectoryReader implementation. | 30 // PPB_DirectoryReader implementation. |
28 int32_t GetNextEntry(PP_DirectoryEntry* entry, | 31 int32_t GetNextEntry(PP_DirectoryEntry_Dev* entry, |
29 PP_CompletionCallback callback); | 32 PP_CompletionCallback callback); |
30 | 33 |
31 private: | 34 private: |
32 scoped_refptr<FileRef> directory_ref_; | 35 scoped_refptr<FileRef> directory_ref_; |
33 }; | 36 }; |
34 | 37 |
35 } // namespace pepper | 38 } // namespace pepper |
36 | 39 |
37 #endif // WEBKIT_GLUE_PLUGINS_PEPPER_DIRECTORY_READER_H_ | 40 #endif // WEBKIT_GLUE_PLUGINS_PEPPER_DIRECTORY_READER_H_ |
OLD | NEW |