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_PLUGINS_PPAPI_PPB_DIRECTORY_READER_IMPL_H_ | 5 #ifndef WEBKIT_PLUGINS_PPAPI_PPB_DIRECTORY_READER_IMPL_H_ |
6 #define WEBKIT_PLUGINS_PPAPI_PPB_DIRECTORY_READER_IMPL_H_ | 6 #define WEBKIT_PLUGINS_PPAPI_PPB_DIRECTORY_READER_IMPL_H_ |
7 | 7 |
8 #include <queue> | 8 #include <queue> |
9 | 9 |
10 #include "base/file_util_proxy.h" | 10 #include "base/file_util_proxy.h" |
(...skipping 11 matching lines...) Expand all Loading... |
22 | 22 |
23 class PPB_DirectoryReader_Impl | 23 class PPB_DirectoryReader_Impl |
24 : public Resource, | 24 : public Resource, |
25 public ::ppapi::thunk::PPB_DirectoryReader_API { | 25 public ::ppapi::thunk::PPB_DirectoryReader_API { |
26 public: | 26 public: |
27 explicit PPB_DirectoryReader_Impl(PPB_FileRef_Impl* directory_ref); | 27 explicit PPB_DirectoryReader_Impl(PPB_FileRef_Impl* directory_ref); |
28 virtual ~PPB_DirectoryReader_Impl(); | 28 virtual ~PPB_DirectoryReader_Impl(); |
29 | 29 |
30 static PP_Resource Create(PP_Resource directory_ref); | 30 static PP_Resource Create(PP_Resource directory_ref); |
31 | 31 |
32 // ResourceObjectBase overrides. | 32 // Resource overrides. |
33 virtual ::ppapi::thunk::PPB_DirectoryReader_API* AsPPB_DirectoryReader_API() | 33 virtual ::ppapi::thunk::PPB_DirectoryReader_API* AsPPB_DirectoryReader_API() |
34 OVERRIDE; | 34 OVERRIDE; |
35 | 35 |
36 // PPB_DirectoryReader_API implementation. | 36 // PPB_DirectoryReader_API implementation. |
37 virtual int32_t GetNextEntry(PP_DirectoryEntry_Dev* entry, | 37 virtual int32_t GetNextEntry(PP_DirectoryEntry_Dev* entry, |
38 PP_CompletionCallback callback) OVERRIDE; | 38 PP_CompletionCallback callback) OVERRIDE; |
39 | 39 |
40 void AddNewEntries(const std::vector<base::FileUtilProxy::Entry>& entries, | 40 void AddNewEntries(const std::vector<base::FileUtilProxy::Entry>& entries, |
41 bool has_more); | 41 bool has_more); |
42 | 42 |
43 private: | 43 private: |
44 bool FillUpEntry(); | 44 bool FillUpEntry(); |
45 | 45 |
46 scoped_refptr<PPB_FileRef_Impl> directory_ref_; | 46 scoped_refptr<PPB_FileRef_Impl> directory_ref_; |
47 std::queue<base::FileUtilProxy::Entry> entries_; | 47 std::queue<base::FileUtilProxy::Entry> entries_; |
48 bool has_more_; | 48 bool has_more_; |
49 PP_DirectoryEntry_Dev* entry_; | 49 PP_DirectoryEntry_Dev* entry_; |
50 }; | 50 }; |
51 | 51 |
52 } // namespace ppapi | 52 } // namespace ppapi |
53 } // namespace webkit | 53 } // namespace webkit |
54 | 54 |
55 #endif // WEBKIT_PLUGINS_PPAPI_PPB_DIRECTORY_READER_IMPL_H_ | 55 #endif // WEBKIT_PLUGINS_PPAPI_PPB_DIRECTORY_READER_IMPL_H_ |
OLD | NEW |