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

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

Issue 12212089: content: convert child process notifications to observer usage (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: private Created 7 years, 9 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 | Annotate | Revision Log
« no previous file with comments | « content/content_browser.gypi ('k') | content/public/browser/browser_child_process_observer.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
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.
4
5 #ifndef CONTENT_PUBLIC_BROWSER_BROWSER_CHILD_PROCESS_OBSERVER_H_
6 #define CONTENT_PUBLIC_BROWSER_BROWSER_CHILD_PROCESS_OBSERVER_H_
7
8 #include "content/common/content_export.h"
9
10 namespace content {
11
12 struct ChildProcessData;
13
14 // An observer API implemented by classes which are interested
15 // in browser child process events.
16 class CONTENT_EXPORT BrowserChildProcessObserver {
17 public:
18 // Called when a child process host has connected to a child process.
19 virtual void BrowserChildProcessHostConnected(const ChildProcessData& data) {}
20
21 // Called after a ChildProcessHost is disconnected from the child process.
22 virtual void BrowserChildProcessHostDisconnected(
23 const ChildProcessData& data) {}
24
25 // Called when a child process disappears unexpectedly as a result of a crash.
26 virtual void BrowserChildProcessCrashed(const ChildProcessData& data) {}
27
28 // Called when an instance of a particular child is created in a page. If one
29 // page contains several regions rendered by the same child, this will be
30 // called once for each region during the page load.
31 virtual void BrowserChildProcessInstanceCreated(
32 const ChildProcessData& data) {}
33
34 protected:
35 // The observer can be destroyed on any thread.
36 virtual ~BrowserChildProcessObserver() {}
37
38 static void Add(BrowserChildProcessObserver* observer);
39 static void Remove(BrowserChildProcessObserver* observer);
40 };
41
42 } // namespace content
43
44 #endif // CONTENT_PUBLIC_BROWSER_BROWSER_CHILD_PROCESS_OBSERVER_H_
OLDNEW
« no previous file with comments | « content/content_browser.gypi ('k') | content/public/browser/browser_child_process_observer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698