<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[188493] trunk/Source/WebCore</title>
</head>
<body>
<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; }
#msg dl a { font-weight: bold}
#msg dl a:link { color:#fc3; }
#msg dl a:active { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/188493">188493</a></dd>
<dt>Author</dt> <dd>mdaiter@apple.com</dd>
<dt>Date</dt> <dd>2015-08-14 15:11:37 -0700 (Fri, 14 Aug 2015)</dd>
</dl>
<h3>Log Message</h3>
<pre>Implementing enumerateDevices
https://bugs.webkit.org/show_bug.cgi?id=146426
<rdar://problem/21599847>
Reviewed by Eric Carlson.
* CMakeLists.txt:
* Modules/mediastream/MediaDeviceInfo.idl:
* Modules/mediastream/UserMediaRequest.cpp:
(WebCore::UserMediaRequest::enumerateDevices):
* WebCore.xcodeproj/project.pbxproj:
* platform/mediastream/MediaDevicesPrivate.cpp:
(WebCore::MediaDevicesPrivate::create):
(WebCore::MediaDevicesPrivate::MediaDevicesPrivate):
(WebCore::MediaDevicesPrivate::didCompleteRequest):
(WebCore::MediaDevicesPrivate::availableMediaDevices):
* platform/mediastream/MediaDevicesPrivate.h:
(WebCore::MediaDevicesPrivate::~MediaDevicesPrivate):
(WebCore::MediaDevicesPrivate::capturedDevices):</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceWebCoreCMakeListstxt">trunk/Source/WebCore/CMakeLists.txt</a></li>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCoreModulesmediastreamMediaDeviceInfoidl">trunk/Source/WebCore/Modules/mediastream/MediaDeviceInfo.idl</a></li>
<li><a href="#trunkSourceWebCoreModulesmediastreamUserMediaRequestcpp">trunk/Source/WebCore/Modules/mediastream/UserMediaRequest.cpp</a></li>
<li><a href="#trunkSourceWebCoreWebCorexcodeprojprojectpbxproj">trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj</a></li>
<li><a href="#trunkSourceWebCoreplatformmediastreamMediaDevicesPrivatecpp">trunk/Source/WebCore/platform/mediastream/MediaDevicesPrivate.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformmediastreamMediaDevicesPrivateh">trunk/Source/WebCore/platform/mediastream/MediaDevicesPrivate.h</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceWebCoreCMakeListstxt"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/CMakeLists.txt (188492 => 188493)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/CMakeLists.txt        2015-08-14 22:11:22 UTC (rev 188492)
+++ trunk/Source/WebCore/CMakeLists.txt        2015-08-14 22:11:37 UTC (rev 188493)
</span><span class="lines">@@ -2236,6 +2236,7 @@
</span><span class="cx"> platform/graphics/transforms/TransformationMatrix.cpp
</span><span class="cx"> platform/graphics/transforms/TranslateTransformOperation.cpp
</span><span class="cx">
</span><ins>+ platform/mediastream/MediaDevicesPrivate.cpp
</ins><span class="cx"> platform/mediastream/MediaStreamPrivate.cpp
</span><span class="cx"> platform/mediastream/MediaStreamTrackPrivate.cpp
</span><span class="cx"> platform/mediastream/RTCIceCandidateDescriptor.cpp
</span></span></pre></div>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (188492 => 188493)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2015-08-14 22:11:22 UTC (rev 188492)
+++ trunk/Source/WebCore/ChangeLog        2015-08-14 22:11:37 UTC (rev 188493)
</span><span class="lines">@@ -1,3 +1,25 @@
</span><ins>+2015-08-14 Matthew Daiter <mdaiter@apple.com>
+
+ Implementing enumerateDevices
+ https://bugs.webkit.org/show_bug.cgi?id=146426
+ <rdar://problem/21599847>
+
+ Reviewed by Eric Carlson.
+
+ * CMakeLists.txt:
+ * Modules/mediastream/MediaDeviceInfo.idl:
+ * Modules/mediastream/UserMediaRequest.cpp:
+ (WebCore::UserMediaRequest::enumerateDevices):
+ * WebCore.xcodeproj/project.pbxproj:
+ * platform/mediastream/MediaDevicesPrivate.cpp:
+ (WebCore::MediaDevicesPrivate::create):
+ (WebCore::MediaDevicesPrivate::MediaDevicesPrivate):
+ (WebCore::MediaDevicesPrivate::didCompleteRequest):
+ (WebCore::MediaDevicesPrivate::availableMediaDevices):
+ * platform/mediastream/MediaDevicesPrivate.h:
+ (WebCore::MediaDevicesPrivate::~MediaDevicesPrivate):
+ (WebCore::MediaDevicesPrivate::capturedDevices):
+
</ins><span class="cx"> 2015-08-13 Andy Estes <aestes@apple.com>
</span><span class="cx">
</span><span class="cx"> [Cocoa] Downloads do not start if policy decision is made asynchronously
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesmediastreamMediaDeviceInfoidl"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/mediastream/MediaDeviceInfo.idl (188492 => 188493)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/mediastream/MediaDeviceInfo.idl        2015-08-14 22:11:22 UTC (rev 188492)
+++ trunk/Source/WebCore/Modules/mediastream/MediaDeviceInfo.idl        2015-08-14 22:11:37 UTC (rev 188493)
</span><span class="lines">@@ -1,3 +1,28 @@
</span><ins>+/*
+* Copyright (C) 2015 Apple Inc. All rights reserved.
+*
+* Redistribution and use in source and binary forms, with or without
+* modification, are permitted provided that the following conditions
+* are met:
+* 1. Redistributions of source code must retain the above copyright
+* notice, this list of conditions and the following disclaimer.
+* 2. Redistributions in binary form must reproduce the above copyright
+* notice, this list of conditions and the following disclaimer in the
+* documentation and/or other materials provided with the distribution.
+*
+* THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
+* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL GOOGLE INC. OR
+* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+* OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+*/
+
</ins><span class="cx"> [
</span><span class="cx"> NoInterfaceObject,
</span><span class="cx"> Conditional=MEDIA_STREAM,
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesmediastreamUserMediaRequestcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/mediastream/UserMediaRequest.cpp (188492 => 188493)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/mediastream/UserMediaRequest.cpp        2015-08-14 22:11:22 UTC (rev 188492)
+++ trunk/Source/WebCore/Modules/mediastream/UserMediaRequest.cpp        2015-08-14 22:11:37 UTC (rev 188493)
</span><span class="lines">@@ -41,9 +41,11 @@
</span><span class="cx"> #include "Document.h"
</span><span class="cx"> #include "ExceptionCode.h"
</span><span class="cx"> #include "Frame.h"
</span><ins>+#include "JSMediaDeviceInfo.h"
</ins><span class="cx"> #include "JSMediaStream.h"
</span><span class="cx"> #include "JSNavigatorUserMediaError.h"
</span><span class="cx"> #include "MediaConstraintsImpl.h"
</span><ins>+#include "MediaDevicesPrivate.h"
</ins><span class="cx"> #include "MediaStream.h"
</span><span class="cx"> #include "MediaStreamPrivate.h"
</span><span class="cx"> #include "NavigatorUserMediaErrorCallback.h"
</span><span class="lines">@@ -68,12 +70,11 @@
</span><span class="cx"> return MediaConstraintsImpl::create();
</span><span class="cx"> }
</span><span class="cx">
</span><del>-void UserMediaRequest::enumerateDevices(Document* document, MediaDevices::EnumerateDevicePromise&& promise, ExceptionCode& ec)
</del><ins>+void UserMediaRequest::enumerateDevices(Document* document, MediaDevices::EnumerateDevicePromise&& promise, ExceptionCode&)
</ins><span class="cx"> {
</span><del>- // FIXME(146426): Implement this.
- UNUSED_PARAM(document);
- UNUSED_PARAM(promise);
- UNUSED_PARAM(ec);
</del><ins>+ RefPtr<MediaDevicesPrivate> deviceClient = MediaDevicesPrivate::create();
+ RealtimeMediaSourceCenter::singleton().getMediaStreamTrackSources(deviceClient);
+ promise.resolve(deviceClient->availableMediaDevices(*document));
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void UserMediaRequest::start(Document* document, const Dictionary& options, MediaDevices::Promise&& promise, ExceptionCode& ec)
</span></span></pre></div>
<a id="trunkSourceWebCoreWebCorexcodeprojprojectpbxproj"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj (188492 => 188493)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj        2015-08-14 22:11:22 UTC (rev 188492)
+++ trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj        2015-08-14 22:11:37 UTC (rev 188493)
</span><span class="lines">@@ -646,6 +646,8 @@
</span><span class="cx">                 152A29B51B4EF5BA00B52AE0 /* MediaDevicesPrivate.h in Headers */ = {isa = PBXBuildFile; fileRef = 152A29B31B4EF59600B52AE0 /* MediaDevicesPrivate.h */; };
</span><span class="cx">                 15739BBA1B42012A00D258C1 /* JSMediaDevices.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 15739BB81B42012200D258C1 /* JSMediaDevices.cpp */; };
</span><span class="cx">                 15739BBB1B42012D00D258C1 /* JSMediaDevices.h in Headers */ = {isa = PBXBuildFile; fileRef = 15739BB91B42012200D258C1 /* JSMediaDevices.h */; };
</span><ins>+                159741DA1B7D13F900201C92 /* JSMediaDeviceInfo.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 157CC2611B7C1CA400D8D075 /* JSMediaDeviceInfo.cpp */; };
+                159741DB1B7D140100201C92 /* JSMediaDeviceInfo.h in Headers */ = {isa = PBXBuildFile; fileRef = 157CC2621B7C1CA400D8D075 /* JSMediaDeviceInfo.h */; };
</ins><span class="cx">                 159AE82B1B3A402F0037478B /* MediaDeviceInfo.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 159AE82A1B3A402F0037478B /* MediaDeviceInfo.cpp */; };
</span><span class="cx">                 15C7708D100D3C6B005BA267 /* ValidityState.h in Headers */ = {isa = PBXBuildFile; fileRef = 15C7708A100D3C6A005BA267 /* ValidityState.h */; };
</span><span class="cx">                 15C77093100D3CA8005BA267 /* JSValidityState.h in Headers */ = {isa = PBXBuildFile; fileRef = 15C77091100D3CA8005BA267 /* JSValidityState.h */; };
</span><span class="lines">@@ -7792,6 +7794,8 @@
</span><span class="cx">                 152A29B31B4EF59600B52AE0 /* MediaDevicesPrivate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MediaDevicesPrivate.h; sourceTree = "<group>"; };
</span><span class="cx">                 15739BB81B42012200D258C1 /* JSMediaDevices.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSMediaDevices.cpp; sourceTree = "<group>"; };
</span><span class="cx">                 15739BB91B42012200D258C1 /* JSMediaDevices.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSMediaDevices.h; sourceTree = "<group>"; };
</span><ins>+                157CC2611B7C1CA400D8D075 /* JSMediaDeviceInfo.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSMediaDeviceInfo.cpp; sourceTree = "<group>"; };
+                157CC2621B7C1CA400D8D075 /* JSMediaDeviceInfo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSMediaDeviceInfo.h; sourceTree = "<group>"; };
</ins><span class="cx">                 159AE82A1B3A402F0037478B /* MediaDeviceInfo.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = MediaDeviceInfo.cpp; sourceTree = "<group>"; };
</span><span class="cx">                 15C77089100D3C6A005BA267 /* ValidityState.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = ValidityState.idl; sourceTree = "<group>"; };
</span><span class="cx">                 15C7708A100D3C6A005BA267 /* ValidityState.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ValidityState.h; sourceTree = "<group>"; };
</span><span class="lines">@@ -14968,6 +14972,8 @@
</span><span class="cx">                 07CFD99317D01405001C4FFC /* MediaStream */ = {
</span><span class="cx">                         isa = PBXGroup;
</span><span class="cx">                         children = (
</span><ins>+                                157CC2611B7C1CA400D8D075 /* JSMediaDeviceInfo.cpp */,
+                                157CC2621B7C1CA400D8D075 /* JSMediaDeviceInfo.h */,
</ins><span class="cx">                                 15739BB81B42012200D258C1 /* JSMediaDevices.cpp */,
</span><span class="cx">                                 15739BB91B42012200D258C1 /* JSMediaDevices.h */,
</span><span class="cx">                                 07C59B6F17F79C7C000FBCBB /* JSMediaSourceStates.cpp */,
</span><span class="lines">@@ -26152,6 +26158,7 @@
</span><span class="cx">                                 1A569D0B0D7E2B82007C3983 /* NP_jsobject.h in Headers */,
</span><span class="cx">                                 1A927FD21416A15B003A83C8 /* npapi.h in Headers */,
</span><span class="cx">                                 1A219B3B0DCA87AB0040E3A0 /* npfunctions.h in Headers */,
</span><ins>+                                159741DB1B7D140100201C92 /* JSMediaDeviceInfo.h in Headers */,
</ins><span class="cx">                                 1A927FD31416A15B003A83C8 /* npruntime.h in Headers */,
</span><span class="cx">                                 1A569D0F0D7E2B82007C3983 /* npruntime_impl.h in Headers */,
</span><span class="cx">                                 1A569D100D7E2B82007C3983 /* npruntime_internal.h in Headers */,
</span><span class="lines">@@ -30106,6 +30113,7 @@
</span><span class="cx">                                 0F09087F1444FDB200028917 /* ScrollbarTheme.cpp in Sources */,
</span><span class="cx">                                 BC14028A0E83680800319717 /* ScrollbarThemeComposite.cpp in Sources */,
</span><span class="cx">                                 44C991820F3D1E0D00586670 /* ScrollbarThemeIOS.mm in Sources */,
</span><ins>+                                159741DA1B7D13F900201C92 /* JSMediaDeviceInfo.cpp in Sources */,
</ins><span class="cx">                                 BCEF869F0E844E9D00A85CD5 /* ScrollbarThemeMac.mm in Sources */,
</span><span class="cx">                                 0FE71405142170B800DB33BA /* ScrollbarThemeMock.cpp in Sources */,
</span><span class="cx">                                 5D925B670F64D4DD00B847F0 /* ScrollBehavior.cpp in Sources */,
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformmediastreamMediaDevicesPrivatecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/mediastream/MediaDevicesPrivate.cpp (188492 => 188493)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/mediastream/MediaDevicesPrivate.cpp        2015-08-14 22:11:22 UTC (rev 188492)
+++ trunk/Source/WebCore/platform/mediastream/MediaDevicesPrivate.cpp        2015-08-14 22:11:37 UTC (rev 188493)
</span><span class="lines">@@ -29,21 +29,27 @@
</span><span class="cx">
</span><span class="cx"> #if ENABLE(MEDIA_STREAM)
</span><span class="cx">
</span><del>-#include "AVCaptureDeviceManager.h"
-#include "AVMediaCaptureSource.h"
-#include "MediaStreamTrackSourcesRequestClient.h"
-
</del><span class="cx"> namespace WebCore {
</span><span class="cx">
</span><ins>+Ref<MediaDevicesPrivate> MediaDevicesPrivate::create()
+{
+ return adoptRef(*new MediaDevicesPrivate);
+}
+
</ins><span class="cx"> MediaDevicesPrivate::MediaDevicesPrivate()
</span><ins>+ : m_capturedDevices()
</ins><span class="cx"> {
</span><span class="cx"> }
</span><ins>+
+void MediaDevicesPrivate::didCompleteRequest(const Vector<RefPtr<TrackSourceInfo>>& capturedDevices)
+{
+ m_capturedDevices = capturedDevices;
+}
</ins><span class="cx">
</span><span class="cx"> Vector<RefPtr<MediaDeviceInfo>> MediaDevicesPrivate::availableMediaDevices(ScriptExecutionContext& context)
</span><span class="cx"> {
</span><del>- Vector<RefPtr<TrackSourceInfo>> capturedDevices = AVCaptureDeviceManager::singleton().getSourcesInfo("");
</del><span class="cx"> Vector<RefPtr<MediaDeviceInfo>> mediaDevicesInfo;
</span><del>- for (auto device : capturedDevices) {
</del><ins>+ for (auto device : m_capturedDevices) {
</ins><span class="cx"> TrackSourceInfo* trackInfo = device.get();
</span><span class="cx"> String deviceType = trackInfo->kind() == TrackSourceInfo::SourceKind::Audio ? MediaDeviceInfo::audioInputType() : MediaDeviceInfo::videoInputType();
</span><span class="cx"> mediaDevicesInfo.append(MediaDeviceInfo::create(&context, trackInfo->label(), trackInfo->deviceId(), trackInfo->groupId(), deviceType));
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformmediastreamMediaDevicesPrivateh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/mediastream/MediaDevicesPrivate.h (188492 => 188493)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/mediastream/MediaDevicesPrivate.h        2015-08-14 22:11:22 UTC (rev 188492)
+++ trunk/Source/WebCore/platform/mediastream/MediaDevicesPrivate.h        2015-08-14 22:11:37 UTC (rev 188493)
</span><span class="lines">@@ -29,8 +29,8 @@
</span><span class="cx">
</span><span class="cx"> #if ENABLE(MEDIA_STREAM)
</span><span class="cx">
</span><del>-#include "AVCaptureDeviceManager.h"
</del><span class="cx"> #include "MediaDeviceInfo.h"
</span><ins>+#include "MediaStreamTrackSourcesRequestClient.h"
</ins><span class="cx">
</span><span class="cx"> #include <wtf/Forward.h>
</span><span class="cx"> #include <wtf/RefPtr.h>
</span><span class="lines">@@ -38,13 +38,25 @@
</span><span class="cx">
</span><span class="cx"> namespace WebCore {
</span><span class="cx">
</span><del>-class MediaDevicesPrivate : public std::unique_ptr<MediaDevicesPrivate> {
</del><ins>+class MediaDevicesPrivate : public MediaStreamTrackSourcesRequestClient {
</ins><span class="cx"> public:
</span><ins>+ static Ref<MediaDevicesPrivate> create();
+
</ins><span class="cx"> MediaDevicesPrivate();
</span><span class="cx">
</span><del>- virtual ~MediaDevicesPrivate() { }
</del><ins>+ ~MediaDevicesPrivate() { }
</ins><span class="cx">
</span><del>- virtual Vector<RefPtr<MediaDeviceInfo>> availableMediaDevices(ScriptExecutionContext&);
</del><ins>+ Vector<RefPtr<MediaDeviceInfo>> availableMediaDevices(ScriptExecutionContext&);
+
+ // FIXME(148041): requestOrigin inside of getMediaStreamTrackSources not used
+ const String& requestOrigin() const override { return emptyString(); }
+
+ void didCompleteRequest(const Vector<RefPtr<TrackSourceInfo>>&) override;
+
+ Vector<RefPtr<TrackSourceInfo>> capturedDevices() const { return m_capturedDevices; }
+
+private:
+ Vector<RefPtr<TrackSourceInfo>> m_capturedDevices;
</ins><span class="cx"> };
</span><span class="cx">
</span><span class="cx"> }
</span></span></pre>
</div>
</div>
</body>
</html>