OLD | NEW |
---|---|
(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" | |
yzshen1
2013/01/24 21:55:43
This can be moved to the .cc file. (And some other
nhiroki
2013/01/25 12:27:17
Done.
| |
16 #include "ppapi/proxy/resource_message_params.h" | |
17 #include "ppapi/shared_impl/ppb_file_ref_shared.h" | |
yzshen1
2013/01/24 21:55:43
Could you please forward declare things like this
nhiroki
2013/01/25 12:27:17
Done.
| |
18 #include "ppapi/thunk/resource_creation_api.h" | |
yzshen1
2013/01/24 21:55:43
you don't need this.
nhiroki
2013/01/25 12:27:17
Done.
| |
19 #include "webkit/plugins/ppapi/ppb_directory_reader_impl.h" | |
20 | |
21 namespace content { | |
22 | |
23 class RendererPpapiHost; | |
24 | |
25 class CONTENT_EXPORT PepperDirectoryReaderHost | |
yzshen1
2013/01/24 21:55:43
Is it better to remove the ppb_directory_reader_im
nhiroki
2013/01/25 12:27:17
I think so too! There is some redundant codes here
yzshen1
2013/01/28 17:52:34
Do you mean you will do it in this CL or a separat
nhiroki
2013/01/29 05:10:34
I intended to make a separate CL. Okay, let me see
| |
26 : public ppapi::host::ResourceHost, | |
27 public base::SupportsWeakPtr<PepperDirectoryReaderHost> { | |
yzshen1
2013/01/24 21:55:43
add include, please.
nhiroki
2013/01/25 12:27:17
Done.
| |
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 GetNextEntryInternal(); | |
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_ | |
OLD | NEW |