Switch global error menu icon to vectorized MD asset
[chromium-blink-merge.git] / content / public / browser / browser_child_process_observer.h
blob3d82be60bc827d1d8b822bcdc1e49ca4a684a44a
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
3 // found in the LICENSE file.
5 #ifndef CONTENT_PUBLIC_BROWSER_BROWSER_CHILD_PROCESS_OBSERVER_H_
6 #define CONTENT_PUBLIC_BROWSER_BROWSER_CHILD_PROCESS_OBSERVER_H_
8 #include "content/common/content_export.h"
10 namespace content {
12 struct ChildProcessData;
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
16 // interface; use RenderProcessHostObserver instead.
17 class CONTENT_EXPORT BrowserChildProcessObserver {
18 public:
19 // Called when a child process host has connected to a child process.
20 virtual void BrowserChildProcessHostConnected(const ChildProcessData& data) {}
22 // Called after a ChildProcessHost is disconnected from the child process.
23 virtual void BrowserChildProcessHostDisconnected(
24 const ChildProcessData& data) {}
26 // Called when a child process disappears unexpectedly as a result of a crash.
27 // |exit_code| contains the exit code from the process.
28 virtual void BrowserChildProcessCrashed(const ChildProcessData& data,
29 int exit_code) {}
31 // Called when a child process disappears unexpectedly as a result of being
32 // killed.
33 // |exit_code| contains the exit code from the process.
34 virtual void BrowserChildProcessKilled(const ChildProcessData& data,
35 int exit_code) {}
37 // Called when an instance of a particular child is created in a page. If one
38 // page contains several regions rendered by the same child, this will be
39 // called once for each region during the page load.
40 virtual void BrowserChildProcessInstanceCreated(
41 const ChildProcessData& data) {}
43 protected:
44 // The observer can be destroyed on any thread.
45 virtual ~BrowserChildProcessObserver() {}
47 static void Add(BrowserChildProcessObserver* observer);
48 static void Remove(BrowserChildProcessObserver* observer);
51 } // namespace content
53 #endif // CONTENT_PUBLIC_BROWSER_BROWSER_CHILD_PROCESS_OBSERVER_H_