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

Side by Side Diff: Source/platform/mediastream/MediaStreamCenter.cpp

Issue 631813002: Remove obsolete path of getSources. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebase Created 6 years, 2 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 | Annotate | Revision Log
« no previous file with comments | « Source/platform/mediastream/MediaStreamCenter.h ('k') | public/platform/WebMediaStreamCenter.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2011 Ericsson AB. All rights reserved. 2 * Copyright (C) 2011 Ericsson AB. All rights reserved.
3 * Copyright (C) 2012 Google Inc. All rights reserved. 3 * Copyright (C) 2012 Google Inc. All rights reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions 6 * modification, are permitted provided that the following conditions
7 * are met: 7 * are met:
8 * 8 *
9 * 1. Redistributions of source code must retain the above copyright 9 * 1. Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 23 matching lines...) Expand all
34 #include "platform/mediastream/MediaStreamCenter.h" 34 #include "platform/mediastream/MediaStreamCenter.h"
35 35
36 #include "platform/mediastream/MediaStreamDescriptor.h" 36 #include "platform/mediastream/MediaStreamDescriptor.h"
37 #include "platform/mediastream/MediaStreamTrackSourcesRequest.h" 37 #include "platform/mediastream/MediaStreamTrackSourcesRequest.h"
38 #include "platform/mediastream/MediaStreamWebAudioSource.h" 38 #include "platform/mediastream/MediaStreamWebAudioSource.h"
39 #include "public/platform/Platform.h" 39 #include "public/platform/Platform.h"
40 #include "public/platform/WebAudioSourceProvider.h" 40 #include "public/platform/WebAudioSourceProvider.h"
41 #include "public/platform/WebMediaStream.h" 41 #include "public/platform/WebMediaStream.h"
42 #include "public/platform/WebMediaStreamCenter.h" 42 #include "public/platform/WebMediaStreamCenter.h"
43 #include "public/platform/WebMediaStreamTrack.h" 43 #include "public/platform/WebMediaStreamTrack.h"
44 #include "public/platform/WebMediaStreamTrackSourcesRequest.h"
45 #include "wtf/Assertions.h" 44 #include "wtf/Assertions.h"
46 #include "wtf/MainThread.h" 45 #include "wtf/MainThread.h"
47 #include "wtf/PassOwnPtr.h" 46 #include "wtf/PassOwnPtr.h"
48 47
49 namespace blink { 48 namespace blink {
50 49
51 MediaStreamCenter& MediaStreamCenter::instance() 50 MediaStreamCenter& MediaStreamCenter::instance()
52 { 51 {
53 ASSERT(isMainThread()); 52 ASSERT(isMainThread());
54 DEFINE_STATIC_LOCAL(MediaStreamCenter, center, ()); 53 DEFINE_STATIC_LOCAL(MediaStreamCenter, center, ());
55 return center; 54 return center;
56 } 55 }
57 56
58 MediaStreamCenter::MediaStreamCenter() 57 MediaStreamCenter::MediaStreamCenter()
59 : m_private(adoptPtr(blink::Platform::current()->createMediaStreamCenter(thi s))) 58 : m_private(adoptPtr(blink::Platform::current()->createMediaStreamCenter(thi s)))
60 { 59 {
61 } 60 }
62 61
63 MediaStreamCenter::~MediaStreamCenter() 62 MediaStreamCenter::~MediaStreamCenter()
64 { 63 {
65 } 64 }
66 65
67 bool MediaStreamCenter::getMediaStreamTrackSources(MediaStreamTrackSourcesReques t* request)
68 {
69 return m_private && m_private->getMediaStreamTrackSources(request);
70 }
71
72 void MediaStreamCenter::didSetMediaStreamTrackEnabled(MediaStreamComponent* comp onent) 66 void MediaStreamCenter::didSetMediaStreamTrackEnabled(MediaStreamComponent* comp onent)
73 { 67 {
74 if (m_private) { 68 if (m_private) {
75 if (component->enabled()) { 69 if (component->enabled()) {
76 m_private->didEnableMediaStreamTrack(component); 70 m_private->didEnableMediaStreamTrack(component);
77 } else { 71 } else {
78 m_private->didDisableMediaStreamTrack(component); 72 m_private->didDisableMediaStreamTrack(component);
79 } 73 }
80 } 74 }
81 } 75 }
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
145 { 139 {
146 MediaStreamDescriptor* stream = webStream; 140 MediaStreamDescriptor* stream = webStream;
147 MediaStreamDescriptorClient* client = stream->client(); 141 MediaStreamDescriptorClient* client = stream->client();
148 if (client) 142 if (client)
149 client->streamEnded(); 143 client->streamEnded();
150 else 144 else
151 stream->setEnded(); 145 stream->setEnded();
152 } 146 }
153 147
154 } // namespace blink 148 } // namespace blink
OLDNEW
« no previous file with comments | « Source/platform/mediastream/MediaStreamCenter.h ('k') | public/platform/WebMediaStreamCenter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698