Re-subimission of https://codereview.chromium.org/1041213003/
[chromium-blink-merge.git] / content / renderer / media / media_stream_source.cc
blob8db26024403334efc43050ce36a75bc06301362b
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
3 // found in the LICENSE file.
5 #include "content/renderer/media/media_stream_source.h"
7 #include "base/callback_helpers.h"
9 namespace content {
11 const char MediaStreamSource::kSourceId[] = "sourceId";
13 MediaStreamSource::MediaStreamSource() {
16 MediaStreamSource::~MediaStreamSource() {}
18 void MediaStreamSource::StopSource() {
19 DoStopSource();
20 if (!stop_callback_.is_null())
21 base::ResetAndReturn(&stop_callback_).Run(owner());
23 owner().setReadyState(blink::WebMediaStreamSource::ReadyStateEnded);
26 } // namespace content