Battery Status API: add UMA logging for Linux.
[chromium-blink-merge.git] / content / browser / renderer_host / media / peer_connection_tracker_host.h
blob6a411e8ba007b0919d12b59f99dd722dc304826c
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;
12 namespace base {
13 class ListValue;
14 } // namespace base
16 namespace content {
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 {
22 public:
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;
30 protected:
31 virtual ~PeerConnectionTrackerHost();
33 private:
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,
41 bool audio,
42 bool video,
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_