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