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

Side by Side Diff: ppapi/proxy/directory_reader_resource.h

Issue 11958033: Implement Pepper proxy for PPB_DirectoryReader (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix DirectoryReader creation thunk (crbug/171539) Created 7 years, 11 months 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
OLDNEW
(Empty)
1 // Copyright (c) 2013 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 PPAPI_PROXY_DIRECTORY_READER_H_
yzshen1 2013/01/24 21:55:43 Please name it after the path exactly.
nhiroki 2013/01/25 12:27:17 Good eye, thanks!
6 #define PPAPI_PROXY_DIRECTORY_READER_H_
7
8 #include <queue>
9 #include <vector>
10
11 #include "ppapi/proxy/plugin_resource.h"
12 #include "ppapi/proxy/ppapi_proxy_export.h"
13 #include "ppapi/shared_impl/ppb_file_ref_shared.h"
14 #include "ppapi/shared_impl/tracked_callback.h"
15 #include "ppapi/thunk/ppb_directory_reader_api.h"
16
17 namespace ppapi {
18 namespace proxy {
19
20 class PPAPI_PROXY_EXPORT DirectoryReaderResource
21 : public PluginResource,
22 public NON_EXPORTED_BASE(thunk::PPB_DirectoryReader_API) {
23 public:
24 DirectoryReaderResource(Connection connection,
25 PP_Instance instance,
26 PP_Resource directory_ref);
27 virtual ~DirectoryReaderResource() {}
28
29 // Resource overrides.
30 virtual thunk::PPB_DirectoryReader_API* AsPPB_DirectoryReader_API() OVERRIDE;
yzshen1 2013/01/24 21:55:43 Please add include for OVERRIDE.
nhiroki 2013/01/25 12:27:17 Done.
31
32 // PPB_DirectoryReader_API.
33 virtual int32_t GetNextEntry(
34 PP_DirectoryEntry_Dev* entry,
35 scoped_refptr<TrackedCallback> callback) OVERRIDE;
36
37 private:
38 void OnPluginMsgGetNextEntryReply(
39 const ResourceMessageReplyParams& params,
40 const std::vector<ppapi::PPB_FileRef_CreateInfo> infos,
yzshen1 2013/01/24 21:55:43 Please use const &
nhiroki 2013/01/25 12:27:17 Done.
41 const std::vector<PP_FileType> file_types);
yzshen1 2013/01/24 21:55:43 ditto
nhiroki 2013/01/25 12:27:17 Done.
42 bool FillUpEntry();
43
44 PP_Resource directory_ref_;
yzshen1 2013/01/24 21:55:43 This might go away at any time because you don't h
nhiroki 2013/01/25 12:27:17 Added AddRefResource() and ReleaseResource().
45
46 PP_DirectoryEntry_Dev* entry_;
47 scoped_refptr<TrackedCallback> callback_;
48
49 std::queue<PP_DirectoryEntry_Dev> entries_;
50 bool has_more_;
51
52 DISALLOW_COPY_AND_ASSIGN(DirectoryReaderResource);
yzshen1 2013/01/24 21:55:43 Please add include.
nhiroki 2013/01/25 12:27:17 Done.
53 };
54
55 } // namespace proxy
56 } // namespace ppapi
57
58 #endif // PPAPI_PROXY_DIRECTORY_READER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698