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
) OVERRIDE
;
27 virtual void OverrideThreadForMessage(const IPC::Message
& message
,
28 BrowserThread::ID
* thread
) OVERRIDE
;
31 virtual ~PeerConnectionTrackerHost();
34 // Handlers for peer connection messages coming from the renderer.
35 void OnAddPeerConnection(const PeerConnectionInfo
& info
);
36 void OnRemovePeerConnection(int lid
);
37 void OnUpdatePeerConnection(
38 int lid
, const std::string
& type
, const std::string
& value
);
39 void OnAddStats(int lid
, const base::ListValue
& value
);
40 void OnGetUserMedia(const std::string
& origin
,
43 const std::string
& audio_constraints
,
44 const std::string
& video_constraints
);
46 int render_process_id_
;
48 DISALLOW_COPY_AND_ASSIGN(PeerConnectionTrackerHost
);
51 } // namespace content
53 #endif // CONTENT_BROWSER_RENDERER_HOST_MEDIA_PEER_CONNECTION_TRACKER_HOST_H_