| 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& url) override; | 26 const url::Origin& security_origin, |
| 27 bool is_procesing_user_gesture) override; |
| 27 void CancelGenerateStream( | 28 void CancelGenerateStream( |
| 28 int request_id, | 29 int request_id, |
| 29 const base::WeakPtr<MediaStreamDispatcherEventHandler>& event_handler) | 30 const base::WeakPtr<MediaStreamDispatcherEventHandler>& event_handler) |
| 30 override; | 31 override; |
| 31 void StopStreamDevice(const StreamDeviceInfo& device_info) override; | 32 void StopStreamDevice(const StreamDeviceInfo& device_info) override; |
| 32 bool IsStream(const std::string& label) override; | 33 bool IsStream(const std::string& label) override; |
| 33 int video_session_id(const std::string& label, int index) override; | 34 int video_session_id(const std::string& label, int index) override; |
| 34 int audio_session_id(const std::string& label, int index) override; | 35 int audio_session_id(const std::string& label, int index) override; |
| 35 | 36 |
| 36 int audio_input_request_id() const { return audio_input_request_id_; } | 37 int audio_input_request_id() const { return audio_input_request_id_; } |
| (...skipping 26 matching lines...) Expand all Loading... |
| 63 bool test_same_id_; | 64 bool test_same_id_; |
| 64 StreamDeviceInfoArray audio_input_array_; | 65 StreamDeviceInfoArray audio_input_array_; |
| 65 StreamDeviceInfoArray video_array_; | 66 StreamDeviceInfoArray video_array_; |
| 66 | 67 |
| 67 DISALLOW_COPY_AND_ASSIGN(MockMediaStreamDispatcher); | 68 DISALLOW_COPY_AND_ASSIGN(MockMediaStreamDispatcher); |
| 68 }; | 69 }; |
| 69 | 70 |
| 70 } // namespace content | 71 } // namespace content |
| 71 | 72 |
| 72 #endif // CONTENT_RENDERER_MEDIA_MOCK_MEDIA_STREAM_DISPATCHER_H_ | 73 #endif // CONTENT_RENDERER_MEDIA_MOCK_MEDIA_STREAM_DISPATCHER_H_ |
| OLD | NEW |