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

Unified Diff: content/browser/renderer_host/media/peer_connection_tracker_host.h

Issue 482333003: Reland r290125: Close all active PeerConnections upon OS suspend (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: remove semi Created 6 years, 4 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
« no previous file with comments | « no previous file | content/browser/renderer_host/media/peer_connection_tracker_host.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/renderer_host/media/peer_connection_tracker_host.h
diff --git a/content/browser/renderer_host/media/peer_connection_tracker_host.h b/content/browser/renderer_host/media/peer_connection_tracker_host.h
index 6a411e8ba007b0919d12b59f99dd722dc304826c..d5cfc83bea5a1fd8a80b9b7c33b6d839f1091bed 100644
--- a/content/browser/renderer_host/media/peer_connection_tracker_host.h
+++ b/content/browser/renderer_host/media/peer_connection_tracker_host.h
@@ -5,6 +5,7 @@
#ifndef CONTENT_BROWSER_RENDERER_HOST_MEDIA_PEER_CONNECTION_TRACKER_HOST_H_
#define CONTENT_BROWSER_RENDERER_HOST_MEDIA_PEER_CONNECTION_TRACKER_HOST_H_
+#include "base/power_monitor/power_observer.h"
#include "content/public/browser/browser_message_filter.h"
struct PeerConnectionInfo;
@@ -16,9 +17,11 @@ class ListValue;
namespace content {
// This class is the host for PeerConnectionTracker in the browser process
-// managed by RenderProcessHostImpl. It passes IPC messages between
-// WebRTCInternals and PeerConnectionTracker.
-class PeerConnectionTrackerHost : public BrowserMessageFilter {
+// managed by RenderProcessHostImpl. It receives PeerConnection events from
+// PeerConnectionTracker as IPC messages that it forwards to WebRTCInternals.
+// It also forwards browser process events to PeerConnectionTracker via IPC.
+class PeerConnectionTrackerHost : public BrowserMessageFilter,
+ public base::PowerObserver {
public:
PeerConnectionTrackerHost(int render_process_id);
@@ -27,6 +30,9 @@ class PeerConnectionTrackerHost : public BrowserMessageFilter {
virtual void OverrideThreadForMessage(const IPC::Message& message,
BrowserThread::ID* thread) OVERRIDE;
+ // base::PowerObserver override.
+ virtual void OnSuspend() OVERRIDE;
+
protected:
virtual ~PeerConnectionTrackerHost();
« no previous file with comments | « no previous file | content/browser/renderer_host/media/peer_connection_tracker_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698