OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef CONTENT_BROWSER_RENDERER_HOST_MEDIA_PEER_CONNECTION_TRACKER_HOST_H_ | 5 #ifndef CONTENT_BROWSER_RENDERER_HOST_MEDIA_PEER_CONNECTION_TRACKER_HOST_H_ |
6 #define CONTENT_BROWSER_RENDERER_HOST_MEDIA_PEER_CONNECTION_TRACKER_HOST_H_ | 6 #define CONTENT_BROWSER_RENDERER_HOST_MEDIA_PEER_CONNECTION_TRACKER_HOST_H_ |
7 | 7 |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include "base/macros.h" | 10 #include "base/macros.h" |
11 #include "base/power_monitor/power_observer.h" | 11 #include "base/power_monitor/power_observer.h" |
12 #include "content/public/browser/browser_message_filter.h" | 12 #include "content/public/browser/browser_message_filter.h" |
13 | 13 |
14 struct PeerConnectionInfo; | 14 struct PeerConnectionInfo; |
15 | 15 |
16 namespace base { | 16 namespace base { |
17 class ListValue; | 17 class ListValue; |
18 } // namespace base | 18 } // namespace base |
19 | 19 |
20 namespace content { | 20 namespace content { |
21 | 21 |
| 22 class WebRTCEventLogHost; |
| 23 |
22 // This class is the host for PeerConnectionTracker in the browser process | 24 // This class is the host for PeerConnectionTracker in the browser process |
23 // managed by RenderProcessHostImpl. It receives PeerConnection events from | 25 // managed by RenderProcessHostImpl. It receives PeerConnection events from |
24 // PeerConnectionTracker as IPC messages that it forwards to WebRTCInternals. | 26 // PeerConnectionTracker as IPC messages that it forwards to WebRTCInternals. |
25 // It also forwards browser process events to PeerConnectionTracker via IPC. | 27 // It also forwards browser process events to PeerConnectionTracker via IPC. |
26 class PeerConnectionTrackerHost : public BrowserMessageFilter, | 28 class PeerConnectionTrackerHost : public BrowserMessageFilter, |
27 public base::PowerObserver { | 29 public base::PowerObserver { |
28 public: | 30 public: |
29 explicit PeerConnectionTrackerHost(int render_process_id); | 31 PeerConnectionTrackerHost(int render_process_id, |
| 32 WebRTCEventLogHost* event_log_host); |
30 | 33 |
31 // content::BrowserMessageFilter override. | 34 // content::BrowserMessageFilter override. |
32 bool OnMessageReceived(const IPC::Message& message) override; | 35 bool OnMessageReceived(const IPC::Message& message) override; |
33 void OverrideThreadForMessage(const IPC::Message& message, | 36 void OverrideThreadForMessage(const IPC::Message& message, |
34 BrowserThread::ID* thread) override; | 37 BrowserThread::ID* thread) override; |
35 void OnChannelConnected(int32_t peer_pid) override; | 38 void OnChannelConnected(int32_t peer_pid) override; |
36 void OnChannelClosing() override; | 39 void OnChannelClosing() override; |
37 | 40 |
38 // base::PowerObserver override. | 41 // base::PowerObserver override. |
39 void OnSuspend() override; | 42 void OnSuspend() override; |
(...skipping 10 matching lines...) Expand all Loading... |
50 void OnAddStats(int lid, const base::ListValue& value); | 53 void OnAddStats(int lid, const base::ListValue& value); |
51 void OnGetUserMedia(const std::string& origin, | 54 void OnGetUserMedia(const std::string& origin, |
52 bool audio, | 55 bool audio, |
53 bool video, | 56 bool video, |
54 const std::string& audio_constraints, | 57 const std::string& audio_constraints, |
55 const std::string& video_constraints); | 58 const std::string& video_constraints); |
56 void SendOnSuspendOnUIThread(); | 59 void SendOnSuspendOnUIThread(); |
57 | 60 |
58 int render_process_id_; | 61 int render_process_id_; |
59 | 62 |
| 63 WebRTCEventLogHost* const event_log_host_; |
| 64 |
60 DISALLOW_COPY_AND_ASSIGN(PeerConnectionTrackerHost); | 65 DISALLOW_COPY_AND_ASSIGN(PeerConnectionTrackerHost); |
61 }; | 66 }; |
62 | 67 |
63 } // namespace content | 68 } // namespace content |
64 | 69 |
65 #endif // CONTENT_BROWSER_RENDERER_HOST_MEDIA_PEER_CONNECTION_TRACKER_HOST_H_ | 70 #endif // CONTENT_BROWSER_RENDERER_HOST_MEDIA_PEER_CONNECTION_TRACKER_HOST_H_ |
OLD | NEW |