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.
5 #ifndef CONTENT_BROWSER_RENDERER_HOST_MEDIA_PEER_CONNECTION_TRACKER_HOST_H_
6 #define CONTENT_BROWSER_RENDERER_HOST_MEDIA_PEER_CONNECTION_TRACKER_HOST_H_
8 #include "content/public/browser/browser_message_filter.h"
10 struct PeerConnectionInfo
;
18 // This class is the host for PeerConnectionTracker in the browser process
19 // managed by RenderProcessHostImpl. It passes IPC messages between
20 // WebRTCInternals and PeerConnectionTracker.
21 class PeerConnectionTrackerHost
: public BrowserMessageFilter
{
23 PeerConnectionTrackerHost(int render_process_id
);
25 // content::BrowserMessageFilter override.
26 virtual bool OnMessageReceived(const IPC::Message
& message
,
27 bool* message_was_ok
) OVERRIDE
;
28 virtual void OverrideThreadForMessage(const IPC::Message
& message
,
29 BrowserThread::ID
* thread
) OVERRIDE
;
32 virtual ~PeerConnectionTrackerHost();
35 // Handlers for peer connection messages coming from the renderer.
36 void OnAddPeerConnection(const PeerConnectionInfo
& info
);
37 void OnRemovePeerConnection(int lid
);
38 void OnUpdatePeerConnection(
39 int lid
, const std::string
& type
, const std::string
& value
);
40 void OnAddStats(int lid
, const base::ListValue
& value
);
42 int render_process_id_
;
44 DISALLOW_COPY_AND_ASSIGN(PeerConnectionTrackerHost
);
47 } // namespace content
49 #endif // CONTENT_BROWSER_RENDERER_HOST_MEDIA_PEER_CONNECTION_TRACKER_HOST_H_