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 |
11 #include "base/memory/ref_counted.h" | 11 #include "base/memory/ref_counted.h" |
12 #include "base/message_loop_proxy.h" | 12 #include "base/message_loop_proxy.h" |
13 #include "content/common/content_export.h" | 13 #include "content/common/content_export.h" |
14 #include "third_party/libjingle/source/talk/app/webrtc/mediastream.h" | 14 #include "third_party/libjingle/source/talk/app/webrtc/mediastream.h" |
15 #include "third_party/libjingle/source/talk/app/webrtc/peerconnectioninterface.h
" | 15 #include "third_party/libjingle/source/talk/app/webrtc/peerconnectioninterface.h
" |
16 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebMediaStre
amDescriptor.h" | 16 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebMediaStre
amDescriptor.h" |
17 | 17 |
18 namespace content { | 18 namespace content { |
19 class MediaStreamDependencyFactory; | 19 class MediaStreamDependencyFactory; |
20 | 20 |
21 // PeerConnectionHandlerBase is the base class of a delegate for the | 21 // PeerConnectionHandlerBase is the base class of a delegate for the |
22 // PeerConnection API messages going between WebKit and native | 22 // PeerConnection API messages going between WebKit and native |
23 // PeerConnection in libjingle. | 23 // PeerConnection in libjingle. |
24 class CONTENT_EXPORT PeerConnectionHandlerBase | 24 class CONTENT_EXPORT PeerConnectionHandlerBase |
25 : NON_EXPORTED_BASE(public webrtc::PeerConnectionObserver) { | 25 : NON_EXPORTED_BASE(public webrtc::PeerConnectionObserver) { |
26 public: | 26 public: |
27 PeerConnectionHandlerBase( | 27 explicit PeerConnectionHandlerBase( |
28 MediaStreamDependencyFactory* dependency_factory); | 28 MediaStreamDependencyFactory* dependency_factory); |
29 | 29 |
30 protected: | 30 protected: |
31 virtual ~PeerConnectionHandlerBase(); | 31 virtual ~PeerConnectionHandlerBase(); |
32 | 32 |
33 void AddStream(const WebKit::WebMediaStreamDescriptor& stream); | 33 void AddStream(const WebKit::WebMediaStreamDescriptor& stream); |
34 bool AddStream(const WebKit::WebMediaStreamDescriptor& stream, | 34 bool AddStream(const WebKit::WebMediaStreamDescriptor& stream, |
35 const webrtc::MediaConstraintsInterface* constraints); | 35 const webrtc::MediaConstraintsInterface* constraints); |
36 void RemoveStream(const WebKit::WebMediaStreamDescriptor& stream); | 36 void RemoveStream(const WebKit::WebMediaStreamDescriptor& stream); |
37 WebKit::WebMediaStreamDescriptor CreateWebKitStreamDescriptor( | 37 WebKit::WebMediaStreamDescriptor CreateWebKitStreamDescriptor( |
(...skipping 17 matching lines...) Expand all Loading... |
55 // The message loop we are created on and on which to make calls to WebKit. | 55 // The message loop we are created on and on which to make calls to WebKit. |
56 // This should be the render thread message loop. | 56 // This should be the render thread message loop. |
57 scoped_refptr<base::MessageLoopProxy> message_loop_proxy_; | 57 scoped_refptr<base::MessageLoopProxy> message_loop_proxy_; |
58 | 58 |
59 DISALLOW_COPY_AND_ASSIGN(PeerConnectionHandlerBase); | 59 DISALLOW_COPY_AND_ASSIGN(PeerConnectionHandlerBase); |
60 }; | 60 }; |
61 | 61 |
62 } // namespace content | 62 } // namespace content |
63 | 63 |
64 #endif // CONTENT_RENDERER_MEDIA_PEER_CONNECTION_HANDLER_BASE_H_ | 64 #endif // CONTENT_RENDERER_MEDIA_PEER_CONNECTION_HANDLER_BASE_H_ |
OLD | NEW |