| 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 "base/memory/weak_ptr.h" |
| 11 #include "base/threading/thread_checker.h" | 12 #include "base/threading/thread_checker.h" |
| 12 #include "content/public/renderer/render_process_observer.h" | 13 #include "content/public/renderer/render_process_observer.h" |
| 13 #include "third_party/WebKit/public/platform/WebMediaStream.h" | 14 #include "third_party/WebKit/public/platform/WebMediaStream.h" |
| 14 #include "third_party/WebKit/public/platform/WebRTCPeerConnectionHandlerClient.h
" | 15 #include "third_party/WebKit/public/platform/WebRTCPeerConnectionHandlerClient.h
" |
| 15 #include "third_party/WebKit/public/platform/WebRTCSessionDescription.h" | 16 #include "third_party/WebKit/public/platform/WebRTCSessionDescription.h" |
| 16 #include "third_party/libjingle/source/talk/app/webrtc/peerconnectioninterface.h
" | 17 #include "third_party/libjingle/source/talk/app/webrtc/peerconnectioninterface.h
" |
| 17 | 18 |
| 18 namespace blink { | 19 namespace blink { |
| 19 class WebFrame; | 20 class WebFrame; |
| 20 class WebRTCICECandidate; | 21 class WebRTCICECandidate; |
| 21 class WebString; | 22 class WebString; |
| 22 class WebRTCSessionDescription; | 23 class WebRTCSessionDescription; |
| 23 class WebUserMediaRequest; | 24 class WebUserMediaRequest; |
| 24 } // namespace blink | 25 } // namespace blink |
| 25 | 26 |
| 26 namespace webrtc { | 27 namespace webrtc { |
| 27 class DataChannelInterface; | 28 class DataChannelInterface; |
| 28 } // namespace webrtc | 29 } // namespace webrtc |
| 29 | 30 |
| 30 namespace content { | 31 namespace content { |
| 31 class RTCMediaConstraints; | 32 class RTCMediaConstraints; |
| 32 class RTCPeerConnectionHandler; | 33 class RTCPeerConnectionHandler; |
| 33 | 34 |
| 34 // This class collects data about each peer connection, | 35 // This class collects data about each peer connection, |
| 35 // sends it to the browser process, and handles messages | 36 // sends it to the browser process, and handles messages |
| 36 // from the browser process. | 37 // from the browser process. |
| 37 class CONTENT_EXPORT PeerConnectionTracker : public RenderProcessObserver { | 38 class CONTENT_EXPORT PeerConnectionTracker |
| 39 : public RenderProcessObserver, |
| 40 public base::SupportsWeakPtr<PeerConnectionTracker> { |
| 38 public: | 41 public: |
| 39 PeerConnectionTracker(); | 42 PeerConnectionTracker(); |
| 40 ~PeerConnectionTracker() override; | 43 ~PeerConnectionTracker() override; |
| 41 | 44 |
| 42 enum Source { | 45 enum Source { |
| 43 SOURCE_LOCAL, | 46 SOURCE_LOCAL, |
| 44 SOURCE_REMOTE | 47 SOURCE_REMOTE |
| 45 }; | 48 }; |
| 46 | 49 |
| 47 enum Action { | 50 enum Action { |
| (...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 178 // This keeps track of the next available local ID. | 181 // This keeps track of the next available local ID. |
| 179 int next_lid_; | 182 int next_lid_; |
| 180 base::ThreadChecker main_thread_; | 183 base::ThreadChecker main_thread_; |
| 181 | 184 |
| 182 DISALLOW_COPY_AND_ASSIGN(PeerConnectionTracker); | 185 DISALLOW_COPY_AND_ASSIGN(PeerConnectionTracker); |
| 183 }; | 186 }; |
| 184 | 187 |
| 185 } // namespace content | 188 } // namespace content |
| 186 | 189 |
| 187 #endif // CONTENT_RENDERER_MEDIA_PEERCONNECTION_TRACKER_H_ | 190 #endif // CONTENT_RENDERER_MEDIA_PEERCONNECTION_TRACKER_H_ |
| OLD | NEW |