OLD | NEW |
---|---|
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef COMPONENTS_NACL_BROWSER_NACL_PROCESS_HOST_H_ | 5 #ifndef COMPONENTS_NACL_BROWSER_NACL_PROCESS_HOST_H_ |
6 #define COMPONENTS_NACL_BROWSER_NACL_PROCESS_HOST_H_ | 6 #define COMPONENTS_NACL_BROWSER_NACL_PROCESS_HOST_H_ |
7 | 7 |
8 #include "build/build_config.h" | 8 #include "build/build_config.h" |
9 | 9 |
10 #include "base/files/file_path.h" | 10 #include "base/files/file_path.h" |
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
126 const IPC::ChannelHandle& trusted_channel_handle); | 126 const IPC::ChannelHandle& trusted_channel_handle); |
127 | 127 |
128 // Sends the reply with error message to the renderer. | 128 // Sends the reply with error message to the renderer. |
129 void SendErrorToRenderer(const std::string& error_message); | 129 void SendErrorToRenderer(const std::string& error_message); |
130 | 130 |
131 // Sends the reply message to the renderer. Either result or | 131 // Sends the reply message to the renderer. Either result or |
132 // error message must be empty. | 132 // error message must be empty. |
133 void SendMessageToRenderer(const NaClLaunchResult& result, | 133 void SendMessageToRenderer(const NaClLaunchResult& result, |
134 const std::string& error_message); | 134 const std::string& error_message); |
135 | 135 |
136 // Mark the process as using a particular debug stub port and notify | |
Mark Seaborn
2014/03/26 23:34:04
Nit: if you say "GDB debug stub" in the comments i
bradn
2014/05/05 18:46:07
Done.
| |
137 // listeners. | |
138 void ChangeDebugStubPort(int port); | |
Mark Seaborn
2014/03/26 23:34:04
uint16_t for consistency with other cases? Maybe
bradn
2014/05/05 18:46:07
Done.
| |
139 | |
136 // Sends the message to the NaCl process to load the plugin. Returns true | 140 // Sends the message to the NaCl process to load the plugin. Returns true |
137 // on success. | 141 // on success. |
138 bool StartNaClExecution(); | 142 bool StartNaClExecution(); |
139 | 143 |
140 // Does post-process-launching tasks for starting the NaCl process once | 144 // Does post-process-launching tasks for starting the NaCl process once |
141 // we have a connection. | 145 // we have a connection. |
142 // | 146 // |
143 // Returns false on failure. | 147 // Returns false on failure. |
144 bool StartWithLaunchedProcess(); | 148 bool StartWithLaunchedProcess(); |
145 | 149 |
146 // Message handlers for validation caching. | 150 // Message handlers for validation caching. |
147 void OnQueryKnownToValidate(const std::string& signature, bool* result); | 151 void OnQueryKnownToValidate(const std::string& signature, bool* result); |
148 void OnSetKnownToValidate(const std::string& signature); | 152 void OnSetKnownToValidate(const std::string& signature); |
149 void OnResolveFileToken(uint64 file_token_lo, uint64 file_token_hi, | 153 void OnResolveFileToken(uint64 file_token_lo, uint64 file_token_hi, |
150 IPC::Message* reply_msg); | 154 IPC::Message* reply_msg); |
151 void FileResolved(const base::FilePath& file_path, | 155 void FileResolved(const base::FilePath& file_path, |
152 IPC::Message* reply_msg, | 156 IPC::Message* reply_msg, |
153 base::File file); | 157 base::File file); |
154 | 158 |
155 #if defined(OS_WIN) | 159 #if defined(OS_WIN) |
156 // Message handler for Windows hardware exception handling. | 160 // Message handler for Windows hardware exception handling. |
157 void OnAttachDebugExceptionHandler(const std::string& info, | 161 void OnAttachDebugExceptionHandler(const std::string& info, |
158 IPC::Message* reply_msg); | 162 IPC::Message* reply_msg); |
159 bool AttachDebugExceptionHandler(const std::string& info, | 163 bool AttachDebugExceptionHandler(const std::string& info, |
160 IPC::Message* reply_msg); | 164 IPC::Message* reply_msg); |
161 #endif | 165 #endif |
162 | 166 |
167 // Called when the debug stub port has be selected. | |
Mark Seaborn
2014/03/26 23:34:04
"has been"
bradn
2014/05/05 18:46:07
Done.
| |
168 void OnDebugStubPortSelected(uint16_t debug_stub_port); | |
Mark Seaborn
2014/03/26 23:34:04
Nit: Can you keep the decl ordering the same as in
bradn
2014/05/05 18:46:07
Done.
| |
169 | |
163 // Called when the PPAPI IPC channels to the browser/renderer have been | 170 // Called when the PPAPI IPC channels to the browser/renderer have been |
164 // created. | 171 // created. |
165 void OnPpapiChannelsCreated( | 172 void OnPpapiChannelsCreated( |
166 const IPC::ChannelHandle& browser_channel_handle, | 173 const IPC::ChannelHandle& browser_channel_handle, |
167 const IPC::ChannelHandle& ppapi_renderer_channel_handle, | 174 const IPC::ChannelHandle& ppapi_renderer_channel_handle, |
168 const IPC::ChannelHandle& trusted_renderer_channel_handle); | 175 const IPC::ChannelHandle& trusted_renderer_channel_handle); |
169 | 176 |
170 GURL manifest_url_; | 177 GURL manifest_url_; |
171 ppapi::PpapiPermissions permissions_; | 178 ppapi::PpapiPermissions permissions_; |
172 | 179 |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
217 scoped_ptr<content::BrowserPpapiHost> ppapi_host_; | 224 scoped_ptr<content::BrowserPpapiHost> ppapi_host_; |
218 | 225 |
219 int render_view_id_; | 226 int render_view_id_; |
220 | 227 |
221 DISALLOW_COPY_AND_ASSIGN(NaClProcessHost); | 228 DISALLOW_COPY_AND_ASSIGN(NaClProcessHost); |
222 }; | 229 }; |
223 | 230 |
224 } // namespace nacl | 231 } // namespace nacl |
225 | 232 |
226 #endif // COMPONENTS_NACL_BROWSER_NACL_PROCESS_HOST_H_ | 233 #endif // COMPONENTS_NACL_BROWSER_NACL_PROCESS_HOST_H_ |
OLD | NEW |