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

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: trybots Created 7 years, 10 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
OLDNEW
(Empty)
1 // Copyright (c) 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 "base/basictypes.h"
9 #include "content/common/content_export.h"
10
11 namespace content {
12
13 struct ChildProcessData;
14
15 // An observer API implemented by classes which are interested
16 // in browser child process events.
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) {}
21
22 // Called after a ChildProcessHost is disconnected from the child process.
23 virtual void BrowserChildProcessHostDisconnected(
24 const ChildProcessData& data) {}
25
26 // Called when a child process disappears unexpectedly as a result of a crash.
27 virtual void BrowserChildProcessCrashed(const ChildProcessData& data) {}
28
29 // 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
31 // called once for each region during the page load.
32 virtual void BrowserChildProcessInstanceCreated(
33 const ChildProcessData& data) {}
34
35 protected:
36 // The observer can be created and destroyed on any thread.
37 BrowserChildProcessObserver() {}
38 virtual ~BrowserChildProcessObserver() {}
39
40 void StartObservingBrowserChildProcesses();
jam 2013/02/19 18:07:09 nit: make these be static methods (see content API
Paweł Hajdan Jr. 2013/02/20 12:11:42 Done. It wasn't obvious to me what the document wa
41 void StopObservingBrowserChildProcesses();
42
43 private:
44 DISALLOW_COPY_AND_ASSIGN(BrowserChildProcessObserver);
jam 2013/02/19 18:07:09 nit: get rid of
Paweł Hajdan Jr. 2013/02/20 12:11:42 Done.
45 };
46
47 } // namespace content
48
49 #endif // CONTENT_PUBLIC_BROWSER_BROWSER_CHILD_PROCESS_OBSERVER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698