| 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/renderer/media/media_stream_video_source.h" | 5 #include "content/renderer/media/media_stream_video_source.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <limits> | 8 #include <limits> |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| (...skipping 526 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 537 blink::WebString::fromUTF8(unsatisfied_constraint)); | 537 blink::WebString::fromUTF8(unsatisfied_constraint)); |
| 538 } | 538 } |
| 539 } | 539 } |
| 540 | 540 |
| 541 void MediaStreamVideoSource::SetReadyState( | 541 void MediaStreamVideoSource::SetReadyState( |
| 542 blink::WebMediaStreamSource::ReadyState state) { | 542 blink::WebMediaStreamSource::ReadyState state) { |
| 543 DVLOG(3) << "MediaStreamVideoSource::SetReadyState state " << state; | 543 DVLOG(3) << "MediaStreamVideoSource::SetReadyState state " << state; |
| 544 DCHECK(CalledOnValidThread()); | 544 DCHECK(CalledOnValidThread()); |
| 545 if (!owner().isNull()) | 545 if (!owner().isNull()) |
| 546 owner().setReadyState(state); | 546 owner().setReadyState(state); |
| 547 for (const auto& track : tracks_) | 547 for (auto* track : tracks_) |
| 548 track->OnReadyStateChanged(state); | 548 track->OnReadyStateChanged(state); |
| 549 } | 549 } |
| 550 | 550 |
| 551 void MediaStreamVideoSource::SetMutedState(bool muted_state) { | 551 void MediaStreamVideoSource::SetMutedState(bool muted_state) { |
| 552 DVLOG(3) << "MediaStreamVideoSource::SetMutedState state=" << muted_state; | 552 DVLOG(3) << "MediaStreamVideoSource::SetMutedState state=" << muted_state; |
| 553 DCHECK(CalledOnValidThread()); | 553 DCHECK(CalledOnValidThread()); |
| 554 if (!owner().isNull()) { | 554 if (!owner().isNull()) { |
| 555 owner().setReadyState(muted_state | 555 owner().setReadyState(muted_state |
| 556 ? blink::WebMediaStreamSource::ReadyStateMuted | 556 ? blink::WebMediaStreamSource::ReadyStateMuted |
| 557 : blink::WebMediaStreamSource::ReadyStateLive); | 557 : blink::WebMediaStreamSource::ReadyStateLive); |
| (...skipping 11 matching lines...) Expand all Loading... |
| 569 callback(callback) { | 569 callback(callback) { |
| 570 } | 570 } |
| 571 | 571 |
| 572 MediaStreamVideoSource::TrackDescriptor::TrackDescriptor( | 572 MediaStreamVideoSource::TrackDescriptor::TrackDescriptor( |
| 573 const TrackDescriptor& other) = default; | 573 const TrackDescriptor& other) = default; |
| 574 | 574 |
| 575 MediaStreamVideoSource::TrackDescriptor::~TrackDescriptor() { | 575 MediaStreamVideoSource::TrackDescriptor::~TrackDescriptor() { |
| 576 } | 576 } |
| 577 | 577 |
| 578 } // namespace content | 578 } // namespace content |
| OLD | NEW |