| 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_DEPENDENCY_FACTORY_H_ | 5 #ifndef CONTENT_RENDERER_MEDIA_MOCK_MEDIA_STREAM_DEPENDENCY_FACTORY_H_ |
| 6 #define CONTENT_RENDERER_MEDIA_MOCK_MEDIA_STREAM_DEPENDENCY_FACTORY_H_ | 6 #define CONTENT_RENDERER_MEDIA_MOCK_MEDIA_STREAM_DEPENDENCY_FACTORY_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| 11 #include "base/compiler_specific.h" | 11 #include "base/compiler_specific.h" |
| 12 #include "content/renderer/media/media_stream_dependency_factory.h" | 12 #include "content/renderer/media/media_stream_dependency_factory.h" |
| 13 | 13 |
| 14 namespace webrtc { | 14 namespace webrtc { |
| 15 | 15 |
| 16 class MockLocalVideoTrack : public LocalVideoTrackInterface { | 16 class MockLocalVideoTrack : public LocalVideoTrackInterface { |
| 17 public: | 17 public: |
| 18 explicit MockLocalVideoTrack(std::string label) | 18 explicit MockLocalVideoTrack(std::string label) |
| 19 : enabled_(false), | 19 : enabled_(false), |
| 20 label_(label), | 20 label_(label), |
| 21 renderer_(NULL) { | 21 renderer_(NULL) { |
| 22 } | 22 } |
| 23 virtual cricket::VideoCapturer* GetVideoCapture() OVERRIDE; | 23 virtual cricket::VideoCapturer* GetVideoCapture() OVERRIDE; |
| 24 virtual void SetRenderer(VideoRendererWrapperInterface* renderer) OVERRIDE; | 24 virtual void SetRenderer(VideoRendererWrapperInterface* renderer) OVERRIDE; |
| 25 virtual VideoRendererWrapperInterface* GetRenderer() OVERRIDE; | 25 virtual VideoRendererWrapperInterface* GetRenderer() OVERRIDE; |
| 26 virtual void AddRenderer(VideoRendererInterface* renderer) OVERRIDE; |
| 27 virtual void RemoveRenderer(VideoRendererInterface* renderer) OVERRIDE; |
| 28 virtual cricket::VideoRenderer* FrameInput() OVERRIDE; |
| 26 virtual std::string kind() const OVERRIDE; | 29 virtual std::string kind() const OVERRIDE; |
| 27 virtual std::string label() const OVERRIDE; | 30 virtual std::string label() const OVERRIDE; |
| 28 virtual bool enabled() const OVERRIDE; | 31 virtual bool enabled() const OVERRIDE; |
| 29 virtual TrackState state() const OVERRIDE; | 32 virtual TrackState state() const OVERRIDE; |
| 30 virtual bool set_enabled(bool enable) OVERRIDE; | 33 virtual bool set_enabled(bool enable) OVERRIDE; |
| 31 virtual bool set_state(TrackState new_state) OVERRIDE; | 34 virtual bool set_state(TrackState new_state) OVERRIDE; |
| 32 virtual void RegisterObserver(ObserverInterface* observer) OVERRIDE; | 35 virtual void RegisterObserver(ObserverInterface* observer) OVERRIDE; |
| 33 virtual void UnregisterObserver(ObserverInterface* observer) OVERRIDE; | 36 virtual void UnregisterObserver(ObserverInterface* observer) OVERRIDE; |
| 34 | 37 |
| 35 protected: | 38 protected: |
| (...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 105 const std::string& label, | 108 const std::string& label, |
| 106 const std::string& sdp) OVERRIDE; | 109 const std::string& sdp) OVERRIDE; |
| 107 | 110 |
| 108 private: | 111 private: |
| 109 bool mock_pc_factory_created_; | 112 bool mock_pc_factory_created_; |
| 110 | 113 |
| 111 DISALLOW_COPY_AND_ASSIGN(MockMediaStreamDependencyFactory); | 114 DISALLOW_COPY_AND_ASSIGN(MockMediaStreamDependencyFactory); |
| 112 }; | 115 }; |
| 113 | 116 |
| 114 #endif // CONTENT_RENDERER_MEDIA_MOCK_MEDIA_STREAM_DEPENDENCY_FACTORY_H_ | 117 #endif // CONTENT_RENDERER_MEDIA_MOCK_MEDIA_STREAM_DEPENDENCY_FACTORY_H_ |
| OLD | NEW |