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 PPAPI_PROXY_FILE_SYSTEM_RESOURCE_H_ | |
6 #define PPAPI_PROXY_FILE_SYSTEM_RESOURCE_H_ | |
7 | |
8 #include <string> | |
9 | |
10 #include "base/memory/ref_counted.h" | |
11 #include "ppapi/c/pp_file_info.h" | |
12 #include "ppapi/proxy/connection.h" | |
13 #include "ppapi/proxy/plugin_resource.h" | |
14 #include "ppapi/proxy/ppapi_proxy_export.h" | |
15 #include "ppapi/proxy/resource_message_params.h" | |
16 #include "ppapi/shared_impl/tracked_callback.h" | |
yzshen1
2013/04/08 21:05:16
Now that you have forward declaration below, you c
victorhsieh
2013/04/08 23:44:38
Done.
| |
17 #include "ppapi/thunk/ppb_file_system_api.h" | |
18 | |
19 namespace ppapi { | |
20 | |
21 class TrackedCallback; | |
22 | |
23 namespace proxy { | |
24 | |
25 class PPAPI_PROXY_EXPORT FileSystemResource | |
26 : public PluginResource, | |
27 public thunk::PPB_FileSystem_API { | |
28 public: | |
29 FileSystemResource(Connection connection, | |
30 PP_Instance instance, | |
31 PP_FileSystemType type); | |
32 virtual ~FileSystemResource(); | |
33 | |
34 // Resource overrides. | |
35 virtual thunk::PPB_FileSystem_API* AsPPB_FileSystem_API() OVERRIDE; | |
36 | |
37 // PPB_FileSystem_API implementation. | |
38 virtual int32_t Open(int64_t expected_size, | |
39 scoped_refptr<TrackedCallback> callback) OVERRIDE; | |
40 virtual PP_FileSystemType GetType() OVERRIDE; | |
41 | |
42 private: | |
43 // Called when the host has responded to our open request. | |
44 void OpenComplete(scoped_refptr<TrackedCallback> callback, | |
45 const ResourceMessageReplyParams& params, | |
46 const std::string& root_url); | |
47 | |
48 PP_FileSystemType type_; | |
49 std::string root_url_; | |
50 bool called_open_; | |
51 | |
52 DISALLOW_COPY_AND_ASSIGN(FileSystemResource); | |
53 }; | |
54 | |
55 } // namespace proxy | |
56 } // namespace ppapi | |
57 | |
58 #endif // PPAPI_PROXY_FILE_SYSTEM_RESOURCE_H_ | |
OLD | NEW |