| 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 |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 66 nacl::string url; | 66 nacl::string url; |
| 67 bool uses_irt; | 67 bool uses_irt; |
| 68 bool uses_ppapi; | 68 bool uses_ppapi; |
| 69 bool enable_dev_interfaces; | 69 bool enable_dev_interfaces; |
| 70 bool enable_dyncode_syscalls; | 70 bool enable_dyncode_syscalls; |
| 71 bool enable_exception_handling; | 71 bool enable_exception_handling; |
| 72 bool enable_crash_throttling; | 72 bool enable_crash_throttling; |
| 73 }; | 73 }; |
| 74 | 74 |
| 75 // Callback resources are essentially our continuation state. | 75 // Callback resources are essentially our continuation state. |
| 76 | |
| 77 struct LogToJavaScriptConsoleResource { | |
| 78 public: | |
| 79 explicit LogToJavaScriptConsoleResource(std::string msg) | |
| 80 : message(msg) {} | |
| 81 std::string message; | |
| 82 }; | |
| 83 | |
| 84 struct PostMessageResource { | 76 struct PostMessageResource { |
| 85 public: | 77 public: |
| 86 explicit PostMessageResource(std::string msg) | 78 explicit PostMessageResource(std::string msg) |
| 87 : message(msg) {} | 79 : message(msg) {} |
| 88 std::string message; | 80 std::string message; |
| 89 }; | 81 }; |
| 90 | 82 |
| 91 struct OpenManifestEntryResource { | 83 struct OpenManifestEntryResource { |
| 92 public: | 84 public: |
| 93 OpenManifestEntryResource(const std::string& target_url, | 85 OpenManifestEntryResource(const std::string& target_url, |
| (...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 150 Plugin* plugin, | 142 Plugin* plugin, |
| 151 const Manifest* manifest, | 143 const Manifest* manifest, |
| 152 ServiceRuntime* service_runtime, | 144 ServiceRuntime* service_runtime, |
| 153 pp::CompletionCallback init_done_cb, | 145 pp::CompletionCallback init_done_cb, |
| 154 pp::CompletionCallback crash_cb); | 146 pp::CompletionCallback crash_cb); |
| 155 | 147 |
| 156 virtual ~PluginReverseInterface(); | 148 virtual ~PluginReverseInterface(); |
| 157 | 149 |
| 158 void ShutDown(); | 150 void ShutDown(); |
| 159 | 151 |
| 160 virtual void Log(nacl::string message); | |
| 161 | |
| 162 virtual void DoPostMessage(nacl::string message); | 152 virtual void DoPostMessage(nacl::string message); |
| 163 | 153 |
| 164 virtual void StartupInitializationComplete(); | 154 virtual void StartupInitializationComplete(); |
| 165 | 155 |
| 166 virtual bool EnumerateManifestKeys(std::set<nacl::string>* out_keys); | 156 virtual bool EnumerateManifestKeys(std::set<nacl::string>* out_keys); |
| 167 | 157 |
| 168 virtual bool OpenManifestEntry(nacl::string url_key, | 158 virtual bool OpenManifestEntry(nacl::string url_key, |
| 169 struct NaClFileInfo *info); | 159 struct NaClFileInfo *info); |
| 170 | 160 |
| 171 virtual bool CloseManifestEntry(int32_t desc); | 161 virtual bool CloseManifestEntry(int32_t desc); |
| 172 | 162 |
| 173 virtual void ReportCrash(); | 163 virtual void ReportCrash(); |
| 174 | 164 |
| 175 virtual void ReportExitStatus(int exit_status); | 165 virtual void ReportExitStatus(int exit_status); |
| 176 | 166 |
| 177 virtual int64_t RequestQuotaForWrite(nacl::string file_id, | 167 virtual int64_t RequestQuotaForWrite(nacl::string file_id, |
| 178 int64_t offset, | 168 int64_t offset, |
| 179 int64_t bytes_to_write); | 169 int64_t bytes_to_write); |
| 180 | 170 |
| 181 void AddQuotaManagedFile(const nacl::string& file_id, | 171 void AddQuotaManagedFile(const nacl::string& file_id, |
| 182 const pp::FileIO& file_io); | 172 const pp::FileIO& file_io); |
| 183 void AddTempQuotaManagedFile(const nacl::string& file_id); | 173 void AddTempQuotaManagedFile(const nacl::string& file_id); |
| 184 | 174 |
| 185 protected: | 175 protected: |
| 186 virtual void Log_MainThreadContinuation(LogToJavaScriptConsoleResource* p, | |
| 187 int32_t err); | |
| 188 | |
| 189 virtual void PostMessage_MainThreadContinuation(PostMessageResource* p, | 176 virtual void PostMessage_MainThreadContinuation(PostMessageResource* p, |
| 190 int32_t err); | 177 int32_t err); |
| 191 | 178 |
| 192 virtual void OpenManifestEntry_MainThreadContinuation( | 179 virtual void OpenManifestEntry_MainThreadContinuation( |
| 193 OpenManifestEntryResource* p, | 180 OpenManifestEntryResource* p, |
| 194 int32_t err); | 181 int32_t err); |
| 195 | 182 |
| 196 virtual void StreamAsFile_MainThreadContinuation( | 183 virtual void StreamAsFile_MainThreadContinuation( |
| 197 OpenManifestEntryResource* p, | 184 OpenManifestEntryResource* p, |
| 198 int32_t result); | 185 int32_t result); |
| (...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 294 int exit_status_; | 281 int exit_status_; |
| 295 bool start_sel_ldr_done_; | 282 bool start_sel_ldr_done_; |
| 296 | 283 |
| 297 PP_Var start_sel_ldr_error_message_; | 284 PP_Var start_sel_ldr_error_message_; |
| 298 pp::CompletionCallbackFactory<ServiceRuntime> callback_factory_; | 285 pp::CompletionCallbackFactory<ServiceRuntime> callback_factory_; |
| 299 }; | 286 }; |
| 300 | 287 |
| 301 } // namespace plugin | 288 } // namespace plugin |
| 302 | 289 |
| 303 #endif // NATIVE_CLIENT_SRC_TRUSTED_PLUGIN_SERVICE_RUNTIME_H_ | 290 #endif // NATIVE_CLIENT_SRC_TRUSTED_PLUGIN_SERVICE_RUNTIME_H_ |
| OLD | NEW |