summaryrefslogtreecommitdiffstats
path: root/content/renderer/media/media_stream_source.cc
blob: 8db26024403334efc43050ce36a75bc06301362b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
// Copyright 2014 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include "content/renderer/media/media_stream_source.h"

#include "base/callback_helpers.h"

namespace content {

const char MediaStreamSource::kSourceId[] = "sourceId";

MediaStreamSource::MediaStreamSource() {
}

MediaStreamSource::~MediaStreamSource() {}

void MediaStreamSource::StopSource() {
  DoStopSource();
  if (!stop_callback_.is_null())
    base::ResetAndReturn(&stop_callback_).Run(owner());

  owner().setReadyState(blink::WebMediaStreamSource::ReadyStateEnded);
}

}  // namespace content