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 #pragma once | 7 #pragma once |
8 | 8 |
9 #include "build/build_config.h" | 9 #include "build/build_config.h" |
10 | 10 |
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
77 FilePath GetManifestPath(); | 77 FilePath GetManifestPath(); |
78 bool LaunchSelLdr(); | 78 bool LaunchSelLdr(); |
79 | 79 |
80 // BrowserChildProcessHostDelegate implementation: | 80 // BrowserChildProcessHostDelegate implementation: |
81 virtual bool OnMessageReceived(const IPC::Message& msg) OVERRIDE; | 81 virtual bool OnMessageReceived(const IPC::Message& msg) OVERRIDE; |
82 virtual void OnProcessCrashed(int exit_code) OVERRIDE; | 82 virtual void OnProcessCrashed(int exit_code) OVERRIDE; |
83 virtual void OnProcessLaunched() OVERRIDE; | 83 virtual void OnProcessLaunched() OVERRIDE; |
84 | 84 |
85 void IrtReady(); | 85 void IrtReady(); |
86 | 86 |
87 // Sends the reply message to the renderer who is waiting for the plugin | |
88 // to load. Returns true on success. | |
89 bool ReplyToRenderer(); | |
90 | |
91 // Sends the message to the NaCl process to load the plugin. Returns true | |
92 // on success. | |
93 bool StartNaClExecution(); | |
94 | |
95 // Called once all initialization is complete and the NaCl process is | 87 // Called once all initialization is complete and the NaCl process is |
96 // ready to go. Returns true on success. | 88 // ready to go. Returns true on success. |
97 bool SendStart(); | 89 bool SendStart(); |
98 | 90 |
99 // Does post-process-launching tasks for starting the NaCl process once | 91 // Does post-process-launching tasks for starting the NaCl process once |
100 // we have a connection. | 92 // we have a connection. |
101 // | 93 // |
102 // Returns false on failure. | 94 // Returns false on failure. |
103 bool StartWithLaunchedProcess(); | 95 bool StartWithLaunchedProcess(); |
104 | 96 |
105 // Message handlers for validation caching. | 97 // Message handlers for validation caching. |
106 void OnQueryKnownToValidate(const std::string& signature, bool* result); | 98 void OnQueryKnownToValidate(const std::string& signature, bool* result); |
107 void OnSetKnownToValidate(const std::string& signature); | 99 void OnSetKnownToValidate(const std::string& signature); |
108 #if defined(OS_WIN) | 100 #if defined(OS_WIN) |
109 // Message handler for Windows hardware exception handling. | 101 // Message handler for Windows hardware exception handling. |
110 void OnAttachDebugExceptionHandler(const std::string& info, | 102 void OnAttachDebugExceptionHandler(const std::string& info, |
111 IPC::Message* reply_msg); | 103 IPC::Message* reply_msg); |
112 bool AttachDebugExceptionHandler(const std::string& info, | 104 bool AttachDebugExceptionHandler(const std::string& info, |
113 IPC::Message* reply_msg); | 105 IPC::Message* reply_msg); |
114 #endif | 106 #endif |
115 | 107 |
| 108 void OnPpapiChannelCreated(const IPC::ChannelHandle& channel_handle); |
| 109 |
116 GURL manifest_url_; | 110 GURL manifest_url_; |
117 | 111 |
118 #if defined(OS_WIN) | 112 #if defined(OS_WIN) |
119 // This field becomes true when the broker successfully launched | 113 // This field becomes true when the broker successfully launched |
120 // the NaCl loader. | 114 // the NaCl loader. |
121 bool process_launched_by_broker_; | 115 bool process_launched_by_broker_; |
122 #elif defined(OS_LINUX) | 116 #elif defined(OS_LINUX) |
123 bool wait_for_nacl_gdb_; | 117 bool wait_for_nacl_gdb_; |
124 MessageLoopForIO::FileDescriptorWatcher nacl_gdb_watcher_; | 118 MessageLoopForIO::FileDescriptorWatcher nacl_gdb_watcher_; |
125 scoped_ptr<MessageLoopForIO::Watcher> nacl_gdb_watcher_delegate_; | 119 scoped_ptr<MessageLoopForIO::Watcher> nacl_gdb_watcher_delegate_; |
(...skipping 21 matching lines...) Expand all Loading... |
147 base::WeakPtrFactory<NaClProcessHost> weak_factory_; | 141 base::WeakPtrFactory<NaClProcessHost> weak_factory_; |
148 | 142 |
149 scoped_ptr<content::BrowserChildProcessHost> process_; | 143 scoped_ptr<content::BrowserChildProcessHost> process_; |
150 | 144 |
151 bool enable_exception_handling_; | 145 bool enable_exception_handling_; |
152 | 146 |
153 DISALLOW_COPY_AND_ASSIGN(NaClProcessHost); | 147 DISALLOW_COPY_AND_ASSIGN(NaClProcessHost); |
154 }; | 148 }; |
155 | 149 |
156 #endif // CHROME_BROWSER_NACL_HOST_NACL_PROCESS_HOST_H_ | 150 #endif // CHROME_BROWSER_NACL_HOST_NACL_PROCESS_HOST_H_ |
OLD | NEW |