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

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

Issue 1067733006: Add extra parameter to BrowserChildProcessCrashed to pass the exit_code at time of crash/termination (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: code review comments Created 5 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/browser/mach_broker_mac.mm ('k') | content/public/browser/child_process_data.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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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_OBSERVER_H_ 5 #ifndef CONTENT_PUBLIC_BROWSER_BROWSER_CHILD_PROCESS_OBSERVER_H_
6 #define CONTENT_PUBLIC_BROWSER_BROWSER_CHILD_PROCESS_OBSERVER_H_ 6 #define CONTENT_PUBLIC_BROWSER_BROWSER_CHILD_PROCESS_OBSERVER_H_
7 7
8 #include "content/common/content_export.h" 8 #include "content/common/content_export.h"
9 9
10 namespace content { 10 namespace content {
11 11
12 struct ChildProcessData; 12 struct ChildProcessData;
13 13
14 // An observer API implemented by classes which are interested in browser child 14 // An observer API implemented by classes which are interested in browser child
15 // process events. Note that render processes cannot be observed through this 15 // process events. Note that render processes cannot be observed through this
16 // interface; use RenderProcessHostObserver instead. 16 // interface; use RenderProcessHostObserver instead.
17 class CONTENT_EXPORT BrowserChildProcessObserver { 17 class CONTENT_EXPORT BrowserChildProcessObserver {
18 public: 18 public:
19 // Called when a child process host has connected to a child process. 19 // Called when a child process host has connected to a child process.
20 virtual void BrowserChildProcessHostConnected(const ChildProcessData& data) {} 20 virtual void BrowserChildProcessHostConnected(const ChildProcessData& data) {}
21 21
22 // Called after a ChildProcessHost is disconnected from the child process. 22 // Called after a ChildProcessHost is disconnected from the child process.
23 virtual void BrowserChildProcessHostDisconnected( 23 virtual void BrowserChildProcessHostDisconnected(
24 const ChildProcessData& data) {} 24 const ChildProcessData& data) {}
25 25
26 // Called when a child process disappears unexpectedly as a result of a crash. 26 // Called when a child process disappears unexpectedly as a result of a crash.
27 virtual void BrowserChildProcessCrashed(const ChildProcessData& data) {} 27 // |exit_code| contains the exit code from the process.
28 virtual void BrowserChildProcessCrashed(const ChildProcessData& data,
29 int exit_code) {}
28 30
29 // Called when an instance of a particular child is created in a page. If one 31 // Called when an instance of a particular child is created in a page. If one
30 // page contains several regions rendered by the same child, this will be 32 // page contains several regions rendered by the same child, this will be
31 // called once for each region during the page load. 33 // called once for each region during the page load.
32 virtual void BrowserChildProcessInstanceCreated( 34 virtual void BrowserChildProcessInstanceCreated(
33 const ChildProcessData& data) {} 35 const ChildProcessData& data) {}
34 36
35 protected: 37 protected:
36 // The observer can be destroyed on any thread. 38 // The observer can be destroyed on any thread.
37 virtual ~BrowserChildProcessObserver() {} 39 virtual ~BrowserChildProcessObserver() {}
38 40
39 static void Add(BrowserChildProcessObserver* observer); 41 static void Add(BrowserChildProcessObserver* observer);
40 static void Remove(BrowserChildProcessObserver* observer); 42 static void Remove(BrowserChildProcessObserver* observer);
41 }; 43 };
42 44
43 } // namespace content 45 } // namespace content
44 46
45 #endif // CONTENT_PUBLIC_BROWSER_BROWSER_CHILD_PROCESS_OBSERVER_H_ 47 #endif // CONTENT_PUBLIC_BROWSER_BROWSER_CHILD_PROCESS_OBSERVER_H_
OLDNEW
« no previous file with comments | « content/browser/mach_broker_mac.mm ('k') | content/public/browser/child_process_data.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698