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" |
11 #include "content/public/renderer/render_process_observer.h" | 11 #include "content/public/renderer/render_process_observer.h" |
12 #include "third_party/WebKit/Source/Platform/chromium/public/WebMediaStream.h" | 12 #include "third_party/WebKit/Source/Platform/chromium/public/WebMediaStream.h" |
13 #include "third_party/WebKit/Source/Platform/chromium/public/WebRTCPeerConnectio
nHandlerClient.h" | 13 #include "third_party/WebKit/Source/Platform/chromium/public/WebRTCPeerConnectio
nHandlerClient.h" |
14 #include "third_party/libjingle/source/talk/app/webrtc/jsep.h" | 14 #include "third_party/libjingle/source/talk/app/webrtc/peerconnectioninterface.h
" |
15 | 15 |
16 namespace WebKit { | 16 namespace WebKit { |
17 class WebFrame; | 17 class WebFrame; |
18 class WebRTCICECandidate; | 18 class WebRTCICECandidate; |
19 class WebString; | 19 class WebString; |
20 } // namespace WebKit | 20 } // namespace WebKit |
21 | 21 |
22 namespace webrtc { | 22 namespace webrtc { |
23 class DataChannelInterface; | 23 class DataChannelInterface; |
24 } // namespace webrtc | 24 } // namespace webrtc |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
59 | 59 |
60 // Sends an update when a PeerConnection has been created in Javascript. | 60 // Sends an update when a PeerConnection has been created in Javascript. |
61 // This should be called once and only once for each PeerConnection. | 61 // This should be called once and only once for each PeerConnection. |
62 // The |pc_handler| is the handler object associated with the PeerConnection, | 62 // The |pc_handler| is the handler object associated with the PeerConnection, |
63 // the |servers| are the server configurations used to establish the | 63 // the |servers| are the server configurations used to establish the |
64 // connection, the |constraints| are the media constraints used to initialize | 64 // connection, the |constraints| are the media constraints used to initialize |
65 // the PeerConnection, the |frame| is the WebFrame object representing the | 65 // the PeerConnection, the |frame| is the WebFrame object representing the |
66 // page in which the PeerConnection is created. | 66 // page in which the PeerConnection is created. |
67 void RegisterPeerConnection( | 67 void RegisterPeerConnection( |
68 RTCPeerConnectionHandler* pc_handler, | 68 RTCPeerConnectionHandler* pc_handler, |
69 const std::vector<webrtc::JsepInterface::IceServer>& servers, | 69 const std::vector<webrtc::PeerConnectionInterface::IceServer>& servers, |
70 const RTCMediaConstraints& constraints, | 70 const RTCMediaConstraints& constraints, |
71 const WebKit::WebFrame* frame); | 71 const WebKit::WebFrame* frame); |
72 | 72 |
73 // Sends an update when a PeerConnection has been destroyed. | 73 // Sends an update when a PeerConnection has been destroyed. |
74 virtual void UnregisterPeerConnection(RTCPeerConnectionHandler* pc_handler); | 74 virtual void UnregisterPeerConnection(RTCPeerConnectionHandler* pc_handler); |
75 | 75 |
76 // Sends an update when createOffer/createAnswer has been called. | 76 // Sends an update when createOffer/createAnswer has been called. |
77 // The |pc_handler| is the handler object associated with the PeerConnection, | 77 // The |pc_handler| is the handler object associated with the PeerConnection, |
78 // the |constraints| is the media constraints used to create the offer/answer. | 78 // the |constraints| is the media constraints used to create the offer/answer. |
79 virtual void TrackCreateOffer(RTCPeerConnectionHandler* pc_handler, | 79 virtual void TrackCreateOffer(RTCPeerConnectionHandler* pc_handler, |
80 const RTCMediaConstraints& constraints); | 80 const RTCMediaConstraints& constraints); |
81 virtual void TrackCreateAnswer(RTCPeerConnectionHandler* pc_handler, | 81 virtual void TrackCreateAnswer(RTCPeerConnectionHandler* pc_handler, |
82 const RTCMediaConstraints& constraints); | 82 const RTCMediaConstraints& constraints); |
83 | 83 |
84 // Sends an update when setLocalDescription or setRemoteDescription is called. | 84 // Sends an update when setLocalDescription or setRemoteDescription is called. |
85 virtual void TrackSetSessionDescription( | 85 virtual void TrackSetSessionDescription( |
86 RTCPeerConnectionHandler* pc_handler, | 86 RTCPeerConnectionHandler* pc_handler, |
87 const webrtc::SessionDescriptionInterface* desc, Source source); | 87 const webrtc::SessionDescriptionInterface* desc, Source source); |
88 | 88 |
89 // Sends an update when Ice candidates are updated. | 89 // Sends an update when Ice candidates are updated. |
90 virtual void TrackUpdateIce( | 90 virtual void TrackUpdateIce( |
91 RTCPeerConnectionHandler* pc_handler, | 91 RTCPeerConnectionHandler* pc_handler, |
92 const std::vector<webrtc::JsepInterface::IceServer>& servers, | 92 const std::vector<webrtc::PeerConnectionInterface::IceServer>& servers, |
93 const RTCMediaConstraints& options); | 93 const RTCMediaConstraints& options); |
94 | 94 |
95 // Sends an update when an Ice candidate is added. | 95 // Sends an update when an Ice candidate is added. |
96 virtual void TrackAddIceCandidate( | 96 virtual void TrackAddIceCandidate( |
97 RTCPeerConnectionHandler* pc_handler, | 97 RTCPeerConnectionHandler* pc_handler, |
98 const WebKit::WebRTCICECandidate& candidate, Source source); | 98 const WebKit::WebRTCICECandidate& candidate, Source source); |
99 | 99 |
100 // Sends an update when a media stream is added. | 100 // Sends an update when a media stream is added. |
101 virtual void TrackAddStream( | 101 virtual void TrackAddStream( |
102 RTCPeerConnectionHandler* pc_handler, | 102 RTCPeerConnectionHandler* pc_handler, |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
152 | 152 |
153 // This keeps track of the next available local ID. | 153 // This keeps track of the next available local ID. |
154 int next_lid_; | 154 int next_lid_; |
155 | 155 |
156 DISALLOW_COPY_AND_ASSIGN(PeerConnectionTracker); | 156 DISALLOW_COPY_AND_ASSIGN(PeerConnectionTracker); |
157 }; | 157 }; |
158 | 158 |
159 } // namespace content | 159 } // namespace content |
160 | 160 |
161 #endif // CONTENT_RENDERER_MEDIA_PEERCONNECTION_TRACKER_H_ | 161 #endif // CONTENT_RENDERER_MEDIA_PEERCONNECTION_TRACKER_H_ |
OLD | NEW |