OLD | NEW |
1 /* -*- c++ -*- */ | 1 /* -*- c++ -*- */ |
2 /* | 2 /* |
3 * Copyright (c) 2012 The Chromium Authors. All rights reserved. | 3 * Copyright (c) 2012 The Chromium Authors. All rights reserved. |
4 * Use of this source code is governed by a BSD-style license that can be | 4 * Use of this source code is governed by a BSD-style license that can be |
5 * found in the LICENSE file. | 5 * found in the LICENSE file. |
6 */ | 6 */ |
7 | 7 |
8 // A class containing information regarding a socket connection to a | 8 // A class containing information regarding a socket connection to a |
9 // service runtime instance. | 9 // service runtime instance. |
10 | 10 |
11 #ifndef NATIVE_CLIENT_SRC_TRUSTED_PLUGIN_SERVICE_RUNTIME_H_ | 11 #ifndef NATIVE_CLIENT_SRC_TRUSTED_PLUGIN_SERVICE_RUNTIME_H_ |
12 #define NATIVE_CLIENT_SRC_TRUSTED_PLUGIN_SERVICE_RUNTIME_H_ | 12 #define NATIVE_CLIENT_SRC_TRUSTED_PLUGIN_SERVICE_RUNTIME_H_ |
13 | 13 |
14 #include <map> | 14 #include <map> |
15 | 15 |
16 #include "native_client/src/include/nacl_macros.h" | 16 #include "native_client/src/include/nacl_macros.h" |
17 #include "native_client/src/include/nacl_scoped_ptr.h" | 17 #include "native_client/src/include/nacl_scoped_ptr.h" |
18 #include "native_client/src/include/nacl_string.h" | 18 #include "native_client/src/include/nacl_string.h" |
19 #include "native_client/src/shared/platform/nacl_sync.h" | 19 #include "native_client/src/shared/platform/nacl_sync.h" |
20 #include "native_client/src/shared/srpc/nacl_srpc.h" | 20 #include "native_client/src/shared/srpc/nacl_srpc.h" |
21 #include "native_client/src/trusted/desc/nacl_desc_wrapper.h" | 21 #include "native_client/src/trusted/desc/nacl_desc_wrapper.h" |
22 #include "native_client/src/trusted/nonnacl_util/sel_ldr_launcher.h" | 22 #include "native_client/src/trusted/nonnacl_util/sel_ldr_launcher.h" |
23 #include "native_client/src/trusted/plugin/utility.h" | 23 #include "native_client/src/trusted/plugin/utility.h" |
24 #include "native_client/src/trusted/reverse_service/reverse_service.h" | 24 #include "native_client/src/trusted/reverse_service/reverse_service.h" |
25 #include "native_client/src/trusted/weak_ref/weak_ref.h" | 25 #include "native_client/src/trusted/weak_ref/weak_ref.h" |
26 | 26 |
27 #include "ppapi/c/trusted/ppb_file_io_trusted.h" | 27 #include "ppapi/c/trusted/ppb_file_io_trusted.h" |
28 #include "ppapi/cpp/completion_callback.h" | 28 #include "ppapi/cpp/completion_callback.h" |
29 | 29 |
| 30 struct NaClFileInfo; |
| 31 |
30 namespace nacl { | 32 namespace nacl { |
31 class DescWrapper; | 33 class DescWrapper; |
32 } // namespace | 34 } // namespace |
33 | 35 |
34 namespace pp { | 36 namespace pp { |
35 class FileIO; | 37 class FileIO; |
36 } // namespace | 38 } // namespace |
37 | 39 |
38 namespace plugin { | 40 namespace plugin { |
39 | 41 |
(...skipping 16 matching lines...) Expand all Loading... |
56 struct PostMessageResource { | 58 struct PostMessageResource { |
57 public: | 59 public: |
58 explicit PostMessageResource(std::string msg) | 60 explicit PostMessageResource(std::string msg) |
59 : message(msg) {} | 61 : message(msg) {} |
60 std::string message; | 62 std::string message; |
61 }; | 63 }; |
62 | 64 |
63 struct OpenManifestEntryResource { | 65 struct OpenManifestEntryResource { |
64 public: | 66 public: |
65 OpenManifestEntryResource(const std::string& target_url, | 67 OpenManifestEntryResource(const std::string& target_url, |
66 int32_t* descp, | 68 struct NaClFileInfo* finfo, |
67 ErrorInfo* infop, | 69 ErrorInfo* infop, |
68 bool* op_complete) | 70 bool* op_complete) |
69 : url(target_url), | 71 : url(target_url), |
70 out_desc(descp), | 72 file_info(finfo), |
71 error_info(infop), | 73 error_info(infop), |
72 op_complete_ptr(op_complete) {} | 74 op_complete_ptr(op_complete) {} |
73 std::string url; | 75 std::string url; |
74 int32_t* out_desc; | 76 struct NaClFileInfo *file_info; |
75 ErrorInfo* error_info; | 77 ErrorInfo* error_info; |
76 bool* op_complete_ptr; | 78 bool* op_complete_ptr; |
77 }; | 79 }; |
78 | 80 |
79 struct CloseManifestEntryResource { | 81 struct CloseManifestEntryResource { |
80 public: | 82 public: |
81 CloseManifestEntryResource(int32_t desc_to_close, | 83 CloseManifestEntryResource(int32_t desc_to_close, |
82 bool* op_complete, | 84 bool* op_complete, |
83 bool* op_result) | 85 bool* op_result) |
84 : desc(desc_to_close), | 86 : desc(desc_to_close), |
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
145 void ShutDown(); | 147 void ShutDown(); |
146 | 148 |
147 virtual void Log(nacl::string message); | 149 virtual void Log(nacl::string message); |
148 | 150 |
149 virtual void DoPostMessage(nacl::string message); | 151 virtual void DoPostMessage(nacl::string message); |
150 | 152 |
151 virtual void StartupInitializationComplete(); | 153 virtual void StartupInitializationComplete(); |
152 | 154 |
153 virtual bool EnumerateManifestKeys(std::set<nacl::string>* out_keys); | 155 virtual bool EnumerateManifestKeys(std::set<nacl::string>* out_keys); |
154 | 156 |
155 virtual bool OpenManifestEntry(nacl::string url_key, int32_t* out_desc); | 157 virtual bool OpenManifestEntry(nacl::string url_key, |
| 158 struct NaClFileInfo *info); |
156 | 159 |
157 virtual bool CloseManifestEntry(int32_t desc); | 160 virtual bool CloseManifestEntry(int32_t desc); |
158 | 161 |
159 virtual void ReportCrash(); | 162 virtual void ReportCrash(); |
160 | 163 |
161 virtual void ReportExitStatus(int exit_status); | 164 virtual void ReportExitStatus(int exit_status); |
162 | 165 |
163 virtual int64_t RequestQuotaForWrite(nacl::string file_id, | 166 virtual int64_t RequestQuotaForWrite(nacl::string file_id, |
164 int64_t offset, | 167 int64_t offset, |
165 int64_t bytes_to_write); | 168 int64_t bytes_to_write); |
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
276 | 279 |
277 PluginReverseInterface* rev_interface_; | 280 PluginReverseInterface* rev_interface_; |
278 | 281 |
279 NaClMutex mu_; | 282 NaClMutex mu_; |
280 int exit_status_; | 283 int exit_status_; |
281 }; | 284 }; |
282 | 285 |
283 } // namespace plugin | 286 } // namespace plugin |
284 | 287 |
285 #endif // NATIVE_CLIENT_SRC_TRUSTED_PLUGIN_SERVICE_RUNTIME_H_ | 288 #endif // NATIVE_CLIENT_SRC_TRUSTED_PLUGIN_SERVICE_RUNTIME_H_ |
OLD | NEW |