Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(207)

Side by Side Diff: content/browser/browser_child_process_host.h

Issue 8771041: Simplify BrowserChildProcessHost in preparation for refactoring it so that consumers embed it in ... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: fix nacl on win64 Created 9 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 CONTENT_BROWSER_BROWSER_CHILD_PROCESS_HOST_H_ 5 #ifndef CONTENT_BROWSER_BROWSER_CHILD_PROCESS_HOST_H_
6 #define CONTENT_BROWSER_BROWSER_CHILD_PROCESS_HOST_H_ 6 #define CONTENT_BROWSER_BROWSER_CHILD_PROCESS_HOST_H_
7 #pragma once 7 #pragma once
8 8
9 #include <list> 9 #include <list>
10 10
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
91 91
92 // ChildProcessLauncher::Client implementation. 92 // ChildProcessLauncher::Client implementation.
93 virtual void OnProcessLaunched() OVERRIDE {} 93 virtual void OnProcessLaunched() OVERRIDE {}
94 94
95 // Derived classes can override this to know if the process crashed. 95 // Derived classes can override this to know if the process crashed.
96 // |exit_code| is the status returned when the process crashed (for 96 // |exit_code| is the status returned when the process crashed (for
97 // posix, as returned from waitpid(), for Windows, as returned from 97 // posix, as returned from waitpid(), for Windows, as returned from
98 // GetExitCodeProcess()). 98 // GetExitCodeProcess()).
99 virtual void OnProcessCrashed(int exit_code) {} 99 virtual void OnProcessCrashed(int exit_code) {}
100 100
101 // Derived classes can override this to know if the process was
102 // killed. |exit_code| is the status returned when the process
103 // was killed (for posix, as returned from waitpid(), for Windows,
104 // as returned from GetExitCodeProcess()).
105 virtual void OnProcessWasKilled(int exit_code) {}
106
107 // Returns the termination status of a child. |exit_code| is the 101 // Returns the termination status of a child. |exit_code| is the
108 // status returned when the process exited (for posix, as returned 102 // status returned when the process exited (for posix, as returned
109 // from waitpid(), for Windows, as returned from 103 // from waitpid(), for Windows, as returned from
110 // GetExitCodeProcess()). |exit_code| may be NULL. 104 // GetExitCodeProcess()). |exit_code| may be NULL.
111 virtual base::TerminationStatus GetChildTerminationStatus(int* exit_code); 105 base::TerminationStatus GetChildTerminationStatus(int* exit_code);
112 106
113 // ChildProcessHostDelegate implementation: 107 // Overrides from ChildProcessHost
114 virtual bool CanShutdown() OVERRIDE; 108 virtual bool CanShutdown() OVERRIDE;
115 virtual void OnChildDisconnected() OVERRIDE; 109 virtual void OnChildDisconnected() OVERRIDE;
116 virtual void ShutdownStarted() OVERRIDE; 110 virtual void ShutdownStarted() OVERRIDE;
117 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE; 111 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE;
118 virtual void OnChannelConnected(int32 peer_pid) OVERRIDE; 112 virtual void OnChannelConnected(int32 peer_pid) OVERRIDE;
119 113
120 // Removes this host from the host list. Calls ChildProcessHost::ForceShutdown 114 // Removes this host from the host list. Calls ChildProcessHost::ForceShutdown
121 void ForceShutdown(); 115 void ForceShutdown();
122 116
123 // Controls whether the child process should be terminated on browser 117 // Controls whether the child process should be terminated on browser
(...skipping 28 matching lines...) Expand all
152 scoped_ptr<ChildProcessLauncher> child_process_; 146 scoped_ptr<ChildProcessLauncher> child_process_;
153 #if defined(OS_WIN) 147 #if defined(OS_WIN)
154 base::WaitableEventWatcher child_watcher_; 148 base::WaitableEventWatcher child_watcher_;
155 #else 149 #else
156 base::WeakPtrFactory<BrowserChildProcessHost> task_factory_; 150 base::WeakPtrFactory<BrowserChildProcessHost> task_factory_;
157 #endif 151 #endif
158 bool disconnect_was_alive_; 152 bool disconnect_was_alive_;
159 }; 153 };
160 154
161 #endif // CONTENT_BROWSER_BROWSER_CHILD_PROCESS_HOST_H_ 155 #endif // CONTENT_BROWSER_BROWSER_CHILD_PROCESS_HOST_H_
OLDNEW
« no previous file with comments | « chrome/browser/nacl_host/nacl_process_host.cc ('k') | content/browser/browser_child_process_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698