1 // Copyright 2014 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_MOCK_WEB_MEDIA_STREAM_CENTER_H_
6 #define CONTENT_SHELL_RENDERER_TEST_RUNNER_MOCK_WEB_MEDIA_STREAM_CENTER_H_
8 #include "third_party/WebKit/public/platform/WebMediaStreamCenter.h"
10 #include "base/basictypes.h"
11 #include "content/shell/renderer/test_runner/web_task.h"
14 class WebAudioSourceProvider
;
15 class WebMediaStreamCenterClient
;
22 class MockWebMediaStreamCenter
: public blink::WebMediaStreamCenter
{
24 MockWebMediaStreamCenter(blink::WebMediaStreamCenterClient
* client
,
25 TestInterfaces
* interfaces
);
26 virtual ~MockWebMediaStreamCenter();
28 virtual void didEnableMediaStreamTrack(
29 const blink::WebMediaStreamTrack
& track
);
30 virtual void didDisableMediaStreamTrack(
31 const blink::WebMediaStreamTrack
& track
);
32 virtual bool didAddMediaStreamTrack(const blink::WebMediaStream
& stream
,
33 const blink::WebMediaStreamTrack
& track
);
34 virtual bool didRemoveMediaStreamTrack(
35 const blink::WebMediaStream
& stream
,
36 const blink::WebMediaStreamTrack
& track
);
37 virtual void didStopLocalMediaStream(const blink::WebMediaStream
& stream
);
38 virtual bool didStopMediaStreamTrack(const blink::WebMediaStreamTrack
& track
);
39 virtual void didCreateMediaStream(blink::WebMediaStream
& stream
);
40 virtual blink::WebAudioSourceProvider
*
41 createWebAudioSourceFromMediaStreamTrack(
42 const blink::WebMediaStreamTrack
& track
);
44 // Task related methods
45 WebTaskList
* mutable_task_list() { return &task_list_
; }
48 WebTaskList task_list_
;
49 TestInterfaces
* interfaces_
;
51 DISALLOW_COPY_AND_ASSIGN(MockWebMediaStreamCenter
);
54 } // namespace content
56 #endif // CONTENT_SHELL_RENDERER_TEST_RUNNER_MOCK_WEB_MEDIA_STREAM_CENTER_H_