| 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" |
| (...skipping 10 matching lines...) Expand all Loading... |
| 21 | 21 |
| 22 class WebRTCEventLogHost; | 22 class WebRTCEventLogHost; |
| 23 | 23 |
| 24 // This class is the host for PeerConnectionTracker in the browser process | 24 // This class is the host for PeerConnectionTracker in the browser process |
| 25 // managed by RenderProcessHostImpl. It receives PeerConnection events from | 25 // managed by RenderProcessHostImpl. It receives PeerConnection events from |
| 26 // PeerConnectionTracker as IPC messages that it forwards to WebRTCInternals. | 26 // PeerConnectionTracker as IPC messages that it forwards to WebRTCInternals. |
| 27 // It also forwards browser process events to PeerConnectionTracker via IPC. | 27 // It also forwards browser process events to PeerConnectionTracker via IPC. |
| 28 class PeerConnectionTrackerHost : public BrowserMessageFilter, | 28 class PeerConnectionTrackerHost : public BrowserMessageFilter, |
| 29 public base::PowerObserver { | 29 public base::PowerObserver { |
| 30 public: | 30 public: |
| 31 PeerConnectionTrackerHost(int render_process_id, | 31 PeerConnectionTrackerHost( |
| 32 WebRTCEventLogHost* event_log_host); | 32 int render_process_id, |
| 33 const base::WeakPtr<WebRTCEventLogHost>& event_log_host); |
| 33 | 34 |
| 34 // content::BrowserMessageFilter override. | 35 // content::BrowserMessageFilter override. |
| 35 bool OnMessageReceived(const IPC::Message& message) override; | 36 bool OnMessageReceived(const IPC::Message& message) override; |
| 36 void OverrideThreadForMessage(const IPC::Message& message, | 37 void OverrideThreadForMessage(const IPC::Message& message, |
| 37 BrowserThread::ID* thread) override; | 38 BrowserThread::ID* thread) override; |
| 38 void OnChannelConnected(int32_t peer_pid) override; | 39 void OnChannelConnected(int32_t peer_pid) override; |
| 39 void OnChannelClosing() override; | 40 void OnChannelClosing() override; |
| 40 | 41 |
| 41 // base::PowerObserver override. | 42 // base::PowerObserver override. |
| 42 void OnSuspend() override; | 43 void OnSuspend() override; |
| (...skipping 10 matching lines...) Expand all Loading... |
| 53 void OnAddStats(int lid, const base::ListValue& value); | 54 void OnAddStats(int lid, const base::ListValue& value); |
| 54 void OnGetUserMedia(const std::string& origin, | 55 void OnGetUserMedia(const std::string& origin, |
| 55 bool audio, | 56 bool audio, |
| 56 bool video, | 57 bool video, |
| 57 const std::string& audio_constraints, | 58 const std::string& audio_constraints, |
| 58 const std::string& video_constraints); | 59 const std::string& video_constraints); |
| 59 void SendOnSuspendOnUIThread(); | 60 void SendOnSuspendOnUIThread(); |
| 60 | 61 |
| 61 int render_process_id_; | 62 int render_process_id_; |
| 62 | 63 |
| 63 WebRTCEventLogHost* const event_log_host_; | 64 base::WeakPtr<WebRTCEventLogHost> event_log_host_; |
| 64 | 65 |
| 65 DISALLOW_COPY_AND_ASSIGN(PeerConnectionTrackerHost); | 66 DISALLOW_COPY_AND_ASSIGN(PeerConnectionTrackerHost); |
| 66 }; | 67 }; |
| 67 | 68 |
| 68 } // namespace content | 69 } // namespace content |
| 69 | 70 |
| 70 #endif // CONTENT_BROWSER_RENDERER_HOST_MEDIA_PEER_CONNECTION_TRACKER_HOST_H_ | 71 #endif // CONTENT_BROWSER_RENDERER_HOST_MEDIA_PEER_CONNECTION_TRACKER_HOST_H_ |
| OLD | NEW |