| 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_RENDERER_MEDIA_PEERCONNECTION_TRACKER_H_ | 5 #ifndef CONTENT_RENDERER_MEDIA_PEERCONNECTION_TRACKER_H_ |
| 6 #define CONTENT_RENDERER_MEDIA_PEERCONNECTION_TRACKER_H_ | 6 #define CONTENT_RENDERER_MEDIA_PEERCONNECTION_TRACKER_H_ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 | 9 |
| 10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
| (...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 154 const blink::WebUserMediaRequest& user_media_request); | 154 const blink::WebUserMediaRequest& user_media_request); |
| 155 | 155 |
| 156 private: | 156 private: |
| 157 // Assign a local ID to a peer connection so that the browser process can | 157 // Assign a local ID to a peer connection so that the browser process can |
| 158 // uniquely identify a peer connection in the renderer process. | 158 // uniquely identify a peer connection in the renderer process. |
| 159 int GetNextLocalID(); | 159 int GetNextLocalID(); |
| 160 | 160 |
| 161 // IPC Message handler for getting all stats. | 161 // IPC Message handler for getting all stats. |
| 162 void OnGetAllStats(); | 162 void OnGetAllStats(); |
| 163 | 163 |
| 164 // Called when the browser process reports a suspend event from the OS. |
| 165 void OnSuspend(); |
| 166 |
| 164 void SendPeerConnectionUpdate(RTCPeerConnectionHandler* pc_handler, | 167 void SendPeerConnectionUpdate(RTCPeerConnectionHandler* pc_handler, |
| 165 const std::string& callback_type, | 168 const std::string& callback_type, |
| 166 const std::string& value); | 169 const std::string& value); |
| 167 | 170 |
| 168 // This map stores the local ID assigned to each RTCPeerConnectionHandler. | 171 // This map stores the local ID assigned to each RTCPeerConnectionHandler. |
| 169 typedef std::map<RTCPeerConnectionHandler*, int> PeerConnectionIdMap; | 172 typedef std::map<RTCPeerConnectionHandler*, int> PeerConnectionIdMap; |
| 170 PeerConnectionIdMap peer_connection_id_map_; | 173 PeerConnectionIdMap peer_connection_id_map_; |
| 171 | 174 |
| 172 // This keeps track of the next available local ID. | 175 // This keeps track of the next available local ID. |
| 173 int next_lid_; | 176 int next_lid_; |
| 174 | 177 |
| 175 DISALLOW_COPY_AND_ASSIGN(PeerConnectionTracker); | 178 DISALLOW_COPY_AND_ASSIGN(PeerConnectionTracker); |
| 176 }; | 179 }; |
| 177 | 180 |
| 178 } // namespace content | 181 } // namespace content |
| 179 | 182 |
| 180 #endif // CONTENT_RENDERER_MEDIA_PEERCONNECTION_TRACKER_H_ | 183 #endif // CONTENT_RENDERER_MEDIA_PEERCONNECTION_TRACKER_H_ |
| OLD | NEW |