1 // Copyright 2013 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_SHELL_RENDERER_TEST_RUNNER_MOCKWEBMEDIASTREAMCENTER_H_
6 #define CONTENT_SHELL_RENDERER_TEST_RUNNER_MOCKWEBMEDIASTREAMCENTER_H_
8 #include "third_party/WebKit/public/platform/WebMediaStreamCenter.h"
10 #include "base/basictypes.h"
11 #include "content/shell/renderer/test_runner/TestCommon.h"
12 #include "content/shell/renderer/test_runner/WebTask.h"
15 class WebAudioSourceProvider
;
16 class WebMediaStreamCenterClient
;
19 namespace WebTestRunner
{
23 class MockWebMediaStreamCenter
: public blink::WebMediaStreamCenter
{
25 MockWebMediaStreamCenter(blink::WebMediaStreamCenterClient
*, TestInterfaces
*);
27 virtual bool getMediaStreamTrackSources(const blink::WebMediaStreamTrackSourcesRequest
&) OVERRIDE
;
28 virtual void didEnableMediaStreamTrack(const blink::WebMediaStreamTrack
&) OVERRIDE
;
29 virtual void didDisableMediaStreamTrack(const blink::WebMediaStreamTrack
&) OVERRIDE
;
30 virtual bool didAddMediaStreamTrack(const blink::WebMediaStream
&, const blink::WebMediaStreamTrack
&) OVERRIDE
;
31 virtual bool didRemoveMediaStreamTrack(const blink::WebMediaStream
&, const blink::WebMediaStreamTrack
&) OVERRIDE
;
32 virtual void didStopLocalMediaStream(const blink::WebMediaStream
&) OVERRIDE
;
33 virtual bool didStopMediaStreamTrack(const blink::WebMediaStreamTrack
&) OVERRIDE
;
34 virtual void didCreateMediaStream(blink::WebMediaStream
&) OVERRIDE
;
35 virtual blink::WebAudioSourceProvider
* createWebAudioSourceFromMediaStreamTrack(
36 const blink::WebMediaStreamTrack
&) OVERRIDE
;
38 // Task related methods
39 WebTaskList
* taskList() { return &m_taskList
; }
42 WebTaskList m_taskList
;
43 TestInterfaces
* m_interfaces
;
45 DISALLOW_COPY_AND_ASSIGN(MockWebMediaStreamCenter
);
50 #endif // CONTENT_SHELL_RENDERER_TEST_RUNNER_MOCKWEBMEDIASTREAMCENTER_H_