Index: remoting/protocol/webrtc_video_stream.cc |
diff --git a/remoting/protocol/webrtc_video_stream.cc b/remoting/protocol/webrtc_video_stream.cc |
index 84edbfb267ac4577814ab041592c9176bf06ce92..dc24ecb934cc3994088a94ec6781fa3ab231393b 100644 |
--- a/remoting/protocol/webrtc_video_stream.cc |
+++ b/remoting/protocol/webrtc_video_stream.cc |
@@ -166,9 +166,9 @@ void WebrtcVideoStream::SetLosslessColor(bool want_lossless) { |
NOTIMPLEMENTED(); |
} |
-void WebrtcVideoStream::SetSizeCallback(const SizeCallback& size_callback) { |
+void WebrtcVideoStream::SetObserver(Observer* observer) { |
DCHECK(thread_checker_.CalledOnValidThread()); |
- size_callback_ = size_callback; |
+ observer_ = observer; |
} |
void WebrtcVideoStream::SetKeyFrameRequest() { |
@@ -230,8 +230,8 @@ void WebrtcVideoStream::OnCaptureResult( |
if (!frame_size_.equals(frame->size()) || !frame_dpi_.equals(dpi)) { |
frame_size_ = frame->size(); |
frame_dpi_ = dpi; |
- if (!size_callback_.is_null()) |
- size_callback_.Run(frame_size_, frame_dpi_); |
+ if (observer_) |
+ observer_->OnVideoSizeChanged(this, frame_size_, frame_dpi_); |
} |
encode_pending_ = true; |
base::PostTaskAndReplyWithResult( |