| 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 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 118 virtual bool OnMessageReceived(const IPC::Message& msg) OVERRIDE; | 118 virtual bool OnMessageReceived(const IPC::Message& msg) OVERRIDE; |
| 119 virtual void OnProcessLaunched() OVERRIDE; | 119 virtual void OnProcessLaunched() OVERRIDE; |
| 120 | 120 |
| 121 void OnResourcesReady(); | 121 void OnResourcesReady(); |
| 122 | 122 |
| 123 // Enable the PPAPI proxy only for NaCl processes corresponding to a renderer. | 123 // Enable the PPAPI proxy only for NaCl processes corresponding to a renderer. |
| 124 bool enable_ppapi_proxy() { return render_view_id_ != 0; } | 124 bool enable_ppapi_proxy() { return render_view_id_ != 0; } |
| 125 | 125 |
| 126 // Sends the reply message to the renderer who is waiting for the plugin | 126 // Sends the reply message to the renderer who is waiting for the plugin |
| 127 // to load. Returns true on success. | 127 // to load. Returns true on success. |
| 128 bool ReplyToRenderer(const IPC::ChannelHandle& ppapi_channel_handle, | 128 bool ReplyToRenderer( |
| 129 const IPC::ChannelHandle& trusted_channel_handle); | 129 const IPC::ChannelHandle& ppapi_channel_handle, |
| 130 const IPC::ChannelHandle& trusted_channel_handle, |
| 131 const IPC::ChannelHandle& embedder_service_channel_handle); |
| 130 | 132 |
| 131 // Sends the reply with error message to the renderer. | 133 // Sends the reply with error message to the renderer. |
| 132 void SendErrorToRenderer(const std::string& error_message); | 134 void SendErrorToRenderer(const std::string& error_message); |
| 133 | 135 |
| 134 // Sends the reply message to the renderer. Either result or | 136 // Sends the reply message to the renderer. Either result or |
| 135 // error message must be empty. | 137 // error message must be empty. |
| 136 void SendMessageToRenderer(const NaClLaunchResult& result, | 138 void SendMessageToRenderer(const NaClLaunchResult& result, |
| 137 const std::string& error_message); | 139 const std::string& error_message); |
| 138 | 140 |
| 139 // Sends the message to the NaCl process to load the plugin. Returns true | 141 // Sends the message to the NaCl process to load the plugin. Returns true |
| (...skipping 21 matching lines...) Expand all Loading... |
| 161 IPC::Message* reply_msg); | 163 IPC::Message* reply_msg); |
| 162 bool AttachDebugExceptionHandler(const std::string& info, | 164 bool AttachDebugExceptionHandler(const std::string& info, |
| 163 IPC::Message* reply_msg); | 165 IPC::Message* reply_msg); |
| 164 #endif | 166 #endif |
| 165 | 167 |
| 166 // Called when the PPAPI IPC channels to the browser/renderer have been | 168 // Called when the PPAPI IPC channels to the browser/renderer have been |
| 167 // created. | 169 // created. |
| 168 void OnPpapiChannelsCreated( | 170 void OnPpapiChannelsCreated( |
| 169 const IPC::ChannelHandle& browser_channel_handle, | 171 const IPC::ChannelHandle& browser_channel_handle, |
| 170 const IPC::ChannelHandle& ppapi_renderer_channel_handle, | 172 const IPC::ChannelHandle& ppapi_renderer_channel_handle, |
| 171 const IPC::ChannelHandle& trusted_renderer_channel_handle); | 173 const IPC::ChannelHandle& trusted_renderer_channel_handle, |
| 174 const IPC::ChannelHandle& embedder_service_channel_handle); |
| 172 | 175 |
| 173 GURL manifest_url_; | 176 GURL manifest_url_; |
| 174 ppapi::PpapiPermissions permissions_; | 177 ppapi::PpapiPermissions permissions_; |
| 175 | 178 |
| 176 #if defined(OS_WIN) | 179 #if defined(OS_WIN) |
| 177 // This field becomes true when the broker successfully launched | 180 // This field becomes true when the broker successfully launched |
| 178 // the NaCl loader. | 181 // the NaCl loader. |
| 179 bool process_launched_by_broker_; | 182 bool process_launched_by_broker_; |
| 180 #endif | 183 #endif |
| 181 // The NaClHostMessageFilter that requested this NaCl process. We use | 184 // The NaClHostMessageFilter that requested this NaCl process. We use |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 223 | 226 |
| 224 // Throttling time in milliseconds for PpapiHostMsg_Keepalive IPCs. | 227 // Throttling time in milliseconds for PpapiHostMsg_Keepalive IPCs. |
| 225 static unsigned keepalive_throttle_interval_milliseconds_; | 228 static unsigned keepalive_throttle_interval_milliseconds_; |
| 226 | 229 |
| 227 DISALLOW_COPY_AND_ASSIGN(NaClProcessHost); | 230 DISALLOW_COPY_AND_ASSIGN(NaClProcessHost); |
| 228 }; | 231 }; |
| 229 | 232 |
| 230 } // namespace nacl | 233 } // namespace nacl |
| 231 | 234 |
| 232 #endif // COMPONENTS_NACL_BROWSER_NACL_PROCESS_HOST_H_ | 235 #endif // COMPONENTS_NACL_BROWSER_NACL_PROCESS_HOST_H_ |
| OLD | NEW |