OLD | NEW |
1 /* -*- c++ -*- */ | 1 /* -*- c++ -*- */ |
2 /* | 2 /* |
3 * Copyright (c) 2011 The Chromium Authors. All rights reserved. | 3 * Copyright (c) 2011 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 29 matching lines...) Expand all Loading... |
40 | 40 |
41 // Callback resources are essentially our continuation state. | 41 // Callback resources are essentially our continuation state. |
42 | 42 |
43 struct LogToJavaScriptConsoleResource { | 43 struct LogToJavaScriptConsoleResource { |
44 public: | 44 public: |
45 explicit LogToJavaScriptConsoleResource(std::string msg) | 45 explicit LogToJavaScriptConsoleResource(std::string msg) |
46 : message(msg) {} | 46 : message(msg) {} |
47 std::string message; | 47 std::string message; |
48 }; | 48 }; |
49 | 49 |
| 50 struct PostMessageResource { |
| 51 public: |
| 52 explicit PostMessageResource(std::string msg) |
| 53 : message(msg) {} |
| 54 std::string message; |
| 55 }; |
| 56 |
50 struct OpenManifestEntryResource { | 57 struct OpenManifestEntryResource { |
51 public: | 58 public: |
52 OpenManifestEntryResource(std::string target_url, | 59 OpenManifestEntryResource(std::string target_url, |
53 int32_t* descp, | 60 int32_t* descp, |
54 ErrorInfo* infop, | 61 ErrorInfo* infop, |
55 bool* portablep, | 62 bool* portablep, |
56 bool* op_complete) | 63 bool* op_complete) |
57 : url(target_url), | 64 : url(target_url), |
58 out_desc(descp), | 65 out_desc(descp), |
59 error_info(infop), | 66 error_info(infop), |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
93 ServiceRuntime* service_runtime, | 100 ServiceRuntime* service_runtime, |
94 pp::CompletionCallback init_done_cb, | 101 pp::CompletionCallback init_done_cb, |
95 pp::CompletionCallback crash_cb); | 102 pp::CompletionCallback crash_cb); |
96 | 103 |
97 virtual ~PluginReverseInterface(); | 104 virtual ~PluginReverseInterface(); |
98 | 105 |
99 void ShutDown(); | 106 void ShutDown(); |
100 | 107 |
101 virtual void Log(nacl::string message); | 108 virtual void Log(nacl::string message); |
102 | 109 |
| 110 virtual void DoPostMessage(nacl::string message); |
| 111 |
103 virtual void StartupInitializationComplete(); | 112 virtual void StartupInitializationComplete(); |
104 | 113 |
105 virtual bool EnumerateManifestKeys(std::set<nacl::string>* out_keys); | 114 virtual bool EnumerateManifestKeys(std::set<nacl::string>* out_keys); |
106 | 115 |
107 virtual bool OpenManifestEntry(nacl::string url_key, int32_t* out_desc); | 116 virtual bool OpenManifestEntry(nacl::string url_key, int32_t* out_desc); |
108 | 117 |
109 virtual bool CloseManifestEntry(int32_t desc); | 118 virtual bool CloseManifestEntry(int32_t desc); |
110 | 119 |
111 virtual void ReportCrash(); | 120 virtual void ReportCrash(); |
112 | 121 |
113 virtual void ReportExitStatus(int exit_status); | 122 virtual void ReportExitStatus(int exit_status); |
114 | 123 |
115 protected: | 124 protected: |
116 virtual void Log_MainThreadContinuation(LogToJavaScriptConsoleResource* p, | 125 virtual void Log_MainThreadContinuation(LogToJavaScriptConsoleResource* p, |
117 int32_t err); | 126 int32_t err); |
118 | 127 |
| 128 virtual void PostMessage_MainThreadContinuation(PostMessageResource* p, |
| 129 int32_t err); |
| 130 |
119 virtual void OpenManifestEntry_MainThreadContinuation( | 131 virtual void OpenManifestEntry_MainThreadContinuation( |
120 OpenManifestEntryResource* p, | 132 OpenManifestEntryResource* p, |
121 int32_t err); | 133 int32_t err); |
122 | 134 |
123 virtual void StreamAsFile_MainThreadContinuation( | 135 virtual void StreamAsFile_MainThreadContinuation( |
124 OpenManifestEntryResource* p, | 136 OpenManifestEntryResource* p, |
125 int32_t result); | 137 int32_t result); |
126 | 138 |
127 virtual void CloseManifestEntry_MainThreadContinuation( | 139 virtual void CloseManifestEntry_MainThreadContinuation( |
128 CloseManifestEntryResource* cls, | 140 CloseManifestEntryResource* cls, |
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
197 | 209 |
198 PluginReverseInterface* rev_interface_; | 210 PluginReverseInterface* rev_interface_; |
199 | 211 |
200 NaClMutex mu_; | 212 NaClMutex mu_; |
201 int exit_status_; | 213 int exit_status_; |
202 }; | 214 }; |
203 | 215 |
204 } // namespace plugin | 216 } // namespace plugin |
205 | 217 |
206 #endif // NATIVE_CLIENT_SRC_TRUSTED_PLUGIN_SERVICE_RUNTIME_H_ | 218 #endif // NATIVE_CLIENT_SRC_TRUSTED_PLUGIN_SERVICE_RUNTIME_H_ |
OLD | NEW |