Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(327)

Side by Side Diff: third_party/WebKit/Source/platform/exported/WebMediaPlayerSource.cpp

Issue 1815033003: Add srcObject attribute of type MediaStream to HTMLMediaElement. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: philipj's comments Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright 2016 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 "public/platform/WebMediaPlayerSource.h"
6
7 namespace blink {
8
9 WebMediaPlayerSource::WebMediaPlayerSource()
10 {
11 }
12
13 WebMediaPlayerSource::WebMediaPlayerSource(const WebURL& url)
14 : m_url(url)
15 {
16 }
17
18 WebMediaPlayerSource::WebMediaPlayerSource(const WebMediaStream& mediaStream)
19 : m_mediaStream(mediaStream)
20 {
21 }
22
23 WebMediaPlayerSource::~WebMediaPlayerSource()
24 {
25 m_mediaStream.reset();
26 }
27
28 bool WebMediaPlayerSource::isURL() const
29 {
30 return !m_url.isEmpty();
31 }
32
33 WebURL WebMediaPlayerSource::getAsURL() const
34 {
35 return m_url;
36 }
37
38 bool WebMediaPlayerSource::isMediaProviderObject() const
39 {
40 return isMediaStream();
41 }
42
43 bool WebMediaPlayerSource::isMediaStream() const
44 {
45 return !m_mediaStream.isNull();
46 }
47
48 WebMediaStream WebMediaPlayerSource::getAsMediaStream() const
49 {
50 return m_mediaStream;
51 }
52
53 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698