Diff
Modified: trunk/LayoutTests/ChangeLog (191948 => 191949)
--- trunk/LayoutTests/ChangeLog 2015-11-03 10:43:52 UTC (rev 191948)
+++ trunk/LayoutTests/ChangeLog 2015-11-03 13:43:56 UTC (rev 191949)
@@ -1,3 +1,16 @@
+2015-11-03 Youenn Fablet <youenn.fab...@crf.canon.fr>
+
+ Move webkitGetUserMedia to JS Builtin
+ https://bugs.webkit.org/show_bug.cgi?id=149499
+
+ Reviewed by Darin Adler.
+
+ * fast/mediastream/argument-types-expected.txt:
+ * fast/mediastream/getusermedia-expected.txt:
+ * fast/mediastream/getusermedia.html:
+ * fast/mediastream/script-tests/argument-types.js:
+ * http/tests/media/media-stream/disconnected-frame-already-expected.txt:
+
2015-11-02 Keith Rollin <krol...@apple.com>
input[type=number] does not increment/decrement integers with trailing decimal characters
Modified: trunk/LayoutTests/fast/mediastream/argument-types-expected.txt (191948 => 191949)
--- trunk/LayoutTests/fast/mediastream/argument-types-expected.txt 2015-11-03 10:43:52 UTC (rev 191948)
+++ trunk/LayoutTests/fast/mediastream/argument-types-expected.txt 2015-11-03 13:43:56 UTC (rev 191949)
@@ -30,7 +30,7 @@
PASS navigator.webkitGetUserMedia({video: true}, 42) threw exception TypeError: Not enough arguments.
PASS navigator.webkitGetUserMedia({video: true}, Infinity) threw exception TypeError: Not enough arguments.
PASS navigator.webkitGetUserMedia({video: true}, -Infinity) threw exception TypeError: Not enough arguments.
-PASS navigator.webkitGetUserMedia({ }, emptyFunction, emptyFunction) threw exception Error: NotSupportedError: DOM Exception 9.
+PASS navigator.webkitGetUserMedia({ }, emptyFunction, emptyFunction) did not throw exception.
PASS navigator.webkitGetUserMedia({video: true}, emptyFunction, emptyFunction) did not throw exception.
PASS navigator.webkitGetUserMedia({video: true}, emptyFunction, undefined) threw exception TypeError: Argument 3 ('errorCallback') to Navigator.webkitGetUserMedia must be a function.
PASS navigator.webkitGetUserMedia({audio:true, video:true}, emptyFunction, undefined) threw exception TypeError: Argument 3 ('errorCallback') to Navigator.webkitGetUserMedia must be a function.
Modified: trunk/LayoutTests/fast/mediastream/getusermedia-expected.txt (191948 => 191949)
--- trunk/LayoutTests/fast/mediastream/getusermedia-expected.txt 2015-11-03 10:43:52 UTC (rev 191948)
+++ trunk/LayoutTests/fast/mediastream/getusermedia-expected.txt 2015-11-03 13:43:56 UTC (rev 191949)
@@ -3,9 +3,10 @@
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
-PASS navigator.webkitGetUserMedia({audio:false, video:false}, error, error); threw exception Error: NotSupportedError: DOM Exception 9.
+PASS navigator.webkitGetUserMedia({audio:false, video:false}, error, expectedError); did not throw exception.
PASS navigator.webkitGetUserMedia({audio:false, video:false}, error, null); threw exception TypeError: Argument 3 ('errorCallback') to Navigator.webkitGetUserMedia must be a function.
PASS navigator.webkitGetUserMedia({audio:true}, gotStream1, error); did not throw exception.
+PASS Error callback called.
PASS Stream generated.
PASS stream.getAudioTracks().length is 1
PASS stream.getVideoTracks().length is 0
Modified: trunk/LayoutTests/fast/mediastream/getusermedia.html (191948 => 191949)
--- trunk/LayoutTests/fast/mediastream/getusermedia.html 2015-11-03 10:43:52 UTC (rev 191948)
+++ trunk/LayoutTests/fast/mediastream/getusermedia.html 2015-11-03 13:43:56 UTC (rev 191949)
@@ -24,6 +24,10 @@
finishJSTest();
}
+ function expectedError() {
+ testPassed('Error callback called.');
+ }
+
function gotStreamInError(s) {
testFailed('Stream generated.');
finishJSTest();
@@ -87,7 +91,7 @@
shouldNotThrow("navigator.webkitGetUserMedia({video:true}, gotStream2, error);")
}
- shouldThrow("navigator.webkitGetUserMedia({audio:false, video:false}, error, error);")
+ shouldNotThrow("navigator.webkitGetUserMedia({audio:false, video:false}, error, expectedError);")
shouldThrow("navigator.webkitGetUserMedia({audio:false, video:false}, error, null);")
setUserMediaPermission(true);
Modified: trunk/LayoutTests/fast/mediastream/script-tests/argument-types.js (191948 => 191949)
--- trunk/LayoutTests/fast/mediastream/script-tests/argument-types.js 2015-11-03 10:43:52 UTC (rev 191948)
+++ trunk/LayoutTests/fast/mediastream/script-tests/argument-types.js 2015-11-03 13:43:56 UTC (rev 191949)
@@ -54,7 +54,7 @@
test('navigator.webkitGetUserMedia({video: true}, -Infinity)', true);
// 3 Arguments.
-test('navigator.webkitGetUserMedia({ }, emptyFunction, emptyFunction)', true, notSupportedError);
+test('navigator.webkitGetUserMedia({ }, emptyFunction, emptyFunction)', false);
test('navigator.webkitGetUserMedia({video: true}, emptyFunction, emptyFunction)', false);
test('navigator.webkitGetUserMedia({video: true}, emptyFunction, undefined)', true, errorCallbackError);
test('navigator.webkitGetUserMedia({audio:true, video:true}, emptyFunction, undefined)', true, errorCallbackError);
Modified: trunk/LayoutTests/http/tests/media/media-stream/disconnected-frame-already-expected.txt (191948 => 191949)
--- trunk/LayoutTests/http/tests/media/media-stream/disconnected-frame-already-expected.txt 2015-11-03 10:43:52 UTC (rev 191948)
+++ trunk/LayoutTests/http/tests/media/media-stream/disconnected-frame-already-expected.txt 2015-11-03 13:43:56 UTC (rev 191949)
@@ -1,4 +1,4 @@
-CONSOLE MESSAGE: line 24: NotSupportedError: DOM Exception 9: The implementation did not support the requested type of object or operation.
+CONSOLE MESSAGE: line 24: TypeError: The implementation did not support the requested type of object or operation.
Tests that when a getUserMedia request is made after its frame has been disconnected, no callbacks are made and no crash occurs.
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
Modified: trunk/Source/WebCore/CMakeLists.txt (191948 => 191949)
--- trunk/Source/WebCore/CMakeLists.txt 2015-11-03 10:43:52 UTC (rev 191948)
+++ trunk/Source/WebCore/CMakeLists.txt 2015-11-03 13:43:56 UTC (rev 191949)
@@ -241,8 +241,6 @@
Modules/mediastream/NavigatorMediaDevices.idl
Modules/mediastream/NavigatorUserMedia.idl
Modules/mediastream/NavigatorUserMediaError.idl
- Modules/mediastream/NavigatorUserMediaErrorCallback.idl
- Modules/mediastream/NavigatorUserMediaSuccessCallback.idl
Modules/mediastream/RTCConfiguration.idl
Modules/mediastream/RTCDTMFSender.idl
Modules/mediastream/RTCDTMFToneChangeEvent.idl
@@ -1201,7 +1199,6 @@
bindings/js/JSMutationCallback.cpp
bindings/js/JSMutationObserverCustom.cpp
bindings/js/JSNamedNodeMapCustom.cpp
- bindings/js/JSNavigatorCustom.cpp
bindings/js/JSNodeCustom.cpp
bindings/js/JSNodeFilterCustom.cpp
bindings/js/JSNodeIteratorCustom.cpp
@@ -3588,6 +3585,7 @@
set(WebCore_BUILTINS_SOURCES
${WEBCORE_DIR}/Modules/mediastream/MediaDevices.js
+ ${WEBCORE_DIR}/Modules/mediastream/NavigatorUserMedia.js
${WEBCORE_DIR}/Modules/streams/ByteLengthQueuingStrategy.js
${WEBCORE_DIR}/Modules/streams/CountQueuingStrategy.js
${WEBCORE_DIR}/Modules/streams/ReadableStream.js
Modified: trunk/Source/WebCore/ChangeLog (191948 => 191949)
--- trunk/Source/WebCore/ChangeLog 2015-11-03 10:43:52 UTC (rev 191948)
+++ trunk/Source/WebCore/ChangeLog 2015-11-03 13:43:56 UTC (rev 191949)
@@ -1,3 +1,41 @@
+2015-11-03 Youenn Fablet <youenn.fab...@crf.canon.fr>
+
+ Move webkitGetUserMedia to JS Builtin
+ https://bugs.webkit.org/show_bug.cgi?id=149499
+
+ Reviewed by Darin Adler.
+
+ Implemented webkitGetUserMedia as a JSBuiltin wrapper around navigator.mediaDevices.getUserMedia.
+
+ Removed cpp based version.
+
+ The js builting implementation checks for argument but does not raise exception when the request is not supported.
+ The error callback is called instead, in an asynchronous fashion.
+ The js builtin implementation does not check first that it is called on navigator, contrary to the cpp implementation.
+ This is done afterwards when calling navigator.MediaDevices.@getUserMedia.
+
+ Covered by existing and modified tests.
+
+ * CMakeLists.txt: Adding NavigatorUserMedia.js as built-in JS file.
+ * DerivedSources.make: Ditto.
+ * Modules/mediastream/NavigatorUserMedia.idl: Making webkitGetUserMedia JSBuiltin
+ * Modules/mediastream/NavigatorUserMedia.js:
+ (webkitGetUserMedia):
+ * Modules/mediastream/NavigatorUserMediaErrorCallback.h: Removed.
+ * Modules/mediastream/NavigatorUserMediaErrorCallback.idl: Removed.
+ * Modules/mediastream/NavigatorUserMediaSuccessCallback.h: Removed.
+ * Modules/mediastream/NavigatorUserMediaSuccessCallback.idl: Removed.
+ * Modules/mediastream/UserMediaRequest.cpp:
+ * Modules/mediastream/UserMediaRequest.h:
+ * WebCore.xcodeproj/project.pbxproj:
+ * bindings/js/JSDOMWindowBase.cpp:
+ (WebCore::JSDOMWindowBase::finishCreation): Style modifications.
+ * bindings/js/JSNavigatorCustom.cpp: Removed.
+ * bindings/js/WebCoreJSBuiltins.cpp: Adding support for NavigatorUserMedia.js built-in JS file.
+ * bindings/js/WebCoreJSBuiltins.h: Ditto.
+ (WebCore::JSBuiltinFunctions::JSBuiltinFunctions):
+ (WebCore::JSBuiltinFunctions::navigatorUserMediaBuiltins):
+
2015-11-03 Carlos Garcia Campos <cgar...@igalia.com>
[GStreamer] Use GstBus sync message handler and schedule tasks to the main thread with RunLoop::dispatch
Modified: trunk/Source/WebCore/DerivedSources.make (191948 => 191949)
--- trunk/Source/WebCore/DerivedSources.make 2015-11-03 10:43:52 UTC (rev 191948)
+++ trunk/Source/WebCore/DerivedSources.make 2015-11-03 13:43:56 UTC (rev 191949)
@@ -137,8 +137,6 @@
$(WebCore)/Modules/mediastream/NavigatorMediaDevices.idl \
$(WebCore)/Modules/mediastream/NavigatorUserMedia.idl \
$(WebCore)/Modules/mediastream/NavigatorUserMediaError.idl \
- $(WebCore)/Modules/mediastream/NavigatorUserMediaErrorCallback.idl \
- $(WebCore)/Modules/mediastream/NavigatorUserMediaSuccessCallback.idl \
$(WebCore)/Modules/mediastream/RTCConfiguration.idl \
$(WebCore)/Modules/mediastream/RTCDTMFSender.idl \
$(WebCore)/Modules/mediastream/RTCDTMFToneChangeEvent.idl \
@@ -1257,6 +1255,7 @@
WebCore_BUILTINS_SOURCES = \
$(WebCore)/Modules/mediastream/MediaDevices.js \
+ $(WebCore)/Modules/mediastream/NavigatorUserMedia.js \
$(WebCore)/Modules/streams/ByteLengthQueuingStrategy.js \
$(WebCore)/Modules/streams/CountQueuingStrategy.js \
$(WebCore)/Modules/streams/ReadableStream.js \
Modified: trunk/Source/WebCore/Modules/mediastream/NavigatorUserMedia.idl (191948 => 191949)
--- trunk/Source/WebCore/Modules/mediastream/NavigatorUserMedia.idl 2015-11-03 10:43:52 UTC (rev 191948)
+++ trunk/Source/WebCore/Modules/mediastream/NavigatorUserMedia.idl 2015-11-03 13:43:56 UTC (rev 191949)
@@ -20,8 +20,6 @@
[
Conditional=MEDIA_STREAM,
] partial interface Navigator {
- [Custom, RaisesException] void webkitGetUserMedia(Dictionary options,
- NavigatorUserMediaSuccessCallback successCallback,
- optional NavigatorUserMediaErrorCallback errorCallback);
+ [JSBuiltin] void webkitGetUserMedia(Dictionary object, any successCallback, any errorCallback);
};
Added: trunk/Source/WebCore/Modules/mediastream/NavigatorUserMedia.js (0 => 191949)
--- trunk/Source/WebCore/Modules/mediastream/NavigatorUserMedia.js (rev 0)
+++ trunk/Source/WebCore/Modules/mediastream/NavigatorUserMedia.js 2015-11-03 13:43:56 UTC (rev 191949)
@@ -0,0 +1,46 @@
+/*
+ * Copyright (C) 2015 Canon Inc.
+ *
+ * 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 APPLE 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.
+ */
+
+function webkitGetUserMedia(options, successCallback, errorCallback)
+{
+ "use strict";
+
+ // FIXME: We should raise a DOM unsupported exception if there is no navigator and properly detect whether method is not called on a Navigator object.
+ if (!(this.mediaDevices && this.mediaDevices.@getUserMediaFromJS))
+ throw new @TypeError("The implementation did not support the requested type of object or operation.");
+
+ if (arguments.length < 3)
+ throw new @TypeError("Not enough arguments");
+
+ if (options !== Object(options))
+ throw new @TypeError("Argument 1 (options) to Navigator.webkitGetUserMedia must be an object");
+
+ if (typeof successCallback !== "function")
+ throw new @TypeError("Argument 2 ('successCallback') to Navigator.webkitGetUserMedia must be a function");
+ if (typeof errorCallback !== "function")
+ throw new @TypeError("Argument 3 ('errorCallback') to Navigator.webkitGetUserMedia must be a function");
+
+ this.mediaDevices.@getUserMediaFromJS(options).then(successCallback, errorCallback);
+}
Deleted: trunk/Source/WebCore/Modules/mediastream/NavigatorUserMediaErrorCallback.h (191948 => 191949)
--- trunk/Source/WebCore/Modules/mediastream/NavigatorUserMediaErrorCallback.h 2015-11-03 10:43:52 UTC (rev 191948)
+++ trunk/Source/WebCore/Modules/mediastream/NavigatorUserMediaErrorCallback.h 2015-11-03 13:43:56 UTC (rev 191949)
@@ -1,45 +0,0 @@
-/*
- * Copyright (C) 2011 Google 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. AND ITS CONTRIBUTORS ``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 APPLE INC. OR ITS 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.
- */
-
-#ifndef NavigatorUserMediaErrorCallback_h
-#define NavigatorUserMediaErrorCallback_h
-
-#if ENABLE(MEDIA_STREAM)
-
-#include "NavigatorUserMediaError.h"
-#include <wtf/RefCounted.h>
-
-namespace WebCore {
-
-class NavigatorUserMediaErrorCallback : public RefCounted<NavigatorUserMediaErrorCallback> {
-public:
- virtual ~NavigatorUserMediaErrorCallback() { }
- virtual bool handleEvent(NavigatorUserMediaError*) = 0;
-};
-
-} // namespace WebCore
-
-#endif // ENABLE(MEDIA_STREAM)
-
-#endif // NavigatorUserMediaErrorCallback_h
Deleted: trunk/Source/WebCore/Modules/mediastream/NavigatorUserMediaErrorCallback.idl (191948 => 191949)
--- trunk/Source/WebCore/Modules/mediastream/NavigatorUserMediaErrorCallback.idl 2015-11-03 10:43:52 UTC (rev 191948)
+++ trunk/Source/WebCore/Modules/mediastream/NavigatorUserMediaErrorCallback.idl 2015-11-03 13:43:56 UTC (rev 191949)
@@ -1,31 +0,0 @@
-/*
- * Copyright (C) 2011 Google 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. AND ITS CONTRIBUTORS ``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 APPLE INC. OR ITS 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.
- */
-
-[
- Conditional=MEDIA_STREAM,
- Callback=FunctionOnly,
-] callback interface NavigatorUserMediaErrorCallback {
- boolean handleEvent(NavigatorUserMediaError error);
-};
-
Deleted: trunk/Source/WebCore/Modules/mediastream/NavigatorUserMediaSuccessCallback.h (191948 => 191949)
--- trunk/Source/WebCore/Modules/mediastream/NavigatorUserMediaSuccessCallback.h 2015-11-03 10:43:52 UTC (rev 191948)
+++ trunk/Source/WebCore/Modules/mediastream/NavigatorUserMediaSuccessCallback.h 2015-11-03 13:43:56 UTC (rev 191949)
@@ -1,46 +0,0 @@
-/*
- * Copyright (C) 2011 Google 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. AND ITS CONTRIBUTORS ``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 APPLE INC. OR ITS 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.
- */
-
-#ifndef NavigatorUserMediaSuccessCallback_h
-#define NavigatorUserMediaSuccessCallback_h
-
-#if ENABLE(MEDIA_STREAM)
-
-#include <wtf/RefCounted.h>
-
-namespace WebCore {
-
-class MediaStream;
-
-class NavigatorUserMediaSuccessCallback : public RefCounted<NavigatorUserMediaSuccessCallback> {
-public:
- virtual ~NavigatorUserMediaSuccessCallback() { }
- virtual bool handleEvent(MediaStream*) = 0;
-};
-
-} // namespace WebCore
-
-#endif // ENABLE(MEDIA_STREAM)
-
-#endif // NavigatorUserMediaSuccessCallback_h
Deleted: trunk/Source/WebCore/Modules/mediastream/NavigatorUserMediaSuccessCallback.idl (191948 => 191949)
--- trunk/Source/WebCore/Modules/mediastream/NavigatorUserMediaSuccessCallback.idl 2015-11-03 10:43:52 UTC (rev 191948)
+++ trunk/Source/WebCore/Modules/mediastream/NavigatorUserMediaSuccessCallback.idl 2015-11-03 13:43:56 UTC (rev 191949)
@@ -1,31 +0,0 @@
-/*
- * Copyright (C) 2011 Google 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. AND ITS CONTRIBUTORS ``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 APPLE INC. OR ITS 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.
- */
-
-[
- Conditional=MEDIA_STREAM,
- Callback=FunctionOnly,
-] callback interface NavigatorUserMediaSuccessCallback {
- boolean handleEvent(MediaStream stream);
-};
-
Modified: trunk/Source/WebCore/Modules/mediastream/UserMediaRequest.cpp (191948 => 191949)
--- trunk/Source/WebCore/Modules/mediastream/UserMediaRequest.cpp 2015-11-03 10:43:52 UTC (rev 191948)
+++ trunk/Source/WebCore/Modules/mediastream/UserMediaRequest.cpp 2015-11-03 13:43:56 UTC (rev 191949)
@@ -47,8 +47,6 @@
#include "MediaConstraintsImpl.h"
#include "MediaStream.h"
#include "MediaStreamPrivate.h"
-#include "NavigatorUserMediaErrorCallback.h"
-#include "NavigatorUserMediaSuccessCallback.h"
#include "RealtimeMediaSourceCenter.h"
#include "SecurityOrigin.h"
#include "UserMediaController.h"
Modified: trunk/Source/WebCore/Modules/mediastream/UserMediaRequest.h (191948 => 191949)
--- trunk/Source/WebCore/Modules/mediastream/UserMediaRequest.h 2015-11-03 10:43:52 UTC (rev 191948)
+++ trunk/Source/WebCore/Modules/mediastream/UserMediaRequest.h 2015-11-03 13:43:56 UTC (rev 191949)
@@ -49,8 +49,6 @@
class Frame;
class MediaConstraints;
class MediaStreamPrivate;
-class NavigatorUserMediaErrorCallback;
-class NavigatorUserMediaSuccessCallback;
class UserMediaController;
class SecurityOrigin;
Modified: trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj (191948 => 191949)
--- trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj 2015-11-03 10:43:52 UTC (rev 191948)
+++ trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj 2015-11-03 13:43:56 UTC (rev 191949)
@@ -153,7 +153,6 @@
073794E219EE2D1B00E5A045 /* MediaConstraintsMock.h in Headers */ = {isa = PBXBuildFile; fileRef = 073794E019EE2D1B00E5A045 /* MediaConstraintsMock.h */; };
073794E519EE2FF200E5A045 /* JSRTCConfiguration.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 073794E319EE2FF200E5A045 /* JSRTCConfiguration.cpp */; };
073794E619EE2FF200E5A045 /* JSRTCConfiguration.h in Headers */ = {isa = PBXBuildFile; fileRef = 073794E419EE2FF200E5A045 /* JSRTCConfiguration.h */; };
- 073794E819EE335C00E5A045 /* JSNavigatorCustom.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 073794E719EE335C00E5A045 /* JSNavigatorCustom.cpp */; };
073794EB19EE341E00E5A045 /* JSRTCIceServer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 073794E919EE341E00E5A045 /* JSRTCIceServer.cpp */; };
073794EC19EE341E00E5A045 /* JSRTCIceServer.h in Headers */ = {isa = PBXBuildFile; fileRef = 073794EA19EE341E00E5A045 /* JSRTCIceServer.h */; };
073794F119EE37BB00E5A045 /* RTCPeerConnectionHandlerMock.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 073794EF19EE37BB00E5A045 /* RTCPeerConnectionHandlerMock.cpp */; };
@@ -173,10 +172,6 @@
073BE34117D17E01002BD431 /* JSNavigatorUserMedia.h in Headers */ = {isa = PBXBuildFile; fileRef = 073BE33F17D17E01002BD431 /* JSNavigatorUserMedia.h */; settings = {ATTRIBUTES = (Private, ); }; };
073BE34817D17E7A002BD431 /* JSNavigatorUserMediaError.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 073BE34217D17E7A002BD431 /* JSNavigatorUserMediaError.cpp */; };
073BE34917D17E7A002BD431 /* JSNavigatorUserMediaError.h in Headers */ = {isa = PBXBuildFile; fileRef = 073BE34317D17E7A002BD431 /* JSNavigatorUserMediaError.h */; };
- 073BE34A17D17E7A002BD431 /* JSNavigatorUserMediaErrorCallback.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 073BE34417D17E7A002BD431 /* JSNavigatorUserMediaErrorCallback.cpp */; };
- 073BE34B17D17E7A002BD431 /* JSNavigatorUserMediaErrorCallback.h in Headers */ = {isa = PBXBuildFile; fileRef = 073BE34517D17E7A002BD431 /* JSNavigatorUserMediaErrorCallback.h */; };
- 073BE34C17D17E7A002BD431 /* JSNavigatorUserMediaSuccessCallback.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 073BE34617D17E7A002BD431 /* JSNavigatorUserMediaSuccessCallback.cpp */; };
- 073BE34D17D17E7A002BD431 /* JSNavigatorUserMediaSuccessCallback.h in Headers */ = {isa = PBXBuildFile; fileRef = 073BE34717D17E7A002BD431 /* JSNavigatorUserMediaSuccessCallback.h */; };
073BE34E17D180B2002BD431 /* RTCSessionDescriptionDescriptor.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 07221BAB17CF0AD400848E51 /* RTCSessionDescriptionDescriptor.cpp */; };
073BE34F17D18183002BD431 /* RTCIceCandidateDescriptor.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 07221BA617CF0AD400848E51 /* RTCIceCandidateDescriptor.cpp */; };
073BE35017D181A6002BD431 /* RTCPeerConnectionHandler.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 07221BA817CF0AD400848E51 /* RTCPeerConnectionHandler.cpp */; };
@@ -240,8 +235,6 @@
078E091817D14D1C00420AA1 /* MediaStreamTrack.h in Headers */ = {isa = PBXBuildFile; fileRef = 07221B5517CEC32700848E51 /* MediaStreamTrack.h */; };
078E091917D14D1C00420AA1 /* MediaStreamTrackEvent.h in Headers */ = {isa = PBXBuildFile; fileRef = 07221B5817CEC32700848E51 /* MediaStreamTrackEvent.h */; settings = {ATTRIBUTES = (Private, ); }; };
078E091B17D14D1C00420AA1 /* NavigatorUserMediaError.h in Headers */ = {isa = PBXBuildFile; fileRef = 07221B5D17CEC32700848E51 /* NavigatorUserMediaError.h */; settings = {ATTRIBUTES = (Private, ); }; };
- 078E091C17D14D1C00420AA1 /* NavigatorUserMediaErrorCallback.h in Headers */ = {isa = PBXBuildFile; fileRef = 07221B5F17CEC32700848E51 /* NavigatorUserMediaErrorCallback.h */; settings = {ATTRIBUTES = (Private, ); }; };
- 078E091D17D14D1C00420AA1 /* NavigatorUserMediaSuccessCallback.h in Headers */ = {isa = PBXBuildFile; fileRef = 07221B6117CEC32700848E51 /* NavigatorUserMediaSuccessCallback.h */; settings = {ATTRIBUTES = (Private, ); }; };
078E091E17D14D1C00420AA1 /* RTCDataChannel.h in Headers */ = {isa = PBXBuildFile; fileRef = 07221B6417CEC32700848E51 /* RTCDataChannel.h */; settings = {ATTRIBUTES = (Private, ); }; };
078E091F17D14D1C00420AA1 /* RTCDataChannelEvent.h in Headers */ = {isa = PBXBuildFile; fileRef = 07221B6717CEC32700848E51 /* RTCDataChannelEvent.h */; settings = {ATTRIBUTES = (Private, ); }; };
078E092017D14D1C00420AA1 /* RTCDTMFSender.h in Headers */ = {isa = PBXBuildFile; fileRef = 07221B6A17CEC32700848E51 /* RTCDTMFSender.h */; settings = {ATTRIBUTES = (Private, ); }; };
@@ -7359,10 +7352,6 @@
07221B5C17CEC32700848E51 /* NavigatorUserMedia.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = NavigatorUserMedia.idl; sourceTree = "<group>"; };
07221B5D17CEC32700848E51 /* NavigatorUserMediaError.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NavigatorUserMediaError.h; sourceTree = "<group>"; };
07221B5E17CEC32700848E51 /* NavigatorUserMediaError.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = NavigatorUserMediaError.idl; sourceTree = "<group>"; };
- 07221B5F17CEC32700848E51 /* NavigatorUserMediaErrorCallback.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NavigatorUserMediaErrorCallback.h; sourceTree = "<group>"; };
- 07221B6017CEC32700848E51 /* NavigatorUserMediaErrorCallback.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = NavigatorUserMediaErrorCallback.idl; sourceTree = "<group>"; };
- 07221B6117CEC32700848E51 /* NavigatorUserMediaSuccessCallback.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NavigatorUserMediaSuccessCallback.h; sourceTree = "<group>"; };
- 07221B6217CEC32700848E51 /* NavigatorUserMediaSuccessCallback.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = NavigatorUserMediaSuccessCallback.idl; sourceTree = "<group>"; };
07221B6317CEC32700848E51 /* RTCDataChannel.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = RTCDataChannel.cpp; sourceTree = "<group>"; };
07221B6417CEC32700848E51 /* RTCDataChannel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RTCDataChannel.h; sourceTree = "<group>"; };
07221B6517CEC32700848E51 /* RTCDataChannel.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = RTCDataChannel.idl; sourceTree = "<group>"; };
@@ -7452,7 +7441,6 @@
073794E019EE2D1B00E5A045 /* MediaConstraintsMock.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MediaConstraintsMock.h; sourceTree = "<group>"; };
073794E319EE2FF200E5A045 /* JSRTCConfiguration.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSRTCConfiguration.cpp; sourceTree = "<group>"; };
073794E419EE2FF200E5A045 /* JSRTCConfiguration.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSRTCConfiguration.h; sourceTree = "<group>"; };
- 073794E719EE335C00E5A045 /* JSNavigatorCustom.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSNavigatorCustom.cpp; sourceTree = "<group>"; };
073794E919EE341E00E5A045 /* JSRTCIceServer.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSRTCIceServer.cpp; sourceTree = "<group>"; };
073794EA19EE341E00E5A045 /* JSRTCIceServer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSRTCIceServer.h; sourceTree = "<group>"; };
073794ED19EE364200E5A045 /* DOMURLMediaStream.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = DOMURLMediaStream.cpp; sourceTree = "<group>"; };
@@ -7474,10 +7462,6 @@
073BE33F17D17E01002BD431 /* JSNavigatorUserMedia.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSNavigatorUserMedia.h; sourceTree = "<group>"; };
073BE34217D17E7A002BD431 /* JSNavigatorUserMediaError.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSNavigatorUserMediaError.cpp; sourceTree = "<group>"; };
073BE34317D17E7A002BD431 /* JSNavigatorUserMediaError.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSNavigatorUserMediaError.h; sourceTree = "<group>"; };
- 073BE34417D17E7A002BD431 /* JSNavigatorUserMediaErrorCallback.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSNavigatorUserMediaErrorCallback.cpp; sourceTree = "<group>"; };
- 073BE34517D17E7A002BD431 /* JSNavigatorUserMediaErrorCallback.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSNavigatorUserMediaErrorCallback.h; sourceTree = "<group>"; };
- 073BE34617D17E7A002BD431 /* JSNavigatorUserMediaSuccessCallback.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSNavigatorUserMediaSuccessCallback.cpp; sourceTree = "<group>"; };
- 073BE34717D17E7A002BD431 /* JSNavigatorUserMediaSuccessCallback.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSNavigatorUserMediaSuccessCallback.h; sourceTree = "<group>"; };
074E82B818A69F0E007EF54C /* PlatformTimeRanges.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = PlatformTimeRanges.cpp; sourceTree = "<group>"; };
074E82B918A69F0E007EF54C /* PlatformTimeRanges.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PlatformTimeRanges.h; sourceTree = "<group>"; };
0753860014489E9800B78452 /* CachedTextTrack.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CachedTextTrack.cpp; sourceTree = "<group>"; };
@@ -8865,6 +8849,7 @@
419BE7531BC7F3DB00E1C85B /* WebCoreJSBuiltinInternals.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebCoreJSBuiltinInternals.h; sourceTree = "<group>"; };
419BE7541BC7F3DB00E1C85B /* WebCoreJSBuiltins.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WebCoreJSBuiltins.cpp; sourceTree = "<group>"; };
419BE7551BC7F3DB00E1C85B /* WebCoreJSBuiltins.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebCoreJSBuiltins.h; sourceTree = "<group>"; };
+ 419BE75A1BCBD3ED00E1C85B /* NavigatorUserMedia.js */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode._javascript_; path = NavigatorUserMedia.js; sourceTree = "<group>"; };
419FAFAD1ABABCD5005B828B /* ReadableStreamReader.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = ReadableStreamReader.idl; sourceTree = "<group>"; };
41A023ED1A39DB7900F722CF /* ReadableStream.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = ReadableStream.idl; sourceTree = "<group>"; };
41A023ED1A39DB7900F722DF /* WritableStream.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = WritableStream.idl; sourceTree = "<group>"; };
@@ -15091,13 +15076,10 @@
5EA725CB1ACABCB500EAD17B /* NavigatorMediaDevices.h */,
5EA725CC1ACABCB500EAD17B /* NavigatorMediaDevices.idl */,
07221B5C17CEC32700848E51 /* NavigatorUserMedia.idl */,
+ 419BE75A1BCBD3ED00E1C85B /* NavigatorUserMedia.js */,
070327F717EA4AAF00CE1318 /* NavigatorUserMediaError.cpp */,
07221B5D17CEC32700848E51 /* NavigatorUserMediaError.h */,
07221B5E17CEC32700848E51 /* NavigatorUserMediaError.idl */,
- 07221B5F17CEC32700848E51 /* NavigatorUserMediaErrorCallback.h */,
- 07221B6017CEC32700848E51 /* NavigatorUserMediaErrorCallback.idl */,
- 07221B6117CEC32700848E51 /* NavigatorUserMediaSuccessCallback.h */,
- 07221B6217CEC32700848E51 /* NavigatorUserMediaSuccessCallback.idl */,
07AB996518DA3C010018771E /* RTCConfiguration.h */,
07AB996618DA3C010018771E /* RTCConfiguration.idl */,
07221B6317CEC32700848E51 /* RTCDataChannel.cpp */,
@@ -15295,10 +15277,6 @@
073BE33F17D17E01002BD431 /* JSNavigatorUserMedia.h */,
073BE34217D17E7A002BD431 /* JSNavigatorUserMediaError.cpp */,
073BE34317D17E7A002BD431 /* JSNavigatorUserMediaError.h */,
- 073BE34417D17E7A002BD431 /* JSNavigatorUserMediaErrorCallback.cpp */,
- 073BE34517D17E7A002BD431 /* JSNavigatorUserMediaErrorCallback.h */,
- 073BE34617D17E7A002BD431 /* JSNavigatorUserMediaSuccessCallback.cpp */,
- 073BE34717D17E7A002BD431 /* JSNavigatorUserMediaSuccessCallback.h */,
073794E319EE2FF200E5A045 /* JSRTCConfiguration.cpp */,
073794E419EE2FF200E5A045 /* JSRTCConfiguration.h */,
07969D9117D14151007FF842 /* JSRTCDataChannel.cpp */,
@@ -22014,7 +21992,6 @@
A1E5B31D1AAD1DA4006EBEFB /* JSMockContentFilterSettingsCustom.cpp */,
C6F0917E143A2BB900685849 /* JSMutationObserverCustom.cpp */,
BCD9C25F0C17AA67005C90A2 /* JSNamedNodeMapCustom.cpp */,
- 073794E719EE335C00E5A045 /* JSNavigatorCustom.cpp */,
BCD9C2600C17AA67005C90A2 /* JSNodeCustom.cpp */,
BC9439C2116CF4940048C750 /* JSNodeCustom.h */,
1A750DD30A90E729000FF215 /* JSNodeIteratorCustom.cpp */,
@@ -26136,8 +26113,6 @@
A9D247F80D757E3400FDF959 /* JSNavigator.h in Headers */,
073BE34117D17E01002BD431 /* JSNavigatorUserMedia.h in Headers */,
073BE34917D17E7A002BD431 /* JSNavigatorUserMediaError.h in Headers */,
- 073BE34B17D17E7A002BD431 /* JSNavigatorUserMediaErrorCallback.h in Headers */,
- 073BE34D17D17E7A002BD431 /* JSNavigatorUserMediaSuccessCallback.h in Headers */,
BC9439C3116CF4940048C750 /* JSNodeCustom.h in Headers */,
14115B7309F84CD600CA4FC1 /* JSNodeFilter.h in Headers */,
1A750D8E0A90E521000FF215 /* JSNodeIterator.h in Headers */,
@@ -26673,8 +26648,6 @@
9711460414EF009A00674FD9 /* NavigatorGeolocation.h in Headers */,
5EA725D61ACABD5700EAD17B /* NavigatorMediaDevices.h in Headers */,
078E091B17D14D1C00420AA1 /* NavigatorUserMediaError.h in Headers */,
- 078E091C17D14D1C00420AA1 /* NavigatorUserMediaErrorCallback.h in Headers */,
- 078E091D17D14D1C00420AA1 /* NavigatorUserMediaSuccessCallback.h in Headers */,
A19D93461A9FEC7200B46C24 /* NEFilterSourceSPI.h in Headers */,
8A309C9F123950BE00CB9204 /* NestingLevelIncrementer.h in Headers */,
656D37430ADBA5DE00A4554D /* NetscapePlugInStreamLoader.h in Headers */,
@@ -29799,11 +29772,8 @@
BCD9C2C00C17B69E005C90A2 /* JSNamedNodeMap.cpp in Sources */,
BCD9C2630C17AA67005C90A2 /* JSNamedNodeMapCustom.cpp in Sources */,
A9D247F70D757E3400FDF959 /* JSNavigator.cpp in Sources */,
- 073794E819EE335C00E5A045 /* JSNavigatorCustom.cpp in Sources */,
073BE34017D17E01002BD431 /* JSNavigatorUserMedia.cpp in Sources */,
073BE34817D17E7A002BD431 /* JSNavigatorUserMediaError.cpp in Sources */,
- 073BE34A17D17E7A002BD431 /* JSNavigatorUserMediaErrorCallback.cpp in Sources */,
- 073BE34C17D17E7A002BD431 /* JSNavigatorUserMediaSuccessCallback.cpp in Sources */,
14DC0D3709FED073007B0235 /* JSNode.cpp in Sources */,
BCD9C2640C17AA67005C90A2 /* JSNodeCustom.cpp in Sources */,
14115B7209F84CD600CA4FC1 /* JSNodeFilter.cpp in Sources */,
Modified: trunk/Source/WebCore/bindings/js/JSDOMWindowBase.cpp (191948 => 191949)
--- trunk/Source/WebCore/bindings/js/JSDOMWindowBase.cpp 2015-11-03 10:43:52 UTC (rev 191948)
+++ trunk/Source/WebCore/bindings/js/JSDOMWindowBase.cpp 2015-11-03 13:43:56 UTC (rev 191949)
@@ -3,6 +3,7 @@
* Copyright (C) 2006 Jon Shier (jsh...@iastate.edu)
* Copyright (C) 2003-2009, 2014 Apple Inc. All rights reseved.
* Copyright (C) 2006 Alexey Proskuryakov (a...@webkit.org)
+ * Copyright (c) 2015 Canon Inc. All rights reserved.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@@ -83,34 +84,35 @@
m_privateFunctions.init(*this);
+#if ENABLE(STREAMS_API)
+ JSVMClientData& clientData = *static_cast<JSVMClientData*>(vm.clientData);
+#endif
+
GlobalPropertyInfo staticGlobals[] = {
GlobalPropertyInfo(vm.propertyNames->document, jsNull(), DontDelete | ReadOnly),
GlobalPropertyInfo(vm.propertyNames->window, m_shell, DontDelete | ReadOnly),
#if ENABLE(STREAMS_API)
- GlobalPropertyInfo(static_cast<JSVMClientData*>(vm.clientData)->builtinNames().streamClosedPrivateName(), jsNumber(1), DontDelete | ReadOnly),
- GlobalPropertyInfo(static_cast<JSVMClientData*>(vm.clientData)->builtinNames().streamClosingPrivateName(), jsNumber(2), DontDelete | ReadOnly),
- GlobalPropertyInfo(static_cast<JSVMClientData*>(vm.clientData)->builtinNames().streamErroredPrivateName(), jsNumber(3), DontDelete | ReadOnly),
- GlobalPropertyInfo(static_cast<JSVMClientData*>(vm.clientData)->builtinNames().streamReadablePrivateName(), jsNumber(4), DontDelete | ReadOnly),
- GlobalPropertyInfo(static_cast<JSVMClientData*>(vm.clientData)->builtinNames().streamWaitingPrivateName(), jsNumber(5), DontDelete | ReadOnly),
- GlobalPropertyInfo(static_cast<JSVMClientData*>(vm.clientData)->builtinNames().streamWritablePrivateName(), jsNumber(6), DontDelete | ReadOnly),
- GlobalPropertyInfo(static_cast<JSVMClientData*>(vm.clientData)->builtinNames().ReadableStreamControllerPrivateName(), createReadableStreamControllerPrivateConstructor(vm, *this), DontDelete | ReadOnly),
- GlobalPropertyInfo(static_cast<JSVMClientData*>(vm.clientData)->builtinNames().ReadableStreamReaderPrivateName(), createReadableStreamReaderPrivateConstructor(vm, *this), DontDelete | ReadOnly),
+ GlobalPropertyInfo(clientData.builtinNames().streamClosedPrivateName(), jsNumber(1), DontDelete | ReadOnly),
+ GlobalPropertyInfo(clientData.builtinNames().streamClosingPrivateName(), jsNumber(2), DontDelete | ReadOnly),
+ GlobalPropertyInfo(clientData.builtinNames().streamErroredPrivateName(), jsNumber(3), DontDelete | ReadOnly),
+ GlobalPropertyInfo(clientData.builtinNames().streamReadablePrivateName(), jsNumber(4), DontDelete | ReadOnly),
+ GlobalPropertyInfo(clientData.builtinNames().streamWaitingPrivateName(), jsNumber(5), DontDelete | ReadOnly),
+ GlobalPropertyInfo(clientData.builtinNames().streamWritablePrivateName(), jsNumber(6), DontDelete | ReadOnly),
+ GlobalPropertyInfo(clientData.builtinNames().ReadableStreamControllerPrivateName(), createReadableStreamControllerPrivateConstructor(vm, *this), DontDelete | ReadOnly),
+ GlobalPropertyInfo(clientData.builtinNames().ReadableStreamReaderPrivateName(), createReadableStreamReaderPrivateConstructor(vm, *this), DontDelete | ReadOnly),
#define DECLARE_GLOBAL_STATIC(name)\
GlobalPropertyInfo(\
- static_cast<JSVMClientData*>(vm.clientData)->builtinFunctions().readableStreamInternalsBuiltins().name##PrivateName(), \
- m_privateFunctions.readableStreamInternals().m_##name##Function.get() , DontDelete | ReadOnly),
+ clientData.builtinFunctions().readableStreamInternalsBuiltins().name##PrivateName(), m_privateFunctions.readableStreamInternals().m_##name##Function.get() , DontDelete | ReadOnly),
WEBCORE_FOREACH_READABLESTREAMINTERNALS_BUILTIN_FUNCTION_NAME(DECLARE_GLOBAL_STATIC)
#undef DECLARE_GLOBAL_STATIC
#define DECLARE_GLOBAL_STATIC(name)\
GlobalPropertyInfo(\
- static_cast<JSVMClientData*>(vm.clientData)->builtinFunctions().streamInternalsBuiltins().name##PrivateName(), \
- m_privateFunctions.streamInternals().m_##name##Function.get() , DontDelete | ReadOnly),
+ clientData.builtinFunctions().streamInternalsBuiltins().name##PrivateName(), m_privateFunctions.streamInternals().m_##name##Function.get() , DontDelete | ReadOnly),
WEBCORE_FOREACH_STREAMINTERNALS_BUILTIN_FUNCTION_NAME(DECLARE_GLOBAL_STATIC)
#undef DECLARE_GLOBAL_STATIC
#define DECLARE_GLOBAL_STATIC(name)\
GlobalPropertyInfo(\
- static_cast<JSVMClientData*>(vm.clientData)->builtinFunctions().writableStreamInternalsBuiltins().name##PrivateName(), \
- m_privateFunctions.writableStreamInternals().m_##name##Function.get() , DontDelete | ReadOnly),
+ clientData.builtinFunctions().writableStreamInternalsBuiltins().name##PrivateName(), m_privateFunctions.writableStreamInternals().m_##name##Function.get() , DontDelete | ReadOnly),
WEBCORE_FOREACH_WRITABLESTREAMINTERNALS_BUILTIN_FUNCTION_NAME(DECLARE_GLOBAL_STATIC)
#undef DECLARE_GLOBAL_STATIC
#endif
Deleted: trunk/Source/WebCore/bindings/js/JSNavigatorCustom.cpp (191948 => 191949)
--- trunk/Source/WebCore/bindings/js/JSNavigatorCustom.cpp 2015-11-03 10:43:52 UTC (rev 191948)
+++ trunk/Source/WebCore/bindings/js/JSNavigatorCustom.cpp 2015-11-03 13:43:56 UTC (rev 191949)
@@ -1,103 +0,0 @@
-/*
- * Copyright (C) 2013 Nokia Corporation and/or its subsidiary(-ies).
- * Copyright (C) 2015 Canon INC.
- *
- * 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 THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "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 THE COPYRIGHT
- * OWNER 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.
- */
-
-#include "config.h"
-
-#if ENABLE(MEDIA_STREAM)
-#include "JSNavigator.h"
-
-#include "Dictionary.h"
-#include "Document.h"
-#include "ExceptionCode.h"
-#include "Frame.h"
-#include "JSNavigatorUserMediaErrorCallback.h"
-#include "JSNavigatorUserMediaSuccessCallback.h"
-#include "MediaStream.h"
-#include "UserMediaRequest.h"
-
-using namespace JSC;
-
-namespace WebCore {
-
-JSValue JSNavigator::webkitGetUserMedia(ExecState& state)
-{
- if (state.argumentCount() < 3) {
- throwVMError(&state, createNotEnoughArgumentsError(&state));
- return jsUndefined();
- }
-
- Dictionary options(&state, state.argument(0));
- if (state.hadException())
- return jsUndefined();
-
- if (!options.isObject()) {
- throwVMError(&state, createTypeError(&state, "First argument of webkitGetUserMedia must be a valid Dictionary"));
- return jsUndefined();
- }
-
- if (!state.argument(1).isFunction()) {
- throwVMTypeError(&state, "Argument 2 ('successCallback') to Navigator.webkitGetUserMedia must be a function");
- return jsUndefined();
- }
-
- if (!state.argument(2).isFunction()) {
- throwVMTypeError(&state, "Argument 3 ('errorCallback') to Navigator.webkitGetUserMedia must be a function");
- return jsUndefined();
- }
-
- if (!wrapped().frame()) {
- setDOMException(&state, NOT_SUPPORTED_ERR);
- return jsUndefined();
- }
-
- // We do not need to protect the context (i.e. document) here as UserMediaRequest is observing context destruction and will check validity before resolving/rejecting promise.
- Document* document = wrapped().frame()->document();
-
- RefPtr<NavigatorUserMediaSuccessCallback> successCallback = JSNavigatorUserMediaSuccessCallback::create(asObject(state.uncheckedArgument(1)), globalObject());
- auto resolveCallback = [successCallback, document](const RefPtr<MediaStream>& stream) mutable {
- RefPtr<MediaStream> protectedStream = stream;
- document->postTask([successCallback, protectedStream](ScriptExecutionContext&) {
- successCallback->handleEvent(protectedStream.get());
- });
- };
-
- RefPtr<NavigatorUserMediaErrorCallback> errorCallback = JSNavigatorUserMediaErrorCallback::create(asObject(state.uncheckedArgument(2)), globalObject());
- auto rejectCallback = [errorCallback, document](const RefPtr<NavigatorUserMediaError>& error) mutable {
- RefPtr<NavigatorUserMediaError> protectedError = error;
- document->postTask([errorCallback, protectedError](ScriptExecutionContext&) {
- errorCallback->handleEvent(protectedError.get());
- });
- };
-
- ExceptionCode ec = 0;
- UserMediaRequest::start(document, options, MediaDevices::Promise(WTF::move(resolveCallback), WTF::move(rejectCallback)), ec);
- setDOMException(&state, ec);
- return jsUndefined();
-}
-
-} // namespace WebCore
-
-#endif // ENABLE(MEDIA_STREAM)
Modified: trunk/Source/WebCore/bindings/js/WebCoreJSBuiltins.cpp (191948 => 191949)
--- trunk/Source/WebCore/bindings/js/WebCoreJSBuiltins.cpp 2015-11-03 10:43:52 UTC (rev 191948)
+++ trunk/Source/WebCore/bindings/js/WebCoreJSBuiltins.cpp 2015-11-03 13:43:56 UTC (rev 191949)
@@ -41,3 +41,6 @@
#include "WritableStreamBuiltins.cpp"
#include "WritableStreamInternalsBuiltins.cpp"
#endif
+#if ENABLE(MEDIA_STREAM)
+#include "NavigatorUserMediaBuiltins.cpp"
+#endif
Modified: trunk/Source/WebCore/bindings/js/WebCoreJSBuiltins.h (191948 => 191949)
--- trunk/Source/WebCore/bindings/js/WebCoreJSBuiltins.h 2015-11-03 10:43:52 UTC (rev 191948)
+++ trunk/Source/WebCore/bindings/js/WebCoreJSBuiltins.h 2015-11-03 13:43:56 UTC (rev 191949)
@@ -29,6 +29,7 @@
#if ENABLE(MEDIA_STREAM)
#include "MediaDevicesBuiltins.h"
+#include "NavigatorUserMediaBuiltins.h"
#endif
#if ENABLE(STREAMS_API)
@@ -64,6 +65,7 @@
#endif
#if ENABLE(MEDIA_STREAM)
, m_mediaDevicesBuiltins(&vm)
+ , m_navigatorUserMediaBuiltins(&vm)
#endif
{
#if ENABLE(STREAMS_API)
@@ -85,6 +87,7 @@
#endif
#if ENABLE(MEDIA_STREAM)
MediaDevicesBuiltinsWrapper& mediaDevicesBuiltins() { return m_mediaDevicesBuiltins; }
+ NavigatorUserMediaBuiltinsWrapper& navigatorUserMediaBuiltins() { return m_navigatorUserMediaBuiltins;}
#endif
private:
@@ -102,6 +105,7 @@
#endif
#if ENABLE(MEDIA_STREAM)
MediaDevicesBuiltinsWrapper m_mediaDevicesBuiltins;
+ NavigatorUserMediaBuiltinsWrapper m_navigatorUserMediaBuiltins;
#endif
};