Upstream version 7.36.149.0
[platform/framework/web/crosswalk.git] / src / content / renderer / media / media_stream_source.cc
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.
4
5 #include "content/renderer/media/media_stream_source.h"
6
7 #include "base/callback_helpers.h"
8
9 namespace content {
10
11 MediaStreamSource::MediaStreamSource() {
12 }
13
14 MediaStreamSource::~MediaStreamSource() {}
15
16 void MediaStreamSource::StopSource() {
17   DoStopSource();
18   if (!stop_callback_.is_null())
19     base::ResetAndReturn(&stop_callback_).Run(owner());
20
21   owner().setReadyState(blink::WebMediaStreamSource::ReadyStateEnded);
22 }
23
24 }  // namespace content