OLD | NEW |
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 22 matching lines...) Expand all Loading... |
33 | 33 |
34 #include "core/platform/mediastream/MediaStreamCenter.h" | 34 #include "core/platform/mediastream/MediaStreamCenter.h" |
35 | 35 |
36 #include "core/platform/mediastream/MediaStreamDescriptor.h" | 36 #include "core/platform/mediastream/MediaStreamDescriptor.h" |
37 #include "core/platform/mediastream/MediaStreamSourcesQueryClient.h" | 37 #include "core/platform/mediastream/MediaStreamSourcesQueryClient.h" |
38 #include "public/platform/Platform.h" | 38 #include "public/platform/Platform.h" |
39 #include "public/platform/WebMediaStream.h" | 39 #include "public/platform/WebMediaStream.h" |
40 #include "public/platform/WebMediaStreamCenter.h" | 40 #include "public/platform/WebMediaStreamCenter.h" |
41 #include "public/platform/WebMediaStreamSourcesRequest.h" | 41 #include "public/platform/WebMediaStreamSourcesRequest.h" |
42 #include "public/platform/WebMediaStreamTrack.h" | 42 #include "public/platform/WebMediaStreamTrack.h" |
| 43 #include "public/platform/WebMediaStreamTrackSourcesRequest.h" |
43 #include "wtf/MainThread.h" | 44 #include "wtf/MainThread.h" |
44 #include "wtf/PassOwnPtr.h" | 45 #include "wtf/PassOwnPtr.h" |
45 | 46 |
46 namespace WebCore { | 47 namespace WebCore { |
47 | 48 |
48 MediaStreamCenter& MediaStreamCenter::instance() | 49 MediaStreamCenter& MediaStreamCenter::instance() |
49 { | 50 { |
50 ASSERT(isMainThread()); | 51 ASSERT(isMainThread()); |
51 DEFINE_STATIC_LOCAL(MediaStreamCenter, center, ()); | 52 DEFINE_STATIC_LOCAL(MediaStreamCenter, center, ()); |
52 return center; | 53 return center; |
(...skipping 11 matching lines...) Expand all Loading... |
64 void MediaStreamCenter::queryMediaStreamSources(PassRefPtr<MediaStreamSourcesQue
ryClient> client) | 65 void MediaStreamCenter::queryMediaStreamSources(PassRefPtr<MediaStreamSourcesQue
ryClient> client) |
65 { | 66 { |
66 if (m_private) { | 67 if (m_private) { |
67 m_private->queryMediaStreamSources(client); | 68 m_private->queryMediaStreamSources(client); |
68 } else { | 69 } else { |
69 MediaStreamSourceVector audioSources, videoSources; | 70 MediaStreamSourceVector audioSources, videoSources; |
70 client->didCompleteQuery(audioSources, videoSources); | 71 client->didCompleteQuery(audioSources, videoSources); |
71 } | 72 } |
72 } | 73 } |
73 | 74 |
74 bool MediaStreamCenter::getSourceInfos(const String& url, WebKit::WebVector<WebK
it::WebSourceInfo>& sourceInfos) | 75 bool MediaStreamCenter::getMediaStreamTrackSources(PassRefPtr<MediaStreamTrackSo
urcesRequest> request) |
75 { | 76 { |
76 return m_private && m_private->getSourceInfos(url, sourceInfos); | 77 return m_private && m_private->getMediaStreamTrackSources(request); |
77 } | 78 } |
78 | 79 |
79 void MediaStreamCenter::didSetMediaStreamTrackEnabled(MediaStreamDescriptor* str
eam, MediaStreamComponent* component) | 80 void MediaStreamCenter::didSetMediaStreamTrackEnabled(MediaStreamDescriptor* str
eam, MediaStreamComponent* component) |
80 { | 81 { |
81 if (m_private) { | 82 if (m_private) { |
82 if (component->enabled()) | 83 if (component->enabled()) |
83 m_private->didEnableMediaStreamTrack(stream, component); | 84 m_private->didEnableMediaStreamTrack(stream, component); |
84 else | 85 else |
85 m_private->didDisableMediaStreamTrack(stream, component); | 86 m_private->didDisableMediaStreamTrack(stream, component); |
86 } | 87 } |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
119 { | 120 { |
120 MediaStreamDescriptor* stream = webStream; | 121 MediaStreamDescriptor* stream = webStream; |
121 MediaStreamDescriptorClient* client = stream->client(); | 122 MediaStreamDescriptorClient* client = stream->client(); |
122 if (client) | 123 if (client) |
123 client->streamEnded(); | 124 client->streamEnded(); |
124 else | 125 else |
125 stream->setEnded(); | 126 stream->setEnded(); |
126 } | 127 } |
127 | 128 |
128 } // namespace WebCore | 129 } // namespace WebCore |
OLD | NEW |