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
3 // found in the LICENSE file.
5 #ifndef CONTENT_RENDERER_MEDIA_MEDIA_STREAM_CENTER_H_
6 #define CONTENT_RENDERER_MEDIA_MEDIA_STREAM_CENTER_H_
8 #include "base/basictypes.h"
9 #include "base/compiler_specific.h"
10 #include "content/common/content_export.h"
11 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebMediaStreamCenter.h"
14 class WebMediaStreamCenterClient
;
18 class MediaStreamDependencyFactory
;
20 class CONTENT_EXPORT MediaStreamCenter
21 : NON_EXPORTED_BASE(public WebKit::WebMediaStreamCenter
) {
23 MediaStreamCenter(WebKit::WebMediaStreamCenterClient
* client
,
24 MediaStreamDependencyFactory
* factory
);
26 virtual void queryMediaStreamSources(
27 const WebKit::WebMediaStreamSourcesRequest
& request
) OVERRIDE
;
29 virtual void didEnableMediaStreamTrack(
30 const WebKit::WebMediaStreamDescriptor
& stream
,
31 const WebKit::WebMediaStreamComponent
& component
) OVERRIDE
;
33 virtual void didDisableMediaStreamTrack(
34 const WebKit::WebMediaStreamDescriptor
& stream
,
35 const WebKit::WebMediaStreamComponent
& component
) OVERRIDE
;
37 virtual void didStopLocalMediaStream(
38 const WebKit::WebMediaStreamDescriptor
& stream
) OVERRIDE
;
40 virtual void didCreateMediaStream(
41 WebKit::WebMediaStreamDescriptor
& stream
) OVERRIDE
;
44 // |rtc_factory_| is a weak pointer and is owned by the RenderThreadImpl.
45 // It is valid as long as RenderThreadImpl exist.
46 MediaStreamDependencyFactory
* rtc_factory_
;
48 DISALLOW_COPY_AND_ASSIGN(MediaStreamCenter
);
51 } // namespace content
53 #endif // CONTENT_RENDERER_MEDIA_MEDIA_STREAM_CENTER_H_