| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_HANDLER_BASE_H_ | 5 #ifndef CONTENT_RENDERER_MEDIA_PEER_CONNECTION_HANDLER_BASE_H_ |
| 6 #define CONTENT_RENDERER_MEDIA_PEER_CONNECTION_HANDLER_BASE_H_ | 6 #define CONTENT_RENDERER_MEDIA_PEER_CONNECTION_HANDLER_BASE_H_ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| (...skipping 12 matching lines...) Expand all Loading... |
| 23 class CONTENT_EXPORT PeerConnectionHandlerBase | 23 class CONTENT_EXPORT PeerConnectionHandlerBase |
| 24 : NON_EXPORTED_BASE(public webrtc::PeerConnectionObserver) { | 24 : NON_EXPORTED_BASE(public webrtc::PeerConnectionObserver) { |
| 25 public: | 25 public: |
| 26 PeerConnectionHandlerBase( | 26 PeerConnectionHandlerBase( |
| 27 MediaStreamDependencyFactory* dependency_factory); | 27 MediaStreamDependencyFactory* dependency_factory); |
| 28 | 28 |
| 29 protected: | 29 protected: |
| 30 virtual ~PeerConnectionHandlerBase(); | 30 virtual ~PeerConnectionHandlerBase(); |
| 31 | 31 |
| 32 void AddStream(const WebKit::WebMediaStreamDescriptor& stream); | 32 void AddStream(const WebKit::WebMediaStreamDescriptor& stream); |
| 33 bool AddStream(const WebKit::WebMediaStreamDescriptor& stream, |
| 34 const webrtc::MediaConstraintsInterface* constraints); |
| 33 void RemoveStream(const WebKit::WebMediaStreamDescriptor& stream); | 35 void RemoveStream(const WebKit::WebMediaStreamDescriptor& stream); |
| 34 WebKit::WebMediaStreamDescriptor CreateWebKitStreamDescriptor( | 36 WebKit::WebMediaStreamDescriptor CreateWebKitStreamDescriptor( |
| 35 webrtc::MediaStreamInterface* stream); | 37 webrtc::MediaStreamInterface* stream); |
| 36 | 38 |
| 37 // dependency_factory_ is a raw pointer, and is valid for the lifetime of | 39 // dependency_factory_ is a raw pointer, and is valid for the lifetime of |
| 38 // MediaStreamImpl. | 40 // MediaStreamImpl. |
| 39 MediaStreamDependencyFactory* dependency_factory_; | 41 MediaStreamDependencyFactory* dependency_factory_; |
| 40 | 42 |
| 41 // native_peer_connection_ is the native PeerConnection object, | 43 // native_peer_connection_ is the native PeerConnection object, |
| 42 // it handles the ICE processing and media engine. | 44 // it handles the ICE processing and media engine. |
| 43 talk_base::scoped_refptr<webrtc::PeerConnectionInterface> | 45 talk_base::scoped_refptr<webrtc::PeerConnectionInterface> |
| 44 native_peer_connection_; | 46 native_peer_connection_; |
| 45 | 47 |
| 46 typedef std::map<webrtc::MediaStreamInterface*, | 48 typedef std::map<webrtc::MediaStreamInterface*, |
| 47 WebKit::WebMediaStreamDescriptor> RemoteStreamMap; | 49 WebKit::WebMediaStreamDescriptor> RemoteStreamMap; |
| 48 RemoteStreamMap remote_streams_; | 50 RemoteStreamMap remote_streams_; |
| 49 | 51 |
| 50 // The message loop we are created on and on which to make calls to WebKit. | 52 // The message loop we are created on and on which to make calls to WebKit. |
| 51 // This should be the render thread message loop. | 53 // This should be the render thread message loop. |
| 52 scoped_refptr<base::MessageLoopProxy> message_loop_proxy_; | 54 scoped_refptr<base::MessageLoopProxy> message_loop_proxy_; |
| 53 | 55 |
| 54 DISALLOW_COPY_AND_ASSIGN(PeerConnectionHandlerBase); | 56 DISALLOW_COPY_AND_ASSIGN(PeerConnectionHandlerBase); |
| 55 }; | 57 }; |
| 56 | 58 |
| 57 #endif // CONTENT_RENDERER_MEDIA_PEER_CONNECTION_HANDLER_BASE_H_ | 59 #endif // CONTENT_RENDERER_MEDIA_PEER_CONNECTION_HANDLER_BASE_H_ |
| OLD | NEW |