| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 #include "content/shell/renderer/test_runner/mock_web_media_stream_center.h" | 5 #include "content/shell/renderer/test_runner/mock_web_media_stream_center.h" |
| 6 | 6 |
| 7 #include "base/logging.h" | 7 #include "base/logging.h" |
| 8 #include "content/shell/renderer/test_runner/test_interfaces.h" | 8 #include "content/shell/renderer/test_runner/test_interfaces.h" |
| 9 #include "content/shell/renderer/test_runner/web_test_delegate.h" | 9 #include "content/shell/renderer/test_runner/web_test_delegate.h" |
| 10 #include "third_party/WebKit/public/platform/WebAudioDestinationConsumer.h" | 10 #include "third_party/WebKit/public/platform/WebAudioDestinationConsumer.h" |
| (...skipping 10 matching lines...) Expand all Loading... |
| 21 | 21 |
| 22 namespace { | 22 namespace { |
| 23 class NewTrackTask : public WebMethodTask<MockWebMediaStreamCenter> { | 23 class NewTrackTask : public WebMethodTask<MockWebMediaStreamCenter> { |
| 24 public: | 24 public: |
| 25 NewTrackTask(MockWebMediaStreamCenter* object, | 25 NewTrackTask(MockWebMediaStreamCenter* object, |
| 26 const blink::WebMediaStream& stream) | 26 const blink::WebMediaStream& stream) |
| 27 : WebMethodTask<MockWebMediaStreamCenter>(object), stream_(stream) { | 27 : WebMethodTask<MockWebMediaStreamCenter>(object), stream_(stream) { |
| 28 DCHECK(!stream_.isNull()); | 28 DCHECK(!stream_.isNull()); |
| 29 } | 29 } |
| 30 | 30 |
| 31 virtual ~NewTrackTask() {} | 31 ~NewTrackTask() override {} |
| 32 | 32 |
| 33 virtual void RunIfValid() override { | 33 void RunIfValid() override { |
| 34 blink::WebMediaStreamSource source; | 34 blink::WebMediaStreamSource source; |
| 35 blink::WebMediaStreamTrack track; | 35 blink::WebMediaStreamTrack track; |
| 36 source.initialize("MagicVideoDevice#1", | 36 source.initialize("MagicVideoDevice#1", |
| 37 blink::WebMediaStreamSource::TypeVideo, | 37 blink::WebMediaStreamSource::TypeVideo, |
| 38 "Magic video track"); | 38 "Magic video track"); |
| 39 track.initialize(source); | 39 track.initialize(source); |
| 40 stream_.addTrack(track); | 40 stream_.addTrack(track); |
| 41 } | 41 } |
| 42 | 42 |
| 43 private: | 43 private: |
| (...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 127 interfaces_->GetDelegate()->PostTask(new NewTrackTask(this, stream)); | 127 interfaces_->GetDelegate()->PostTask(new NewTrackTask(this, stream)); |
| 128 } | 128 } |
| 129 | 129 |
| 130 blink::WebAudioSourceProvider* | 130 blink::WebAudioSourceProvider* |
| 131 MockWebMediaStreamCenter::createWebAudioSourceFromMediaStreamTrack( | 131 MockWebMediaStreamCenter::createWebAudioSourceFromMediaStreamTrack( |
| 132 const blink::WebMediaStreamTrack& track) { | 132 const blink::WebMediaStreamTrack& track) { |
| 133 return NULL; | 133 return NULL; |
| 134 } | 134 } |
| 135 | 135 |
| 136 } // namespace content | 136 } // namespace content |
| OLD | NEW |