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

Side by Side Diff: content/renderer/pepper/pepper_directory_reader_host.h

Issue 11958033: Implement Pepper proxy for PPB_DirectoryReader (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix 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 CONTENT_RENDERER_PEPPER_PEPPER_DIRECTORY_READER_HOST_H_
6 #define CONTENT_RENDERER_PEPPER_PEPPER_DIRECTORY_READER_HOST_H_
7
8 #include <vector>
9
10 #include "base/basictypes.h"
11 #include "content/common/content_export.h"
12 #include "ipc/ipc_message.h"
13 #include "ppapi/host/host_message_context.h"
14 #include "ppapi/host/resource_host.h"
15 #include "ppapi/proxy/enter_proxy.h"
16 #include "ppapi/proxy/resource_message_params.h"
17 #include "ppapi/shared_impl/ppb_file_ref_shared.h"
18 #include "ppapi/thunk/resource_creation_api.h"
19 #include "webkit/plugins/ppapi/ppb_directory_reader_impl.h"
20
21 namespace content {
22
23 class RendererPpapiHost;
24
25 class CONTENT_EXPORT PepperDirectoryReaderHost
26 : public ppapi::host::ResourceHost,
27 public base::SupportsWeakPtr<PepperDirectoryReaderHost> {
28 public:
29 PepperDirectoryReaderHost(RendererPpapiHost* host,
30 PP_Instance instance,
31 PP_Resource resource);
32 virtual ~PepperDirectoryReaderHost();
33
34 virtual int32_t OnResourceMessageReceived(
35 const IPC::Message& msg,
36 ppapi::host::HostMessageContext* context) OVERRIDE;
37
38 private:
39 static void OnGetNextEntryCallback(void* data, int32_t result);
40 int32_t OnGetNextEntry(ppapi::host::HostMessageContext* host_context,
41 ppapi::HostResource resource);
42 int32_t GetNextEntry();
43 void SendGetNextEntryReply(int32_t result);
44 void PushEntry(const PP_DirectoryEntry_Dev& entry);
45
46 PP_Instance instance_;
47 PP_DirectoryEntry_Dev entry_;
48 ppapi::HostResource host_resource_;
49
50 PP_Resource directory_reader_;
51
52 ppapi::host::ReplyMessageContext reply_context_;
53 std::vector<ppapi::PPB_FileRef_CreateInfo> host_resources_;
54 std::vector<PP_FileType> file_types_;
55
56 DISALLOW_COPY_AND_ASSIGN(PepperDirectoryReaderHost);
57 };
58
59 }
60
61 #endif // CONTENT_RENDERER_PEPPER_PEPPER_DIRECTORY_READER_HOST_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698