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 #include "content/renderer/media/mock_media_stream_dispatcher.h"
7 MockMediaStreamDispatcher::MockMediaStreamDispatcher()
8 : MediaStreamDispatcher(NULL
),
12 stop_stream_counter_(0) {
15 MockMediaStreamDispatcher::~MockMediaStreamDispatcher() {}
17 void MockMediaStreamDispatcher::GenerateStream(
19 MediaStreamDispatcherEventHandler
* event_handler
,
20 media_stream::StreamOptions components
,
21 const std::string
& security_origin
) {
22 request_id_
= request_id
;
23 event_handler_
= event_handler
;
25 components_
= new media_stream::StreamOptions(components
.audio
,
26 components
.video_option
);
27 security_origin_
= security_origin
;
30 void MockMediaStreamDispatcher::StopStream(const std::string
& label
) {
31 ++stop_stream_counter_
;
34 bool MockMediaStreamDispatcher::IsStream(const std::string
& label
) {
39 int MockMediaStreamDispatcher::video_session_id(const std::string
& label
,
45 int MockMediaStreamDispatcher::audio_session_id(const std::string
& label
,