OLD | NEW |
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 { |
(...skipping 23 matching lines...) Expand all Loading... |
34 // |exit_code| contains the exit code from the process. | 34 // |exit_code| contains the exit code from the process. |
35 virtual void BrowserChildProcessCrashed(const ChildProcessData& data, | 35 virtual void BrowserChildProcessCrashed(const ChildProcessData& data, |
36 int exit_code) {} | 36 int exit_code) {} |
37 | 37 |
38 // Called when a child process disappears unexpectedly as a result of being | 38 // Called when a child process disappears unexpectedly as a result of being |
39 // killed. | 39 // killed. |
40 // |exit_code| contains the exit code from the process. | 40 // |exit_code| contains the exit code from the process. |
41 virtual void BrowserChildProcessKilled(const ChildProcessData& data, | 41 virtual void BrowserChildProcessKilled(const ChildProcessData& data, |
42 int exit_code) {} | 42 int exit_code) {} |
43 | 43 |
44 // Called when an instance of a particular child is created in a page. If one | |
45 // page contains several regions rendered by the same child, this will be | |
46 // called once for each region during the page load. | |
47 virtual void BrowserChildProcessInstanceCreated( | |
48 const ChildProcessData& data) {} | |
49 | |
50 protected: | 44 protected: |
51 // The observer can be destroyed on any thread. | 45 // The observer can be destroyed on any thread. |
52 virtual ~BrowserChildProcessObserver() {} | 46 virtual ~BrowserChildProcessObserver() {} |
53 | 47 |
54 static void Add(BrowserChildProcessObserver* observer); | 48 static void Add(BrowserChildProcessObserver* observer); |
55 static void Remove(BrowserChildProcessObserver* observer); | 49 static void Remove(BrowserChildProcessObserver* observer); |
56 }; | 50 }; |
57 | 51 |
58 } // namespace content | 52 } // namespace content |
59 | 53 |
60 #endif // CONTENT_PUBLIC_BROWSER_BROWSER_CHILD_PROCESS_OBSERVER_H_ | 54 #endif // CONTENT_PUBLIC_BROWSER_BROWSER_CHILD_PROCESS_OBSERVER_H_ |
OLD | NEW |