| 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_MEDIA_STREAM_CENTER_H_ | 5 #ifndef CONTENT_RENDERER_MEDIA_MEDIA_STREAM_CENTER_H_ |
| 6 #define CONTENT_RENDERER_MEDIA_MEDIA_STREAM_CENTER_H_ | 6 #define CONTENT_RENDERER_MEDIA_MEDIA_STREAM_CENTER_H_ |
| 7 | 7 |
| 8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
| 9 #include "base/compiler_specific.h" | 9 #include "base/compiler_specific.h" |
| 10 #include "content/common/content_export.h" | 10 #include "content/common/content_export.h" |
| 11 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebMediaStre
amCenter.h" | 11 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebMediaStre
amCenter.h" |
| 12 | 12 |
| 13 namespace WebKit { | 13 namespace WebKit { |
| 14 class WebMediaStreamCenterClient; | 14 class WebMediaStreamCenterClient; |
| 15 } | 15 } |
| 16 | 16 |
| 17 class MediaStreamDependencyFactory; |
| 18 |
| 17 namespace content { | 19 namespace content { |
| 18 | 20 |
| 19 class CONTENT_EXPORT MediaStreamCenter | 21 class CONTENT_EXPORT MediaStreamCenter |
| 20 : NON_EXPORTED_BASE(public WebKit::WebMediaStreamCenter) { | 22 : NON_EXPORTED_BASE(public WebKit::WebMediaStreamCenter) { |
| 21 public: | 23 public: |
| 22 explicit MediaStreamCenter(WebKit::WebMediaStreamCenterClient*); | 24 MediaStreamCenter(WebKit::WebMediaStreamCenterClient*, |
| 25 MediaStreamDependencyFactory* factory); |
| 23 | 26 |
| 24 virtual void queryMediaStreamSources( | 27 virtual void queryMediaStreamSources( |
| 25 const WebKit::WebMediaStreamSourcesRequest& request) OVERRIDE; | 28 const WebKit::WebMediaStreamSourcesRequest& request) OVERRIDE; |
| 26 | 29 |
| 27 virtual void didEnableMediaStreamTrack( | 30 virtual void didEnableMediaStreamTrack( |
| 28 const WebKit::WebMediaStreamDescriptor& stream, | 31 const WebKit::WebMediaStreamDescriptor& stream, |
| 29 const WebKit::WebMediaStreamComponent& component) OVERRIDE; | 32 const WebKit::WebMediaStreamComponent& component) OVERRIDE; |
| 30 | 33 |
| 31 virtual void didDisableMediaStreamTrack( | 34 virtual void didDisableMediaStreamTrack( |
| 32 const WebKit::WebMediaStreamDescriptor& stream, | 35 const WebKit::WebMediaStreamDescriptor& stream, |
| 33 const WebKit::WebMediaStreamComponent& component) OVERRIDE; | 36 const WebKit::WebMediaStreamComponent& component) OVERRIDE; |
| 34 | 37 |
| 35 virtual void didStopLocalMediaStream( | 38 virtual void didStopLocalMediaStream( |
| 36 const WebKit::WebMediaStreamDescriptor& stream) OVERRIDE; | 39 const WebKit::WebMediaStreamDescriptor& stream) OVERRIDE; |
| 37 | 40 |
| 38 virtual void didCreateMediaStream( | 41 virtual void didCreateMediaStream( |
| 39 WebKit::WebMediaStreamDescriptor& stream) OVERRIDE; | 42 WebKit::WebMediaStreamDescriptor& stream) OVERRIDE; |
| 40 | 43 |
| 41 virtual WebKit::WebString constructSDP( | 44 virtual WebKit::WebString constructSDP( |
| 42 const WebKit::WebICECandidateDescriptor& candidate) OVERRIDE; | 45 const WebKit::WebICECandidateDescriptor& candidate) OVERRIDE; |
| 43 | 46 |
| 44 virtual WebKit::WebString constructSDP( | 47 virtual WebKit::WebString constructSDP( |
| 45 const WebKit::WebSessionDescriptionDescriptor& description) OVERRIDE; | 48 const WebKit::WebSessionDescriptionDescriptor& description) OVERRIDE; |
| 46 | 49 |
| 47 private: | 50 private: |
| 51 // |rtc_factory_| is a weak pointer and is owned by the RenderThreadImpl. |
| 52 // It is valid as long as RenderThreadImpl exist. |
| 53 MediaStreamDependencyFactory* rtc_factory_; |
| 54 |
| 48 DISALLOW_COPY_AND_ASSIGN(MediaStreamCenter); | 55 DISALLOW_COPY_AND_ASSIGN(MediaStreamCenter); |
| 49 }; | 56 }; |
| 50 | 57 |
| 51 } // namespace content | 58 } // namespace content |
| 52 | 59 |
| 53 #endif // CONTENT_RENDERER_MEDIA_MEDIA_STREAM_CENTER_H_ | 60 #endif // CONTENT_RENDERER_MEDIA_MEDIA_STREAM_CENTER_H_ |
| OLD | NEW |