| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef CONTENT_RENDERER_MEDIA_MOCK_MEDIA_STREAM_DISPATCHER_H_ | 5 #ifndef CONTENT_RENDERER_MEDIA_MOCK_MEDIA_STREAM_DISPATCHER_H_ |
| 6 #define CONTENT_RENDERER_MEDIA_MOCK_MEDIA_STREAM_DISPATCHER_H_ | 6 #define CONTENT_RENDERER_MEDIA_MOCK_MEDIA_STREAM_DISPATCHER_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/macros.h" | 10 #include "base/macros.h" |
| 11 #include "content/renderer/media/media_stream_dispatcher.h" | 11 #include "content/renderer/media/media_stream_dispatcher.h" |
| 12 #include "url/origin.h" | 12 #include "url/origin.h" |
| 13 | 13 |
| 14 namespace content { | 14 namespace content { |
| 15 | 15 |
| 16 // This class is a mock implementation of MediaStreamDispatcher. | 16 // This class is a mock implementation of MediaStreamDispatcher. |
| 17 class MockMediaStreamDispatcher : public MediaStreamDispatcher { | 17 class MockMediaStreamDispatcher : public MediaStreamDispatcher { |
| 18 public: | 18 public: |
| 19 MockMediaStreamDispatcher(); | 19 MockMediaStreamDispatcher(); |
| 20 ~MockMediaStreamDispatcher() override; | 20 ~MockMediaStreamDispatcher() override; |
| 21 | 21 |
| 22 void GenerateStream( | 22 void GenerateStream( |
| 23 int request_id, | 23 int request_id, |
| 24 const base::WeakPtr<MediaStreamDispatcherEventHandler>& event_handler, | 24 const base::WeakPtr<MediaStreamDispatcherEventHandler>& event_handler, |
| 25 const StreamControls& controls, | 25 const StreamControls& controls, |
| 26 const url::Origin& security_origin, | 26 const url::Origin& url) override; |
| 27 bool is_procesing_user_gesture) override; | |
| 28 void CancelGenerateStream( | 27 void CancelGenerateStream( |
| 29 int request_id, | 28 int request_id, |
| 30 const base::WeakPtr<MediaStreamDispatcherEventHandler>& event_handler) | 29 const base::WeakPtr<MediaStreamDispatcherEventHandler>& event_handler) |
| 31 override; | 30 override; |
| 32 void StopStreamDevice(const StreamDeviceInfo& device_info) override; | 31 void StopStreamDevice(const StreamDeviceInfo& device_info) override; |
| 33 bool IsStream(const std::string& label) override; | 32 bool IsStream(const std::string& label) override; |
| 34 int video_session_id(const std::string& label, int index) override; | 33 int video_session_id(const std::string& label, int index) override; |
| 35 int audio_session_id(const std::string& label, int index) override; | 34 int audio_session_id(const std::string& label, int index) override; |
| 36 | 35 |
| 37 int audio_input_request_id() const { return audio_input_request_id_; } | 36 int audio_input_request_id() const { return audio_input_request_id_; } |
| (...skipping 26 matching lines...) Expand all Loading... |
| 64 bool test_same_id_; | 63 bool test_same_id_; |
| 65 StreamDeviceInfoArray audio_input_array_; | 64 StreamDeviceInfoArray audio_input_array_; |
| 66 StreamDeviceInfoArray video_array_; | 65 StreamDeviceInfoArray video_array_; |
| 67 | 66 |
| 68 DISALLOW_COPY_AND_ASSIGN(MockMediaStreamDispatcher); | 67 DISALLOW_COPY_AND_ASSIGN(MockMediaStreamDispatcher); |
| 69 }; | 68 }; |
| 70 | 69 |
| 71 } // namespace content | 70 } // namespace content |
| 72 | 71 |
| 73 #endif // CONTENT_RENDERER_MEDIA_MOCK_MEDIA_STREAM_DISPATCHER_H_ | 72 #endif // CONTENT_RENDERER_MEDIA_MOCK_MEDIA_STREAM_DISPATCHER_H_ |
| OLD | NEW |