Fix build break
[chromium-blink-merge.git] / content / renderer / media / mock_media_stream_dispatcher.h
blob39d341087e835034a90120758963ef90184ab7bd
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_MOCK_MEDIA_STREAM_DISPATCHER_H_
6 #define CONTENT_RENDERER_MEDIA_MOCK_MEDIA_STREAM_DISPATCHER_H_
8 #include <string>
10 #include "content/renderer/media/media_stream_dispatcher.h"
11 #include "googleurl/src/gurl.h"
13 namespace content {
15 // This class is a mock implementation of MediaStreamDispatcher.
16 class MockMediaStreamDispatcher : public MediaStreamDispatcher {
17 public:
18 MockMediaStreamDispatcher();
19 virtual ~MockMediaStreamDispatcher();
21 virtual void GenerateStream(
22 int request_id,
23 const base::WeakPtr<MediaStreamDispatcherEventHandler>& event_handler,
24 const StreamOptions& components,
25 const GURL& url) OVERRIDE;
26 virtual void CancelGenerateStream(int request_id) OVERRIDE;
27 virtual void StopStream(const std::string& label) OVERRIDE;
28 virtual bool IsStream(const std::string& label) OVERRIDE;
29 virtual int video_session_id(const std::string& label, int index) OVERRIDE;
30 virtual int audio_session_id(const std::string& label, int index) OVERRIDE;
32 int request_id() const { return request_id_; }
33 int request_stream_counter() const { return request_stream_counter_; }
34 int stop_stream_counter() const { return stop_stream_counter_; }
35 const std::string& stream_label() const { return stream_label_;}
36 StreamDeviceInfoArray audio_array() const { return audio_array_; }
37 StreamDeviceInfoArray video_array() const { return video_array_; }
39 private:
40 int request_id_;
41 base::WeakPtr<MediaStreamDispatcherEventHandler> event_handler_;
42 int request_stream_counter_;
43 int stop_stream_counter_;
45 std::string stream_label_;
46 StreamDeviceInfoArray audio_array_;
47 StreamDeviceInfoArray video_array_;
49 DISALLOW_COPY_AND_ASSIGN(MockMediaStreamDispatcher);
52 } // namespace content
54 #endif // CONTENT_RENDERER_MEDIA_MOCK_MEDIA_STREAM_DISPATCHER_H_