| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include "build/build_config.h" | 9 #include "build/build_config.h" |
| 10 | 10 |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 50 // Internal class that holds the nacl::Handle objecs so that | 50 // Internal class that holds the nacl::Handle objecs so that |
| 51 // nacl_process_host.h doesn't include NaCl headers. Needed since it's | 51 // nacl_process_host.h doesn't include NaCl headers. Needed since it's |
| 52 // included by src\content, which can't depend on the NaCl gyp file because it | 52 // included by src\content, which can't depend on the NaCl gyp file because it |
| 53 // depends on chrome.gyp (circular dependency). | 53 // depends on chrome.gyp (circular dependency). |
| 54 struct NaClInternal; | 54 struct NaClInternal; |
| 55 | 55 |
| 56 bool LaunchSelLdr(); | 56 bool LaunchSelLdr(); |
| 57 | 57 |
| 58 // BrowserChildProcessHostDelegate implementation: | 58 // BrowserChildProcessHostDelegate implementation: |
| 59 virtual bool OnMessageReceived(const IPC::Message& msg) OVERRIDE; | 59 virtual bool OnMessageReceived(const IPC::Message& msg) OVERRIDE; |
| 60 virtual void OnProcessCrashed(int exit_code) OVERRIDE; | 60 virtual void OnProcessCrashedOrWasKilled(int exit_code) OVERRIDE; |
| 61 virtual void OnProcessLaunched() OVERRIDE; | 61 virtual void OnProcessLaunched() OVERRIDE; |
| 62 | 62 |
| 63 void IrtReady(); | 63 void IrtReady(); |
| 64 void SendStart(base::PlatformFile irt_file); | 64 void SendStart(base::PlatformFile irt_file); |
| 65 | 65 |
| 66 private: | 66 private: |
| 67 // The ChromeRenderMessageFilter that requested this NaCl process. We use | 67 // The ChromeRenderMessageFilter that requested this NaCl process. We use |
| 68 // this for sending the reply once the process has started. | 68 // this for sending the reply once the process has started. |
| 69 scoped_refptr<ChromeRenderMessageFilter> chrome_render_message_filter_; | 69 scoped_refptr<ChromeRenderMessageFilter> chrome_render_message_filter_; |
| 70 | 70 |
| 71 // The reply message to send. We must always send this message when the | 71 // The reply message to send. We must always send this message when the |
| 72 // sub-process either succeeds or fails to unblock the renderer waiting for | 72 // sub-process either succeeds or fails to unblock the renderer waiting for |
| 73 // the reply. NULL when there is no reply to send. | 73 // the reply. NULL when there is no reply to send. |
| 74 IPC::Message* reply_msg_; | 74 IPC::Message* reply_msg_; |
| 75 | 75 |
| 76 // Socket pairs for the NaCl process and renderer. | 76 // Socket pairs for the NaCl process and renderer. |
| 77 scoped_ptr<NaClInternal> internal_; | 77 scoped_ptr<NaClInternal> internal_; |
| 78 | 78 |
| 79 base::WeakPtrFactory<NaClProcessHost> weak_factory_; | 79 base::WeakPtrFactory<NaClProcessHost> weak_factory_; |
| 80 | 80 |
| 81 scoped_ptr<content::BrowserChildProcessHost> process_; | 81 scoped_ptr<content::BrowserChildProcessHost> process_; |
| 82 | 82 |
| 83 DISALLOW_COPY_AND_ASSIGN(NaClProcessHost); | 83 DISALLOW_COPY_AND_ASSIGN(NaClProcessHost); |
| 84 }; | 84 }; |
| 85 | 85 |
| 86 #endif // CHROME_BROWSER_NACL_HOST_NACL_PROCESS_HOST_H_ | 86 #endif // CHROME_BROWSER_NACL_HOST_NACL_PROCESS_HOST_H_ |
| OLD | NEW |