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

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

Issue 1228993005: Be a little more precise in the wording of comments for process death. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: tweak Created 5 years, 5 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
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_RENDER_PROCESS_HOST_OBSERVER_H_ 5 #ifndef CONTENT_PUBLIC_BROWSER_RENDER_PROCESS_HOST_OBSERVER_H_
6 #define CONTENT_PUBLIC_BROWSER_RENDER_PROCESS_HOST_OBSERVER_H_ 6 #define CONTENT_PUBLIC_BROWSER_RENDER_PROCESS_HOST_OBSERVER_H_
7 7
8 #include "base/process/kill.h" 8 #include "base/process/kill.h"
9 #include "base/process/process_handle.h" 9 #include "base/process/process_handle.h"
10 #include "content/common/content_export.h" 10 #include "content/common/content_export.h"
11 11
12 namespace content { 12 namespace content {
13 13
14 class RenderProcessHost; 14 class RenderProcessHost;
15 15
16 // An observer API implemented by classes which are interested 16 // An observer API implemented by classes which are interested
17 // in RenderProcessHost lifecycle events. 17 // in RenderProcessHost lifecycle events.
18 class CONTENT_EXPORT RenderProcessHostObserver { 18 class CONTENT_EXPORT RenderProcessHostObserver {
19 public: 19 public:
20 // This method is invoked when a render process exited (either normally or 20 // This method is invoked when the process of the observed RenderProcessHost
21 // with a crash). To determine if the process closed normally or crashed, 21 // exits (either normally or with a crash). To determine if the process closed
22 // examine the |status| parameter. 22 // normally or crashed, examine the |status| parameter.
23 // 23 //
24 // Note that this is equivalent to WebContentsObserver::RenderProcessGone(). 24 // This will cause a call to WebContentsObserver::RenderProcessGone() for
25 // active renderer processes; for code that needs to be a WebContentsObserver
nasko 2015/07/10 07:48:54 This isn't quite correct I think. Last time I poke
Avi (use Gerrit) 2015/07/10 15:29:20 I see that. WebContentsImpl::RenderViewTerminated
26 // anyway, consider whether that API might be a better choice.
25 virtual void RenderProcessExited(RenderProcessHost* host, 27 virtual void RenderProcessExited(RenderProcessHost* host,
26 base::TerminationStatus status, 28 base::TerminationStatus status,
27 int exit_code) {} 29 int exit_code) {}
28 30
29 // This method is invoked when the observed RenderProcessHost itself is 31 // This method is invoked when the observed RenderProcessHost itself is
30 // destroyed. This is guaranteed to be the last call made to the observer. 32 // destroyed. This is guaranteed to be the last call made to the observer.
31 virtual void RenderProcessHostDestroyed(RenderProcessHost* host) {} 33 virtual void RenderProcessHostDestroyed(RenderProcessHost* host) {}
32 34
33 protected: 35 protected:
34 virtual ~RenderProcessHostObserver() {} 36 virtual ~RenderProcessHostObserver() {}
35 }; 37 };
36 38
37 } // namespace content 39 } // namespace content
38 40
39 #endif // CONTENT_PUBLIC_BROWSER_RENDER_PROCESS_HOST_OBSERVER_H_ 41 #endif // CONTENT_PUBLIC_BROWSER_RENDER_PROCESS_HOST_OBSERVER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698