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

Unified Diff: content/browser/media/webrtc_internals.h

Issue 12212089: content: convert child process notifications to observer usage (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fixes 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 side-by-side diff with in-line comments
Download patch
Index: content/browser/media/webrtc_internals.h
diff --git a/content/browser/media/webrtc_internals.h b/content/browser/media/webrtc_internals.h
index 402b6435aa06cdeabd3f6670efb94ca61987a30c..f466aebe4f53358acc6fb4fe0ac8b35e36130914 100644
--- a/content/browser/media/webrtc_internals.h
+++ b/content/browser/media/webrtc_internals.h
@@ -10,6 +10,7 @@
#include "base/process.h"
#include "base/values.h"
#include "content/common/content_export.h"
+#include "content/public/browser/browser_child_process_observer.h"
#include "content/public/browser/notification_observer.h"
#include "content/public/browser/notification_registrar.h"
@@ -20,7 +21,8 @@ class WebRTCInternalsUIObserver;
// It collects peer connection infomation from the renderers,
// forwards the data to WebRTCInternalsUIObserver and
// sends data collecting commands to the renderers.
-class CONTENT_EXPORT WebRTCInternals : public NotificationObserver{
+class CONTENT_EXPORT WebRTCInternals : public BrowserChildProcessObserver,
+ public NotificationObserver{
public:
static WebRTCInternals* GetInstance();
@@ -63,6 +65,10 @@ class CONTENT_EXPORT WebRTCInternals : public NotificationObserver{
// Sends all update data to the observers.
void SendAllUpdates();
+ // BrowserChildProcessObserver implementation.
+ virtual void BrowserChildProcessCrashed(
+ const ChildProcessData& data) OVERRIDE;
+
private:
friend struct DefaultSingletonTraits<WebRTCInternals>;
@@ -76,6 +82,9 @@ class CONTENT_EXPORT WebRTCInternals : public NotificationObserver{
const NotificationSource& source,
const NotificationDetails& details) OVERRIDE;
+ // Called when a renderer exits (including crashes).
+ void OnRendererExit(int render_process_id);
+
ObserverList<WebRTCInternalsUIObserver> observers_;
// |peer_connection_data_| is a list containing all the PeerConnection

Powered by Google App Engine
This is Rietveld 408576698