| 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_PEER_CONNECTION_TRACKER_H_ | 5 #ifndef CONTENT_RENDERER_MEDIA_PEER_CONNECTION_TRACKER_H_ |
| 6 #define CONTENT_RENDERER_MEDIA_PEER_CONNECTION_TRACKER_H_ | 6 #define CONTENT_RENDERER_MEDIA_PEER_CONNECTION_TRACKER_H_ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 | 9 |
| 10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
| 11 #include "base/macros.h" | 11 #include "base/macros.h" |
| 12 #include "base/memory/weak_ptr.h" | 12 #include "base/memory/weak_ptr.h" |
| 13 #include "base/threading/thread_checker.h" | 13 #include "base/threading/thread_checker.h" |
| 14 #include "content/public/renderer/render_thread_observer.h" | 14 #include "content/public/renderer/render_thread_observer.h" |
| 15 #include "ipc/ipc_platform_file.h" |
| 15 #include "third_party/WebKit/public/platform/WebMediaStream.h" | 16 #include "third_party/WebKit/public/platform/WebMediaStream.h" |
| 16 #include "third_party/WebKit/public/platform/WebRTCPeerConnectionHandlerClient.h
" | 17 #include "third_party/WebKit/public/platform/WebRTCPeerConnectionHandlerClient.h
" |
| 17 #include "third_party/WebKit/public/platform/WebRTCSessionDescription.h" | 18 #include "third_party/WebKit/public/platform/WebRTCSessionDescription.h" |
| 18 #include "third_party/webrtc/api/peerconnectioninterface.h" | 19 #include "third_party/webrtc/api/peerconnectioninterface.h" |
| 19 | 20 |
| 20 namespace blink { | 21 namespace blink { |
| 21 class WebFrame; | 22 class WebFrame; |
| 22 class WebMediaConstraints; | 23 class WebMediaConstraints; |
| 23 class WebRTCAnswerOptions; | 24 class WebRTCAnswerOptions; |
| 24 class WebRTCICECandidate; | 25 class WebRTCICECandidate; |
| (...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 179 // Looks up a handler in our map and if found, returns its ID. If the handler | 180 // Looks up a handler in our map and if found, returns its ID. If the handler |
| 180 // is not registered, the return value will be -1. | 181 // is not registered, the return value will be -1. |
| 181 int GetLocalIDForHandler(RTCPeerConnectionHandler* handler) const; | 182 int GetLocalIDForHandler(RTCPeerConnectionHandler* handler) const; |
| 182 | 183 |
| 183 // IPC Message handler for getting all stats. | 184 // IPC Message handler for getting all stats. |
| 184 void OnGetAllStats(); | 185 void OnGetAllStats(); |
| 185 | 186 |
| 186 // Called when the browser process reports a suspend event from the OS. | 187 // Called when the browser process reports a suspend event from the OS. |
| 187 void OnSuspend(); | 188 void OnSuspend(); |
| 188 | 189 |
| 190 // IPC Message handler for starting event log. |
| 191 void OnStartEventLog(int peer_connection_id, |
| 192 IPC::PlatformFileForTransit file); |
| 193 |
| 194 // IPC Message handler for stopping event log. |
| 195 void OnStopEventLog(int peer_connection_id); |
| 196 |
| 189 // Called to deliver an update to the host (PeerConnectionTrackerHost). | 197 // Called to deliver an update to the host (PeerConnectionTrackerHost). |
| 190 // |local_id| - The id of the registered RTCPeerConnectionHandler. | 198 // |local_id| - The id of the registered RTCPeerConnectionHandler. |
| 191 // Using an id instead of the hander pointer is done on purpose | 199 // Using an id instead of the hander pointer is done on purpose |
| 192 // to force doing the lookup before building the callback data | 200 // to force doing the lookup before building the callback data |
| 193 // in case the handler isn't registered. | 201 // in case the handler isn't registered. |
| 194 // |callback_type| - A string, most often static, that represents the type | 202 // |callback_type| - A string, most often static, that represents the type |
| 195 // of operation that the data stored in |value| comes from. | 203 // of operation that the data stored in |value| comes from. |
| 196 // E.g. "createOffer", "createAnswer", | 204 // E.g. "createOffer", "createAnswer", |
| 197 // "setRemoteDescription" etc. | 205 // "setRemoteDescription" etc. |
| 198 // |value| - A json serialized string containing all the information for the | 206 // |value| - A json serialized string containing all the information for the |
| (...skipping 12 matching lines...) Expand all Loading... |
| 211 int next_local_id_; | 219 int next_local_id_; |
| 212 base::ThreadChecker main_thread_; | 220 base::ThreadChecker main_thread_; |
| 213 RenderThread* send_target_for_test_; | 221 RenderThread* send_target_for_test_; |
| 214 | 222 |
| 215 DISALLOW_COPY_AND_ASSIGN(PeerConnectionTracker); | 223 DISALLOW_COPY_AND_ASSIGN(PeerConnectionTracker); |
| 216 }; | 224 }; |
| 217 | 225 |
| 218 } // namespace content | 226 } // namespace content |
| 219 | 227 |
| 220 #endif // CONTENT_RENDERER_MEDIA_PEER_CONNECTION_TRACKER_H_ | 228 #endif // CONTENT_RENDERER_MEDIA_PEER_CONNECTION_TRACKER_H_ |
| OLD | NEW |