| 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 CHROME_BROWSER_NACL_HOST_NACL_PROCESS_HOST_H_ | 5 #ifndef CHROME_BROWSER_NACL_HOST_NACL_PROCESS_HOST_H_ |
| 6 #define CHROME_BROWSER_NACL_HOST_NACL_PROCESS_HOST_H_ | 6 #define CHROME_BROWSER_NACL_HOST_NACL_PROCESS_HOST_H_ |
| 7 | 7 |
| 8 #include "build/build_config.h" | 8 #include "build/build_config.h" |
| 9 | 9 |
| 10 #include "base/file_path.h" | 10 #include "base/file_path.h" |
| 11 #include "base/file_util_proxy.h" | 11 #include "base/file_util_proxy.h" |
| 12 #include "base/memory/ref_counted.h" | 12 #include "base/memory/ref_counted.h" |
| 13 #include "base/memory/weak_ptr.h" | 13 #include "base/memory/weak_ptr.h" |
| 14 #include "base/message_loop.h" | 14 #include "base/message_loop.h" |
| 15 #include "base/process.h" | 15 #include "base/process.h" |
| 16 #include "chrome/common/nacl_types.h" | 16 #include "chrome/common/nacl_types.h" |
| 17 #include "content/public/browser/browser_child_process_host_delegate.h" | 17 #include "content/public/browser/browser_child_process_host_delegate.h" |
| 18 #include "googleurl/src/gurl.h" | 18 #include "googleurl/src/gurl.h" |
| 19 #include "ipc/ipc_channel_handle.h" | 19 #include "ipc/ipc_channel_handle.h" |
| 20 | 20 |
| 21 class ChromeRenderMessageFilter; | 21 class ChromeRenderMessageFilter; |
| 22 class CommandLine; | 22 class CommandLine; |
| 23 class ExtensionInfoMap; | 23 class ExtensionInfoMap; |
| 24 | 24 |
| 25 namespace content { | 25 namespace content { |
| 26 class BrowserChildProcessHost; | 26 class BrowserChildProcessHost; |
| 27 class RenderProcessHost; |
| 28 class ResourceContext; |
| 27 } | 29 } |
| 28 | 30 |
| 29 namespace IPC { | 31 namespace IPC { |
| 30 class ChannelProxy; | 32 class ChannelProxy; |
| 31 } | 33 } |
| 32 | 34 |
| 33 // Represents the browser side of the browser <--> NaCl communication | 35 // Represents the browser side of the browser <--> NaCl communication |
| 34 // channel. There will be one NaClProcessHost per NaCl process | 36 // channel. There will be one NaClProcessHost per NaCl process |
| 35 // The browser is responsible for starting the NaCl process | 37 // The browser is responsible for starting the NaCl process |
| 36 // when requested by the renderer. | 38 // when requested by the renderer. |
| (...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 129 bool AttachDebugExceptionHandler(const std::string& info, | 131 bool AttachDebugExceptionHandler(const std::string& info, |
| 130 IPC::Message* reply_msg); | 132 IPC::Message* reply_msg); |
| 131 #endif | 133 #endif |
| 132 | 134 |
| 133 // Called when a PPAPI IPC channel has been created. | 135 // Called when a PPAPI IPC channel has been created. |
| 134 void OnPpapiChannelCreated(const IPC::ChannelHandle& channel_handle); | 136 void OnPpapiChannelCreated(const IPC::ChannelHandle& channel_handle); |
| 135 // Called by PluginListener, so messages from the untrusted side of | 137 // Called by PluginListener, so messages from the untrusted side of |
| 136 // the IPC proxy can be handled. | 138 // the IPC proxy can be handled. |
| 137 bool OnUntrustedMessageForwarded(const IPC::Message& msg); | 139 bool OnUntrustedMessageForwarded(const IPC::Message& msg); |
| 138 | 140 |
| 141 // Needed to access BrowserContext and ResourceContext. |
| 142 void EnablePpapiChannelOnUIThread(int renderer_process_id); |
| 143 // Needed to access HostResolver. |
| 144 void EnablePpapiChannelOnIOThread(content::ResourceContext* resource_context); |
| 145 |
| 139 GURL manifest_url_; | 146 GURL manifest_url_; |
| 140 | 147 |
| 141 #if defined(OS_WIN) | 148 #if defined(OS_WIN) |
| 142 // This field becomes true when the broker successfully launched | 149 // This field becomes true when the broker successfully launched |
| 143 // the NaCl loader. | 150 // the NaCl loader. |
| 144 bool process_launched_by_broker_; | 151 bool process_launched_by_broker_; |
| 145 #elif defined(OS_LINUX) | 152 #elif defined(OS_LINUX) |
| 146 bool wait_for_nacl_gdb_; | 153 bool wait_for_nacl_gdb_; |
| 147 MessageLoopForIO::FileDescriptorWatcher nacl_gdb_watcher_; | 154 MessageLoopForIO::FileDescriptorWatcher nacl_gdb_watcher_; |
| 148 | 155 |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 182 | 189 |
| 183 // Channel proxy to terminate the NaCl-Browser PPAPI channel. | 190 // Channel proxy to terminate the NaCl-Browser PPAPI channel. |
| 184 scoped_ptr<IPC::ChannelProxy> ipc_proxy_channel_; | 191 scoped_ptr<IPC::ChannelProxy> ipc_proxy_channel_; |
| 185 // Plugin listener, to forward browser channel messages to us. | 192 // Plugin listener, to forward browser channel messages to us. |
| 186 PluginListener ipc_plugin_listener_; | 193 PluginListener ipc_plugin_listener_; |
| 187 | 194 |
| 188 DISALLOW_COPY_AND_ASSIGN(NaClProcessHost); | 195 DISALLOW_COPY_AND_ASSIGN(NaClProcessHost); |
| 189 }; | 196 }; |
| 190 | 197 |
| 191 #endif // CHROME_BROWSER_NACL_HOST_NACL_PROCESS_HOST_H_ | 198 #endif // CHROME_BROWSER_NACL_HOST_NACL_PROCESS_HOST_H_ |
| OLD | NEW |