Title: [120188] trunk
Revision
120188
Author
[email protected]
Date
2012-06-13 05:28:50 -0700 (Wed, 13 Jun 2012)

Log Message

[BlackBerry] Enable MEDIA_STREAM by default
https://bugs.webkit.org/show_bug.cgi?id=88849

Patch by Robin Cao <[email protected]> on 2012-06-13
Reviewed by Antonio Gomes.

.:

* Source/cmake/OptionsBlackBerry.cmake:
* Source/cmakeconfig.h.cmake:

Source/WebCore:

Covered by existing test cases.

* CMakeLists.txt:
* PlatformBlackBerry.cmake:
* platform/mediastream/blackberry/DeprecatedPeerConnectionHandler.cpp: Added.
(WebCore):
(WebCore::DeprecatedPeerConnectionHandler::create):
(WebCore::DeprecatedPeerConnectionHandler::DeprecatedPeerConnectionHandler):
(WebCore::DeprecatedPeerConnectionHandler::~DeprecatedPeerConnectionHandler):
(WebCore::DeprecatedPeerConnectionHandler::produceInitialOffer):
(WebCore::DeprecatedPeerConnectionHandler::handleInitialOffer):
(WebCore::DeprecatedPeerConnectionHandler::processSDP):
(WebCore::DeprecatedPeerConnectionHandler::processPendingStreams):
(WebCore::DeprecatedPeerConnectionHandler::sendDataStreamMessage):
(WebCore::DeprecatedPeerConnectionHandler::stop):
* platform/mediastream/blackberry/MediaStreamCenterBlackBerry.cpp: Added.
(WebCore):
(WebCore::MediaStreamCenter::instance):
(WebCore::MediaStreamCenterBlackBerry::MediaStreamCenterBlackBerry):
(WebCore::MediaStreamCenterBlackBerry::~MediaStreamCenterBlackBerry):
(WebCore::MediaStreamCenterBlackBerry::queryMediaStreamSources):
(WebCore::MediaStreamCenterBlackBerry::didSetMediaStreamTrackEnabled):
(WebCore::MediaStreamCenterBlackBerry::didStopLocalMediaStream):
(WebCore::MediaStreamCenterBlackBerry::didCreateMediaStream):
(WebCore::MediaStreamCenterBlackBerry::constructSDP):
* platform/mediastream/blackberry/MediaStreamCenterBlackBerry.h: Added.
(WebCore):
(MediaStreamCenterBlackBerry):

Source/WebKit:

* PlatformBlackBerry.cmake:

Source/WebKit/blackberry:

* Api/WebPage.cpp:
(BlackBerry::WebKit::WebPagePrivate::init):
* WebCoreSupport/UserMediaClientImpl.cpp: Added.
(WebCore):
(WebCore::UserMediaClientImpl::UserMediaClientImpl):
(WebCore::UserMediaClientImpl::~UserMediaClientImpl):
(WebCore::UserMediaClientImpl::pageDestroyed):
(WebCore::UserMediaClientImpl::requestUserMedia):
(WebCore::UserMediaClientImpl::cancelUserMediaRequest):
* WebCoreSupport/UserMediaClientImpl.h: Added.
(WebKit):
(WebCore):
(UserMediaClientImpl):

Tools:

* Scripts/webkitperl/FeatureList.pm:

Modified Paths

Added Paths

Diff

Modified: trunk/ChangeLog (120187 => 120188)


--- trunk/ChangeLog	2012-06-13 12:04:50 UTC (rev 120187)
+++ trunk/ChangeLog	2012-06-13 12:28:50 UTC (rev 120188)
@@ -1,3 +1,13 @@
+2012-06-13  Robin Cao  <[email protected]>
+
+        [BlackBerry] Enable MEDIA_STREAM by default
+        https://bugs.webkit.org/show_bug.cgi?id=88849
+
+        Reviewed by Antonio Gomes.
+
+        * Source/cmake/OptionsBlackBerry.cmake:
+        * Source/cmakeconfig.h.cmake:
+
 2012-06-12  MORITA Hajime  <[email protected]>
 
         Shadow Pseudo ID should be able to nest to point nested shadow DOM.

Modified: trunk/Source/WebCore/CMakeLists.txt (120187 => 120188)


--- trunk/Source/WebCore/CMakeLists.txt	2012-06-13 12:04:50 UTC (rev 120187)
+++ trunk/Source/WebCore/CMakeLists.txt	2012-06-13 12:28:50 UTC (rev 120188)
@@ -2447,6 +2447,56 @@
     )
 ENDIF ()
 
+IF (ENABLE_MEDIA_STREAM)
+    LIST(APPEND WebCore_INCLUDE_DIRECTORIES
+        ${WEBCORE_DIR}/Modules/mediastream
+        ${WEBCORE_DIR}/platform/mediastream
+    )
+    LIST(APPEND WebCore_IDL_FILES
+        Modules/mediastream/DeprecatedPeerConnection.idl
+        Modules/mediastream/DOMWindowMediaStream.idl
+        Modules/mediastream/IceCallback.idl
+        Modules/mediastream/IceCandidate.idl
+        Modules/mediastream/LocalMediaStream.idl
+        Modules/mediastream/MediaStream.idl
+        Modules/mediastream/MediaStreamEvent.idl
+        Modules/mediastream/MediaStreamList.idl
+        Modules/mediastream/MediaStreamTrack.idl
+        Modules/mediastream/MediaStreamTrackList.idl
+        Modules/mediastream/NavigatorMediaStream.idl
+        Modules/mediastream/NavigatorUserMediaError.idl
+        Modules/mediastream/NavigatorUserMediaErrorCallback.idl
+        Modules/mediastream/NavigatorUserMediaSuccessCallback.idl
+        Modules/mediastream/PeerConnection00.idl
+        Modules/mediastream/SessionDescription.idl
+        Modules/mediastream/SignalingCallback.idl
+    )
+    LIST(APPEND WebCore_SOURCES
+        Modules/mediastream/DeprecatedPeerConnection.cpp
+        Modules/mediastream/IceCandidate.cpp
+        Modules/mediastream/LocalMediaStream.cpp
+        Modules/mediastream/MediaStream.cpp
+        Modules/mediastream/MediaStreamEvent.cpp
+        Modules/mediastream/MediaStreamList.cpp
+        Modules/mediastream/MediaStreamRegistry.cpp
+        Modules/mediastream/MediaStreamTrack.cpp
+        Modules/mediastream/MediaStreamTrackList.cpp
+        Modules/mediastream/NavigatorMediaStream.cpp
+        Modules/mediastream/PeerConnection00.cpp
+        Modules/mediastream/SessionDescription.cpp
+        Modules/mediastream/UserMediaController.cpp
+        Modules/mediastream/UserMediaRequest.cpp
+
+        bindings/js/JSDeprecatedPeerConnectionCustom.cpp
+        platform/mediastream/IceCandidateDescriptor.cpp
+        platform/mediastream/IceOptions.cpp
+        platform/mediastream/MediaHints.cpp
+        platform/mediastream/MediaStreamCenter.cpp
+        platform/mediastream/PeerConnection00Handler.cpp
+        platform/mediastream/SessionDescriptionDescriptor.cpp
+    )
+ENDIF ()
+
 IF (ENABLE_WEB_AUDIO)
     LIST(APPEND WebCore_SOURCES
         Modules/webaudio/AsyncAudioDecoder.cpp

Modified: trunk/Source/WebCore/ChangeLog (120187 => 120188)


--- trunk/Source/WebCore/ChangeLog	2012-06-13 12:04:50 UTC (rev 120187)
+++ trunk/Source/WebCore/ChangeLog	2012-06-13 12:28:50 UTC (rev 120188)
@@ -1,3 +1,39 @@
+2012-06-13  Robin Cao  <[email protected]>
+
+        [BlackBerry] Enable MEDIA_STREAM by default
+        https://bugs.webkit.org/show_bug.cgi?id=88849
+
+        Reviewed by Antonio Gomes.
+
+        Covered by existing test cases.
+
+        * CMakeLists.txt:
+        * PlatformBlackBerry.cmake:
+        * platform/mediastream/blackberry/DeprecatedPeerConnectionHandler.cpp: Added.
+        (WebCore):
+        (WebCore::DeprecatedPeerConnectionHandler::create):
+        (WebCore::DeprecatedPeerConnectionHandler::DeprecatedPeerConnectionHandler):
+        (WebCore::DeprecatedPeerConnectionHandler::~DeprecatedPeerConnectionHandler):
+        (WebCore::DeprecatedPeerConnectionHandler::produceInitialOffer):
+        (WebCore::DeprecatedPeerConnectionHandler::handleInitialOffer):
+        (WebCore::DeprecatedPeerConnectionHandler::processSDP):
+        (WebCore::DeprecatedPeerConnectionHandler::processPendingStreams):
+        (WebCore::DeprecatedPeerConnectionHandler::sendDataStreamMessage):
+        (WebCore::DeprecatedPeerConnectionHandler::stop):
+        * platform/mediastream/blackberry/MediaStreamCenterBlackBerry.cpp: Added.
+        (WebCore):
+        (WebCore::MediaStreamCenter::instance):
+        (WebCore::MediaStreamCenterBlackBerry::MediaStreamCenterBlackBerry):
+        (WebCore::MediaStreamCenterBlackBerry::~MediaStreamCenterBlackBerry):
+        (WebCore::MediaStreamCenterBlackBerry::queryMediaStreamSources):
+        (WebCore::MediaStreamCenterBlackBerry::didSetMediaStreamTrackEnabled):
+        (WebCore::MediaStreamCenterBlackBerry::didStopLocalMediaStream):
+        (WebCore::MediaStreamCenterBlackBerry::didCreateMediaStream):
+        (WebCore::MediaStreamCenterBlackBerry::constructSDP):
+        * platform/mediastream/blackberry/MediaStreamCenterBlackBerry.h: Added.
+        (WebCore):
+        (MediaStreamCenterBlackBerry):
+
 2012-06-13  Pavel Feldman  <[email protected]>
 
         Web Inspector: working copy should be committed even if domain binding returns error.

Modified: trunk/Source/WebCore/PlatformBlackBerry.cmake (120187 => 120188)


--- trunk/Source/WebCore/PlatformBlackBerry.cmake	2012-06-13 12:04:50 UTC (rev 120187)
+++ trunk/Source/WebCore/PlatformBlackBerry.cmake	2012-06-13 12:28:50 UTC (rev 120188)
@@ -229,6 +229,13 @@
     )
 ENDIF ()
 
+if (ENABLE_MEDIA_STREAM)
+    LIST(APPEND WebCore_SOURCES
+        platform/mediastream/blackberry/DeprecatedPeerConnectionHandler.cpp
+        platform/mediastream/blackberry/MediaStreamCenterBlackBerry.cpp
+    )
+ENDIF ()
+
 IF (ENABLE_NETSCAPE_PLUGIN_API)
     LIST(APPEND WebCore_SOURCES
         plugins/PluginDatabase.cpp

Added: trunk/Source/WebCore/platform/mediastream/blackberry/DeprecatedPeerConnectionHandler.cpp (0 => 120188)


--- trunk/Source/WebCore/platform/mediastream/blackberry/DeprecatedPeerConnectionHandler.cpp	                        (rev 0)
+++ trunk/Source/WebCore/platform/mediastream/blackberry/DeprecatedPeerConnectionHandler.cpp	2012-06-13 12:28:50 UTC (rev 120188)
@@ -0,0 +1,81 @@
+/*
+ * Copyright (C) 2011 Ericsson AB. 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.
+ * 3. Neither the name of Ericsson nor the names of its contributors
+ *    may be used to endorse or promote products derived from this
+ *    software without specific prior written permission.
+ *
+ * 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 "DeprecatedPeerConnectionHandler.h"
+
+#include "DeprecatedPeerConnectionHandlerClient.h"
+
+namespace WebCore {
+
+PassOwnPtr<DeprecatedPeerConnectionHandler> DeprecatedPeerConnectionHandler::create(DeprecatedPeerConnectionHandlerClient* client, const String& serverConfiguration, const String& username)
+{
+    return adoptPtr(new DeprecatedPeerConnectionHandler(client, serverConfiguration, username));
+}
+
+// Empty implementations for ports that build with MEDIA_STREAM enabled by default.
+DeprecatedPeerConnectionHandler::DeprecatedPeerConnectionHandler(DeprecatedPeerConnectionHandlerClient*, const String&, const String&)
+{
+}
+
+DeprecatedPeerConnectionHandler::~DeprecatedPeerConnectionHandler()
+{
+}
+
+void DeprecatedPeerConnectionHandler::produceInitialOffer(const MediaStreamDescriptorVector&)
+{
+}
+
+void DeprecatedPeerConnectionHandler::handleInitialOffer(const String&)
+{
+}
+
+void DeprecatedPeerConnectionHandler::processSDP(const String&)
+{
+}
+
+void DeprecatedPeerConnectionHandler::processPendingStreams(const MediaStreamDescriptorVector&, const MediaStreamDescriptorVector&)
+{
+}
+
+void DeprecatedPeerConnectionHandler::sendDataStreamMessage(const char*, size_t)
+{
+}
+
+void DeprecatedPeerConnectionHandler::stop()
+{
+}
+
+} // namespace WebCore
+
+#endif // ENABLE(MEDIA_STREAM)

Added: trunk/Source/WebCore/platform/mediastream/blackberry/MediaStreamCenterBlackBerry.cpp (0 => 120188)


--- trunk/Source/WebCore/platform/mediastream/blackberry/MediaStreamCenterBlackBerry.cpp	                        (rev 0)
+++ trunk/Source/WebCore/platform/mediastream/blackberry/MediaStreamCenterBlackBerry.cpp	2012-06-13 12:28:50 UTC (rev 120188)
@@ -0,0 +1,91 @@
+/*
+ * Copyright (C) 2011 Ericsson AB. All rights reserved.
+ * Copyright (C) 2012 Research In Motion Limited. 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.
+ * 3. Neither the name of Ericsson nor the names of its contributors
+ *    may be used to endorse or promote products derived from this
+ *    software without specific prior written permission.
+ *
+ * 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 "MediaStreamCenterBlackBerry.h"
+
+#include "IceCandidateDescriptor.h"
+#include "MediaStreamDescriptor.h"
+#include "MediaStreamSourcesQueryClient.h"
+#include "SessionDescriptionDescriptor.h"
+#include <wtf/MainThread.h>
+
+namespace WebCore {
+
+MediaStreamCenter& MediaStreamCenter::instance()
+{
+    ASSERT(isMainThread());
+    DEFINE_STATIC_LOCAL(MediaStreamCenterBlackBerry, center, ());
+    return center;
+}
+
+MediaStreamCenterBlackBerry::MediaStreamCenterBlackBerry()
+{
+}
+
+MediaStreamCenterBlackBerry::~MediaStreamCenterBlackBerry()
+{
+}
+
+void MediaStreamCenterBlackBerry::queryMediaStreamSources(PassRefPtr<MediaStreamSourcesQueryClient> client)
+{
+    MediaStreamSourceVector audioSources, videoSources;
+    client->didCompleteQuery(audioSources, videoSources);
+}
+
+void MediaStreamCenterBlackBerry::didSetMediaStreamTrackEnabled(MediaStreamDescriptor*, MediaStreamComponent*)
+{
+}
+
+void MediaStreamCenterBlackBerry::didStopLocalMediaStream(MediaStreamDescriptor*)
+{
+}
+
+void MediaStreamCenterBlackBerry::didCreateMediaStream(MediaStreamDescriptor*)
+{
+}
+
+String MediaStreamCenterBlackBerry::constructSDP(IceCandidateDescriptor*)
+{
+    return "";
+}
+
+String MediaStreamCenterBlackBerry::constructSDP(SessionDescriptionDescriptor*)
+{
+    return "";
+}
+
+} // namespace WebCore
+
+#endif // ENABLE(MEDIA_STREAM)

Added: trunk/Source/WebCore/platform/mediastream/blackberry/MediaStreamCenterBlackBerry.h (0 => 120188)


--- trunk/Source/WebCore/platform/mediastream/blackberry/MediaStreamCenterBlackBerry.h	                        (rev 0)
+++ trunk/Source/WebCore/platform/mediastream/blackberry/MediaStreamCenterBlackBerry.h	2012-06-13 12:28:50 UTC (rev 120188)
@@ -0,0 +1,68 @@
+/*
+ * Copyright (C) 2011 Ericsson AB. All rights reserved.
+ * Copyright (C) 2012 Research In Motion Limited. 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.
+ * 3. Neither the name of Ericsson nor the names of its contributors
+ *    may be used to endorse or promote products derived from this
+ *    software without specific prior written permission.
+ *
+ * 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.
+ */
+
+#ifndef MediaStreamCenterBlackBerry_h
+#define MediaStreamCenterBlackBerry_h
+
+#if ENABLE(MEDIA_STREAM)
+
+#include "MediaStreamCenter.h"
+
+#include <wtf/PassRefPtr.h>
+#include <wtf/text/WTFString.h>
+
+namespace WebCore {
+
+class IceCandidateDescriptor;
+class MediaStreamComponent;
+class MediaStreamDescriptor;
+class MediaStreamSourcesQueryClient;
+class SessionDescriptionDescriptor;
+
+class MediaStreamCenterBlackBerry : public MediaStreamCenter {
+public:
+    MediaStreamCenterBlackBerry();
+    ~MediaStreamCenterBlackBerry();
+
+    // MediaStreamCenter
+    virtual void queryMediaStreamSources(PassRefPtr<MediaStreamSourcesQueryClient>) OVERRIDE;
+    virtual void didSetMediaStreamTrackEnabled(MediaStreamDescriptor*, MediaStreamComponent*) OVERRIDE;
+    virtual void didStopLocalMediaStream(MediaStreamDescriptor*) OVERRIDE;
+    virtual void didCreateMediaStream(MediaStreamDescriptor*) OVERRIDE;
+    virtual String constructSDP(IceCandidateDescriptor*) OVERRIDE;
+    virtual String constructSDP(SessionDescriptionDescriptor*) OVERRIDE;
+};
+
+} // namespace WebCore
+
+#endif // ENABLE(MEDIA_STREAM)
+
+#endif // MediaStreamCenterBlackBerry_h

Modified: trunk/Source/WebKit/ChangeLog (120187 => 120188)


--- trunk/Source/WebKit/ChangeLog	2012-06-13 12:04:50 UTC (rev 120187)
+++ trunk/Source/WebKit/ChangeLog	2012-06-13 12:28:50 UTC (rev 120188)
@@ -1,3 +1,12 @@
+2012-06-13  Robin Cao  <[email protected]>
+
+        [BlackBerry] Enable MEDIA_STREAM by default
+        https://bugs.webkit.org/show_bug.cgi?id=88849
+
+        Reviewed by Antonio Gomes.
+
+        * PlatformBlackBerry.cmake:
+
 2012-06-12  Christophe Dumez  <[email protected]>
 
         [EFL] Enable SHADOW_DOM flag

Modified: trunk/Source/WebKit/PlatformBlackBerry.cmake (120187 => 120188)


--- trunk/Source/WebKit/PlatformBlackBerry.cmake	2012-06-13 12:04:50 UTC (rev 120187)
+++ trunk/Source/WebKit/PlatformBlackBerry.cmake	2012-06-13 12:28:50 UTC (rev 120188)
@@ -42,6 +42,16 @@
     LIST(APPEND WebKit_SOURCES blackberry/WebCoreSupport/BatteryClientBlackBerry.cpp)
 ENDIF ()
 
+IF (ENABLE_MEDIA_STREAM)
+    LIST(APPEND WebKit_INCLUDE_DIRECTORIES
+        "${WEBCORE_DIR}/Modules/mediastream"
+        "${WEBCORE_DIR}/platform/mediastream"
+    )
+    LIST(APPEND WebKit_SOURCES
+        blackberry/WebCoreSupport/UserMediaClientImpl.cpp
+    )
+ENDIF ()
+
 ADD_DEFINITIONS(-DUSER_PROCESSES)
 
 LIST(APPEND WebKit_SOURCES

Modified: trunk/Source/WebKit/blackberry/Api/WebPage.cpp (120187 => 120188)


--- trunk/Source/WebKit/blackberry/Api/WebPage.cpp	2012-06-13 12:04:50 UTC (rev 120187)
+++ trunk/Source/WebKit/blackberry/Api/WebPage.cpp	2012-06-13 12:28:50 UTC (rev 120188)
@@ -114,6 +114,9 @@
 #include "ThreadCheck.h"
 #include "TouchEventHandler.h"
 #include "TransformationMatrix.h"
+#if ENABLE(MEDIA_STREAM)
+#include "UserMediaClientImpl.h"
+#endif
 #if ENABLE(VIBRATION)
 #include "VibrationClientBlackBerry.h"
 #endif
@@ -510,6 +513,10 @@
     WebCore::provideBatteryTo(m_page, new WebCore::BatteryClientBlackBerry);
 #endif
 
+#if ENABLE(MEDIA_STREAM)
+    WebCore::provideUserMediaTo(m_page, new UserMediaClientImpl(m_webPage));
+#endif
+
 #if ENABLE(NOTIFICATIONS) || ENABLE(LEGACY_NOTIFICATIONS)
     WebCore::provideNotification(m_page, NotificationPresenterImpl::instance());
 #endif

Modified: trunk/Source/WebKit/blackberry/ChangeLog (120187 => 120188)


--- trunk/Source/WebKit/blackberry/ChangeLog	2012-06-13 12:04:50 UTC (rev 120187)
+++ trunk/Source/WebKit/blackberry/ChangeLog	2012-06-13 12:28:50 UTC (rev 120188)
@@ -1,3 +1,24 @@
+2012-06-13  Robin Cao  <[email protected]>
+
+        [BlackBerry] Enable MEDIA_STREAM by default
+        https://bugs.webkit.org/show_bug.cgi?id=88849
+
+        Reviewed by Antonio Gomes.
+
+        * Api/WebPage.cpp:
+        (BlackBerry::WebKit::WebPagePrivate::init):
+        * WebCoreSupport/UserMediaClientImpl.cpp: Added.
+        (WebCore):
+        (WebCore::UserMediaClientImpl::UserMediaClientImpl):
+        (WebCore::UserMediaClientImpl::~UserMediaClientImpl):
+        (WebCore::UserMediaClientImpl::pageDestroyed):
+        (WebCore::UserMediaClientImpl::requestUserMedia):
+        (WebCore::UserMediaClientImpl::cancelUserMediaRequest):
+        * WebCoreSupport/UserMediaClientImpl.h: Added.
+        (WebKit):
+        (WebCore):
+        (UserMediaClientImpl):
+
 2012-06-12  Arvid Nilsson  <[email protected]>
 
         [BlackBerry] Crash when rendering web page that's being destroyed

Added: trunk/Source/WebKit/blackberry/WebCoreSupport/UserMediaClientImpl.cpp (0 => 120188)


--- trunk/Source/WebKit/blackberry/WebCoreSupport/UserMediaClientImpl.cpp	                        (rev 0)
+++ trunk/Source/WebKit/blackberry/WebCoreSupport/UserMediaClientImpl.cpp	2012-06-13 12:28:50 UTC (rev 120188)
@@ -0,0 +1,51 @@
+/*
+ * Copyright (C) 2012 Research In Motion Limited. 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
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+ */
+
+#include "config.h"
+#include "UserMediaClientImpl.h"
+
+#if ENABLE(MEDIA_STREAM)
+#include "WebPage.h"
+
+#include <wtf/RefPtr.h>
+
+namespace WebCore {
+
+UserMediaClientImpl::UserMediaClientImpl(BlackBerry::WebKit::WebPage*)
+{
+}
+
+UserMediaClientImpl::~UserMediaClientImpl()
+{
+}
+
+void UserMediaClientImpl::pageDestroyed()
+{
+}
+
+void UserMediaClientImpl::requestUserMedia(PassRefPtr<UserMediaRequest> prpRequest, const MediaStreamSourceVector& audioSources, const MediaStreamSourceVector& videoSources)
+{
+}
+
+void UserMediaClientImpl::cancelUserMediaRequest(UserMediaRequest*)
+{
+}
+
+}
+
+#endif

Added: trunk/Source/WebKit/blackberry/WebCoreSupport/UserMediaClientImpl.h (0 => 120188)


--- trunk/Source/WebKit/blackberry/WebCoreSupport/UserMediaClientImpl.h	                        (rev 0)
+++ trunk/Source/WebKit/blackberry/WebCoreSupport/UserMediaClientImpl.h	2012-06-13 12:28:50 UTC (rev 120188)
@@ -0,0 +1,55 @@
+/*
+ * Copyright (C) 2012 Research In Motion Limited. 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
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+ */
+
+#ifndef UserMediaClientImpl_h
+#define UserMediaClientImpl_h
+
+#if ENABLE(MEDIA_STREAM)
+
+#include "MediaStreamSource.h"
+#include "UserMediaClient.h"
+
+#include <wtf/PassRefPtr.h>
+
+namespace BlackBerry {
+namespace WebKit {
+class WebPage;
+}
+}
+
+namespace WebCore {
+
+class UserMediaRequest;
+
+class UserMediaClientImpl : public WebCore::UserMediaClient {
+public:
+    UserMediaClientImpl(BlackBerry::WebKit::WebPage*);
+    ~UserMediaClientImpl();
+
+    void pageDestroyed();
+    void requestUserMedia(PassRefPtr<WebCore::UserMediaRequest>, const WebCore::MediaStreamSourceVector& audioSources, const WebCore::MediaStreamSourceVector& videoSources);
+    void cancelUserMediaRequest(WebCore::UserMediaRequest*);
+
+private:
+    UserMediaClientImpl();
+};
+
+}
+
+#endif
+#endif

Modified: trunk/Source/cmake/OptionsBlackBerry.cmake (120187 => 120188)


--- trunk/Source/cmake/OptionsBlackBerry.cmake	2012-06-13 12:04:50 UTC (rev 120187)
+++ trunk/Source/cmake/OptionsBlackBerry.cmake	2012-06-13 12:28:50 UTC (rev 120188)
@@ -145,6 +145,7 @@
 WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_INPUT_TYPE_COLOR ON)
 WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_LEGACY_NOTIFICATIONS ON)
 WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_LEGACY_WEBKIT_BLOB_BUILDER ON)
+WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_MEDIA_STREAM ON)
 WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_NOTIFICATIONS ON)
 WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_ORIENTATION_EVENTS ON)
 WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_PAGE_POPUP ON)

Modified: trunk/Source/cmakeconfig.h.cmake (120187 => 120188)


--- trunk/Source/cmakeconfig.h.cmake	2012-06-13 12:04:50 UTC (rev 120187)
+++ trunk/Source/cmakeconfig.h.cmake	2012-06-13 12:28:50 UTC (rev 120188)
@@ -51,6 +51,7 @@
 #cmakedefine01 ENABLE_LEGACY_NOTIFICATIONS
 #cmakedefine01 ENABLE_LEGACY_WEBKIT_BLOB_BUILDER
 #cmakedefine01 ENABLE_MATHML
+#cmakedefine01 ENABLE_MEDIA_STREAM
 #cmakedefine01 ENABLE_METER_TAG
 #cmakedefine01 ENABLE_MICRODATA
 #cmakedefine01 ENABLE_MUTATION_OBSERVERS

Modified: trunk/Tools/ChangeLog (120187 => 120188)


--- trunk/Tools/ChangeLog	2012-06-13 12:04:50 UTC (rev 120187)
+++ trunk/Tools/ChangeLog	2012-06-13 12:28:50 UTC (rev 120188)
@@ -1,3 +1,12 @@
+2012-06-13  Robin Cao  <[email protected]>
+
+        [BlackBerry] Enable MEDIA_STREAM by default
+        https://bugs.webkit.org/show_bug.cgi?id=88849
+
+        Reviewed by Antonio Gomes.
+
+        * Scripts/webkitperl/FeatureList.pm:
+
 2012-06-13  Tor Arne Vestbø  <[email protected]>
 
         Prevent stderr output from messing up detection of build path

Modified: trunk/Tools/Scripts/webkitperl/FeatureList.pm (120187 => 120188)


--- trunk/Tools/Scripts/webkitperl/FeatureList.pm	2012-06-13 12:04:50 UTC (rev 120187)
+++ trunk/Tools/Scripts/webkitperl/FeatureList.pm	2012-06-13 12:28:50 UTC (rev 120188)
@@ -279,7 +279,7 @@
       define => "ENABLE_MEDIA_STATISTICS", default => 0, value => \$mediaStatisticsSupport },
 
     { option => "media-stream", desc => "Toggle Media Stream support",
-      define => "ENABLE_MEDIA_STREAM", default => (isChromium() || isGtk()), value => \$mediaStreamSupport },
+      define => "ENABLE_MEDIA_STREAM", default => (isChromium() || isGtk() || isBlackBerry()), value => \$mediaStreamSupport },
 
     { option => "meter-tag", desc => "Toggle Meter Tag support",
       define => "ENABLE_METER_TAG", default => !isAppleWinWebKit(), value => \$meterTagSupport },
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to