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

Side by Side Diff: content/public/browser/browser_child_process_host_delegate.h

Issue 1923653002: Wire up process launch error codes. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix debug and clang Created 4 years, 7 months 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
« no previous file with comments | « content/common/sandbox_win.cc ('k') | content/public/browser/render_process_host_observer.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 CONTENT_PUBLIC_BROWSER_BROWSER_CHILD_PROCESS_HOST_DELEGATE_H_ 5 #ifndef CONTENT_PUBLIC_BROWSER_BROWSER_CHILD_PROCESS_HOST_DELEGATE_H_
6 #define CONTENT_PUBLIC_BROWSER_BROWSER_CHILD_PROCESS_HOST_DELEGATE_H_ 6 #define CONTENT_PUBLIC_BROWSER_BROWSER_CHILD_PROCESS_HOST_DELEGATE_H_
7 7
8 #include "content/common/content_export.h" 8 #include "content/common/content_export.h"
9 #include "ipc/ipc_listener.h" 9 #include "ipc/ipc_listener.h"
10 10
11 namespace content { 11 namespace content {
12 12
13 class ServiceRegistry; 13 class ServiceRegistry;
14 14
15 // Interface that all users of BrowserChildProcessHost need to provide. 15 // Interface that all users of BrowserChildProcessHost need to provide.
16 class CONTENT_EXPORT BrowserChildProcessHostDelegate : public IPC::Listener { 16 class CONTENT_EXPORT BrowserChildProcessHostDelegate : public IPC::Listener {
17 public: 17 public:
18 ~BrowserChildProcessHostDelegate() override {} 18 ~BrowserChildProcessHostDelegate() override {}
19 19
20 // Delegates return true if it's ok to shut down the child process (which is 20 // Delegates return true if it's ok to shut down the child process (which is
21 // the default return value). The exception is if the host is in the middle of 21 // the default return value). The exception is if the host is in the middle of
22 // sending a request to the process, in which case the other side might think 22 // sending a request to the process, in which case the other side might think
23 // it's ok to shutdown, when really it's not. 23 // it's ok to shutdown, when really it's not.
24 virtual bool CanShutdown(); 24 virtual bool CanShutdown();
25 25
26 // Called when the process has been started. 26 // Called when the process has been started.
27 virtual void OnProcessLaunched() {} 27 virtual void OnProcessLaunched() {}
28 28
29 // Called if the process failed to launch. In this case the process never 29 // Called if the process failed to launch. In this case the process never
30 // started so there is no available exit code. 30 // started so the code here is a platform specific error code.
31 virtual void OnProcessLaunchFailed() {} 31 virtual void OnProcessLaunchFailed(int error_code) {}
32 32
33 // Called if the process crashed. |exit_code| is the status returned when the 33 // Called if the process crashed. |exit_code| is the status returned when the
34 // process crashed (for posix, as returned from waitpid(), for Windows, as 34 // process crashed (for posix, as returned from waitpid(), for Windows, as
35 // returned from GetExitCodeProcess()). 35 // returned from GetExitCodeProcess()).
36 virtual void OnProcessCrashed(int exit_code) {} 36 virtual void OnProcessCrashed(int exit_code) {}
37 37
38 // Returns the ServiceRegistry for this child process. 38 // Returns the ServiceRegistry for this child process.
39 virtual ServiceRegistry* GetServiceRegistry(); 39 virtual ServiceRegistry* GetServiceRegistry();
40 }; 40 };
41 41
42 }; // namespace content 42 }; // namespace content
43 43
44 #endif // CONTENT_PUBLIC_BROWSER_BROWSER_CHILD_PROCESS_HOST_DELEGATE_H_ 44 #endif // CONTENT_PUBLIC_BROWSER_BROWSER_CHILD_PROCESS_HOST_DELEGATE_H_
OLDNEW
« no previous file with comments | « content/common/sandbox_win.cc ('k') | content/public/browser/render_process_host_observer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698