Diff
Modified: trunk/Source/Platform/ChangeLog (124459 => 124460)
--- trunk/Source/Platform/ChangeLog 2012-08-02 15:53:58 UTC (rev 124459)
+++ trunk/Source/Platform/ChangeLog 2012-08-02 15:56:21 UTC (rev 124460)
@@ -1,3 +1,28 @@
+2012-08-02 Tommy Widenflycht <[email protected]>
+
+ MediaStream API: Add RTCPeerConnectionHandler infrastructure
+ https://bugs.webkit.org/show_bug.cgi?id=92866
+
+ Reviewed by Adam Barth.
+
+ Introducing RTCPeerConnectionHandler & RTCPeerConnectionHandlerClient,
+ together with the Chromium WebKit interface, following the pattern of
+ the previous PeerConnection00Handler but with the optimizations from MediaStreamCenter.
+
+ * Platform.gypi:
+ * chromium/public/Platform.h:
+ (WebKit):
+ (Platform):
+ (WebKit::Platform::createRTCPeerConnectionHandler):
+ * chromium/public/WebRTCPeerConnectionHandler.h: Added.
+ (WebKit):
+ (WebRTCPeerConnectionHandler):
+ (WebKit::WebRTCPeerConnectionHandler::~WebRTCPeerConnectionHandler):
+ * chromium/public/WebRTCPeerConnectionHandlerClient.h: Added.
+ (WebKit):
+ (WebRTCPeerConnectionHandlerClient):
+ (WebKit::WebRTCPeerConnectionHandlerClient::~WebRTCPeerConnectionHandlerClient):
+
2012-08-02 Sheriff Bot <[email protected]>
Unreviewed, rolling out r124439.
Modified: trunk/Source/Platform/Platform.gypi (124459 => 124460)
--- trunk/Source/Platform/Platform.gypi 2012-08-02 15:53:58 UTC (rev 124459)
+++ trunk/Source/Platform/Platform.gypi 2012-08-02 15:56:21 UTC (rev 124460)
@@ -107,6 +107,8 @@
'chromium/public/WebPrivateOwnPtr.h',
'chromium/public/WebPrivatePtr.h',
'chromium/public/WebRTCConfiguration.h',
+ 'chromium/public/WebRTCPeerConnectionHandler.h',
+ 'chromium/public/WebRTCPeerConnectionHandlerClient.h',
'chromium/public/WebRect.h',
'chromium/public/WebReferrerPolicy.h',
'chromium/public/WebRenderingStats.h',
Modified: trunk/Source/Platform/chromium/public/Platform.h (124459 => 124460)
--- trunk/Source/Platform/chromium/public/Platform.h 2012-08-02 15:53:58 UTC (rev 124459)
+++ trunk/Source/Platform/chromium/public/Platform.h 2012-08-02 15:56:21 UTC (rev 124460)
@@ -58,15 +58,15 @@
class WebMimeRegistry;
class WebPeerConnection00Handler;
class WebPeerConnection00HandlerClient;
-class WebPeerConnectionHandler;
-class WebPeerConnectionHandlerClient;
-class WebURL;
-class WebURLLoader;
+class WebRTCPeerConnectionHandler;
+class WebRTCPeerConnectionHandlerClient;
class WebSandboxSupport;
class WebSocketStreamHandle;
class WebStorageNamespace;
class WebThemeEngine;
class WebThread;
+class WebURL;
+class WebURLLoader;
class WebWorkerRunLoop;
struct WebLocalizedString;
@@ -414,16 +414,16 @@
// WebRTC ----------------------------------------------------------
// DEPRECATED
- // Creates an WebPeerConnectionHandler for DeprecatedPeerConnection.
- // May return null if WebRTC functionality is not avaliable or out of resources.
- virtual WebPeerConnectionHandler* createPeerConnectionHandler(WebPeerConnectionHandlerClient*) { return 0; }
-
// Creates an WebPeerConnection00Handler for PeerConnection00.
// This is an highly experimental feature not yet in the WebRTC standard.
// May return null if WebRTC functionality is not avaliable or out of resources.
virtual WebPeerConnection00Handler* createPeerConnection00Handler(WebPeerConnection00HandlerClient*) { return 0; }
+ // Creates an WebRTCPeerConnectionHandler for RTCPeerConnection.
// May return null if WebRTC functionality is not avaliable or out of resources.
+ virtual WebRTCPeerConnectionHandler* createRTCPeerConnectionHandler(WebRTCPeerConnectionHandlerClient*) { return 0; }
+
+ // May return null if WebRTC functionality is not avaliable or out of resources.
virtual WebMediaStreamCenter* createMediaStreamCenter(WebMediaStreamCenterClient*) { return 0; }
Added: trunk/Source/Platform/chromium/public/WebRTCPeerConnectionHandler.h (0 => 124460)
--- trunk/Source/Platform/chromium/public/WebRTCPeerConnectionHandler.h (rev 0)
+++ trunk/Source/Platform/chromium/public/WebRTCPeerConnectionHandler.h 2012-08-02 15:56:21 UTC (rev 124460)
@@ -0,0 +1,46 @@
+/*
+ * Copyright (C) 2012 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:
+ *
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * 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.
+ * * Neither the name of Google Inc. 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 WebRTCPeerConnectionHandler_h
+#define WebRTCPeerConnectionHandler_h
+
+namespace WebKit {
+class WebRTCPeerConnectionHandlerClient;
+
+class WebRTCPeerConnectionHandler {
+public:
+ virtual ~WebRTCPeerConnectionHandler() { }
+
+ virtual bool initialize() = 0;
+};
+
+} // namespace WebKit
+
+#endif // WebRTCPeerConnectionHandler_h
Added: trunk/Source/Platform/chromium/public/WebRTCPeerConnectionHandlerClient.h (0 => 124460)
--- trunk/Source/Platform/chromium/public/WebRTCPeerConnectionHandlerClient.h (rev 0)
+++ trunk/Source/Platform/chromium/public/WebRTCPeerConnectionHandlerClient.h 2012-08-02 15:56:21 UTC (rev 124460)
@@ -0,0 +1,43 @@
+/*
+ * Copyright (C) 2012 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:
+ *
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * 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.
+ * * Neither the name of Google Inc. 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 WebRTCPeerConnectionHandlerClient_h
+#define WebRTCPeerConnectionHandlerClient_h
+
+namespace WebKit {
+
+class WebRTCPeerConnectionHandlerClient {
+public:
+ virtual ~WebRTCPeerConnectionHandlerClient() { }
+};
+
+} // namespace WebKit
+
+#endif // WebRTCPeerConnectionHandlerClient_h
Modified: trunk/Source/WebCore/CMakeLists.txt (124459 => 124460)
--- trunk/Source/WebCore/CMakeLists.txt 2012-08-02 15:53:58 UTC (rev 124459)
+++ trunk/Source/WebCore/CMakeLists.txt 2012-08-02 15:56:21 UTC (rev 124460)
@@ -1892,6 +1892,7 @@
platform/mediastream/MediaHints.cpp
platform/mediastream/MediaStreamCenter.cpp
platform/mediastream/PeerConnection00Handler.cpp
+ platform/mediastream/RTCPeerConnectionHandler.cpp
platform/mediastream/SessionDescriptionDescriptor.cpp
platform/mock/DeviceMotionClientMock.cpp
Modified: trunk/Source/WebCore/ChangeLog (124459 => 124460)
--- trunk/Source/WebCore/ChangeLog 2012-08-02 15:53:58 UTC (rev 124459)
+++ trunk/Source/WebCore/ChangeLog 2012-08-02 15:56:21 UTC (rev 124460)
@@ -1,3 +1,50 @@
+2012-08-02 Tommy Widenflycht <[email protected]>
+
+ MediaStream API: Add RTCPeerConnectionHandler infrastructure
+ https://bugs.webkit.org/show_bug.cgi?id=92866
+
+ Reviewed by Adam Barth.
+
+ Introducing RTCPeerConnectionHandler & RTCPeerConnectionHandlerClient,
+ together with the Chromium WebKit interface, following the pattern of
+ the previous PeerConnection00Handler but with the optimizations from MediaStreamCenter.
+
+ Not yet testable due to not enough code landed.
+
+ * CMakeLists.txt:
+ * GNUmakefile.list.am:
+ * Modules/mediastream/RTCPeerConnection.cpp:
+ (WebCore::RTCPeerConnection::create):
+ (WebCore::RTCPeerConnection::RTCPeerConnection):
+ * Modules/mediastream/RTCPeerConnection.h:
+ (RTCPeerConnection):
+ * WebCore.gypi:
+ * platform/mediastream/RTCPeerConnectionHandler.cpp: Added.
+ (WebCore):
+ (RTCPeerConnectionHandlerDummy):
+ (WebCore::RTCPeerConnectionHandler::create):
+ (WebCore::RTCPeerConnectionHandlerDummy::RTCPeerConnectionHandlerDummy):
+ (WebCore::RTCPeerConnectionHandlerDummy::~RTCPeerConnectionHandlerDummy):
+ (WebCore::RTCPeerConnectionHandlerDummy::initialize):
+ * platform/mediastream/RTCPeerConnectionHandler.h: Copied from Source/WebCore/Modules/mediastream/RTCPeerConnection.h.
+ (WebCore):
+ (RTCPeerConnectionHandler):
+ (WebCore::RTCPeerConnectionHandler::~RTCPeerConnectionHandler):
+ (WebCore::RTCPeerConnectionHandler::RTCPeerConnectionHandler):
+ * platform/mediastream/RTCPeerConnectionHandlerClient.h: Copied from Source/WebCore/Modules/mediastream/RTCPeerConnection.h.
+ (WebCore):
+ (RTCPeerConnectionHandlerClient):
+ (WebCore::RTCPeerConnectionHandlerClient::~RTCPeerConnectionHandlerClient):
+ * platform/mediastream/chromium/RTCPeerConnectionHandlerChromium.cpp: Added.
+ (WebCore):
+ (WebCore::RTCPeerConnectionHandler::create):
+ (WebCore::RTCPeerConnectionHandlerChromium::RTCPeerConnectionHandlerChromium):
+ (WebCore::RTCPeerConnectionHandlerChromium::~RTCPeerConnectionHandlerChromium):
+ (WebCore::RTCPeerConnectionHandlerChromium::initialize):
+ * platform/mediastream/chromium/RTCPeerConnectionHandlerChromium.h: Added.
+ (WebCore):
+ (RTCPeerConnectionHandlerChromium):
+
2012-08-02 Kent Tamura <[email protected]>
Move number localization code in LocaleICU.cpp to new class
Modified: trunk/Source/WebCore/GNUmakefile.list.am (124459 => 124460)
--- trunk/Source/WebCore/GNUmakefile.list.am 2012-08-02 15:53:58 UTC (rev 124459)
+++ trunk/Source/WebCore/GNUmakefile.list.am 2012-08-02 15:56:21 UTC (rev 124460)
@@ -3562,6 +3562,9 @@
Source/WebCore/platform/mediastream/PeerConnection00Handler.h \
Source/WebCore/platform/mediastream/PeerConnection00HandlerClient.h \
Source/WebCore/platform/mediastream/RTCConfiguration.h \
+ Source/WebCore/platform/mediastream/RTCPeerConnectionHandler.cpp \
+ Source/WebCore/platform/mediastream/RTCPeerConnectionHandler.h \
+ Source/WebCore/platform/mediastream/RTCPeerConnectionHandlerClient.h \
Source/WebCore/platform/mediastream/SessionDescriptionDescriptor.cpp \
Source/WebCore/platform/mediastream/SessionDescriptionDescriptor.h \
Source/WebCore/platform/mediastream/gstreamer/MediaStreamCenterGStreamer.cpp \
Modified: trunk/Source/WebCore/Modules/mediastream/RTCPeerConnection.cpp (124459 => 124460)
--- trunk/Source/WebCore/Modules/mediastream/RTCPeerConnection.cpp 2012-08-02 15:53:58 UTC (rev 124459)
+++ trunk/Source/WebCore/Modules/mediastream/RTCPeerConnection.cpp 2012-08-02 15:56:21 UTC (rev 124460)
@@ -97,16 +97,19 @@
return 0;
RefPtr<RTCPeerConnection> peerConnection = adoptRef(new RTCPeerConnection(context, configuration.release(), ec));
+ peerConnection->suspendIfNeeded();
if (ec)
return 0;
- peerConnection->suspendIfNeeded();
return peerConnection.release();
}
RTCPeerConnection::RTCPeerConnection(ScriptExecutionContext* context, PassRefPtr<RTCConfiguration>, ExceptionCode& ec)
: ActiveDOMObject(context, this)
{
+ m_peerHandler = RTCPeerConnectionHandler::create(this);
+ if (!m_peerHandler || !m_peerHandler->initialize())
+ ec = NOT_SUPPORTED_ERR;
}
RTCPeerConnection::~RTCPeerConnection()
Modified: trunk/Source/WebCore/Modules/mediastream/RTCPeerConnection.h (124459 => 124460)
--- trunk/Source/WebCore/Modules/mediastream/RTCPeerConnection.h 2012-08-02 15:53:58 UTC (rev 124459)
+++ trunk/Source/WebCore/Modules/mediastream/RTCPeerConnection.h 2012-08-02 15:56:21 UTC (rev 124460)
@@ -37,12 +37,14 @@
#include "Dictionary.h"
#include "EventTarget.h"
#include "ExceptionBase.h"
+#include "RTCPeerConnectionHandler.h"
+#include "RTCPeerConnectionHandlerClient.h"
#include <wtf/RefCounted.h>
namespace WebCore {
class RTCConfiguration;
-class RTCPeerConnection : public RefCounted<RTCPeerConnection>, public EventTarget, public ActiveDOMObject {
+class RTCPeerConnection : public RefCounted<RTCPeerConnection>, public RTCPeerConnectionHandlerClient, public EventTarget, public ActiveDOMObject {
public:
static PassRefPtr<RTCPeerConnection> create(ScriptExecutionContext*, const Dictionary& rtcConfiguration, const Dictionary& mediaConstraints, ExceptionCode&);
~RTCPeerConnection();
@@ -68,6 +70,8 @@
virtual void refEventTarget() { ref(); }
virtual void derefEventTarget() { deref(); }
EventTargetData m_eventTargetData;
+
+ OwnPtr<RTCPeerConnectionHandler> m_peerHandler;
};
} // namespace WebCore
Modified: trunk/Source/WebCore/WebCore.gypi (124459 => 124460)
--- trunk/Source/WebCore/WebCore.gypi 2012-08-02 15:53:58 UTC (rev 124459)
+++ trunk/Source/WebCore/WebCore.gypi 2012-08-02 15:56:21 UTC (rev 124460)
@@ -451,6 +451,8 @@
'platform/mediastream/PeerConnection00Handler.h',
'platform/mediastream/PeerConnection00HandlerClient.h',
'platform/mediastream/RTCConfiguration.h',
+ 'platform/mediastream/RTCPeerConnectionHandler.h',
+ 'platform/mediastream/RTCPeerConnectionHandlerClient.h',
'platform/mediastream/SessionDescriptionDescriptor.cpp',
'platform/mediastream/SessionDescriptionDescriptor.h',
'platform/mediastream/chromium/MediaStreamCenterChromium.cpp',
@@ -458,6 +460,8 @@
'platform/mediastream/chromium/PeerConnection00Handler.cpp',
'platform/mediastream/chromium/PeerConnection00HandlerInternal.cpp',
'platform/mediastream/chromium/PeerConnection00HandlerInternal.h',
+ 'platform/mediastream/chromium/RTCPeerConnectionHandlerChromium.cpp',
+ 'platform/mediastream/chromium/RTCPeerConnectionHandlerChromium.h',
'platform/mock/DeviceMotionClientMock.h',
'platform/mock/DeviceOrientationClientMock.h',
'platform/mock/GeolocationClientMock.h',
Added: trunk/Source/WebCore/platform/mediastream/RTCPeerConnectionHandler.cpp (0 => 124460)
--- trunk/Source/WebCore/platform/mediastream/RTCPeerConnectionHandler.cpp (rev 0)
+++ trunk/Source/WebCore/platform/mediastream/RTCPeerConnectionHandler.cpp 2012-08-02 15:56:21 UTC (rev 124460)
@@ -0,0 +1,77 @@
+/*
+ * Copyright (C) 2012 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:
+ *
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * 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.
+ * * Neither the name of Google Inc. 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 "RTCPeerConnectionHandler.h"
+
+#include "RTCPeerConnectionHandlerClient.h"
+#include <wtf/PassOwnPtr.h>
+
+namespace WebCore {
+
+// Dummy implementations below for ports that build with MEDIA_STREAM enabled by default.
+
+class RTCPeerConnectionHandlerDummy : public RTCPeerConnectionHandler {
+public:
+ RTCPeerConnectionHandlerDummy(RTCPeerConnectionHandlerClient*);
+ virtual ~RTCPeerConnectionHandlerDummy();
+
+ virtual bool initialize() OVERRIDE;
+
+private:
+ RTCPeerConnectionHandlerClient* m_client;
+};
+
+PassOwnPtr<RTCPeerConnectionHandler> RTCPeerConnectionHandler::create(RTCPeerConnectionHandlerClient* client)
+{
+ return adoptPtr(new RTCPeerConnectionHandlerDummy(client));
+}
+
+RTCPeerConnectionHandlerDummy::RTCPeerConnectionHandlerDummy(RTCPeerConnectionHandlerClient* client)
+ : m_client(client)
+{
+ ASSERT(m_client);
+}
+
+RTCPeerConnectionHandlerDummy::~RTCPeerConnectionHandlerDummy()
+{
+}
+
+bool RTCPeerConnectionHandlerDummy::initialize()
+{
+ return false;
+}
+
+} // namespace WebCore
+
+#endif // ENABLE(MEDIA_STREAM)
Copied: trunk/Source/WebCore/platform/mediastream/RTCPeerConnectionHandler.h (from rev 124459, trunk/Source/WebCore/Modules/mediastream/RTCPeerConnection.h) (0 => 124460)
--- trunk/Source/WebCore/platform/mediastream/RTCPeerConnectionHandler.h (rev 0)
+++ trunk/Source/WebCore/platform/mediastream/RTCPeerConnectionHandler.h 2012-08-02 15:56:21 UTC (rev 124460)
@@ -0,0 +1,58 @@
+/*
+ * Copyright (C) 2012 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.
+ * 3. Neither the name of Google Inc. 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 RTCPeerConnectionHandler_h
+#define RTCPeerConnectionHandler_h
+
+#if ENABLE(MEDIA_STREAM)
+
+#include <wtf/PassOwnPtr.h>
+#include <wtf/PassRefPtr.h>
+
+namespace WebCore {
+
+class RTCPeerConnectionHandlerClient;
+
+class RTCPeerConnectionHandler {
+public:
+ static PassOwnPtr<RTCPeerConnectionHandler> create(RTCPeerConnectionHandlerClient*);
+ virtual ~RTCPeerConnectionHandler() { }
+
+ virtual bool initialize() = 0;
+
+protected:
+ RTCPeerConnectionHandler() { }
+};
+
+} // namespace WebCore
+
+#endif // ENABLE(MEDIA_STREAM)
+
+#endif // RTCPeerConnectionHandler_h
Added: trunk/Source/WebCore/platform/mediastream/RTCPeerConnectionHandlerClient.h (0 => 124460)
--- trunk/Source/WebCore/platform/mediastream/RTCPeerConnectionHandlerClient.h (rev 0)
+++ trunk/Source/WebCore/platform/mediastream/RTCPeerConnectionHandlerClient.h 2012-08-02 15:56:21 UTC (rev 124460)
@@ -0,0 +1,48 @@
+/*
+ * Copyright (C) 2012 Google 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 Google Inc. 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 RTCPeerConnectionHandlerClient_h
+#define RTCPeerConnectionHandlerClient_h
+
+#if ENABLE(MEDIA_STREAM)
+
+namespace WebCore {
+
+class RTCPeerConnectionHandlerClient {
+public:
+ virtual ~RTCPeerConnectionHandlerClient() { }
+
+};
+
+} // namespace WebCore
+
+#endif // ENABLE(MEDIA_STREAM)
+
+#endif // RTCPeerConnectionHandlerClient_h
Added: trunk/Source/WebCore/platform/mediastream/chromium/RTCPeerConnectionHandlerChromium.cpp (0 => 124460)
--- trunk/Source/WebCore/platform/mediastream/chromium/RTCPeerConnectionHandlerChromium.cpp (rev 0)
+++ trunk/Source/WebCore/platform/mediastream/chromium/RTCPeerConnectionHandlerChromium.cpp 2012-08-02 15:56:21 UTC (rev 124460)
@@ -0,0 +1,65 @@
+/*
+ * Copyright (C) 2012 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:
+ *
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * 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.
+ * * Neither the name of Google Inc. 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 "RTCPeerConnectionHandlerChromium.h"
+
+#include "RTCPeerConnectionHandlerClient.h"
+#include <public/Platform.h>
+#include <wtf/PassOwnPtr.h>
+
+namespace WebCore {
+
+PassOwnPtr<RTCPeerConnectionHandler> RTCPeerConnectionHandler::create(RTCPeerConnectionHandlerClient* client)
+{
+ return adoptPtr(new RTCPeerConnectionHandlerChromium(client));
+}
+
+RTCPeerConnectionHandlerChromium::RTCPeerConnectionHandlerChromium(RTCPeerConnectionHandlerClient*)
+{
+}
+
+RTCPeerConnectionHandlerChromium::~RTCPeerConnectionHandlerChromium()
+{
+}
+
+bool RTCPeerConnectionHandlerChromium::initialize()
+{
+ m_webHandler = adoptPtr(WebKit::Platform::current()->createRTCPeerConnectionHandler(this));
+ // FIXME: Change the default value to false once the mock WebRTCPeerConnectionHandler has landed.
+ return m_webHandler ? m_webHandler->initialize() : true;
+}
+
+} // namespace WebCore
+
+#endif // ENABLE(MEDIA_STREAM)
Added: trunk/Source/WebCore/platform/mediastream/chromium/RTCPeerConnectionHandlerChromium.h (0 => 124460)
--- trunk/Source/WebCore/platform/mediastream/chromium/RTCPeerConnectionHandlerChromium.h (rev 0)
+++ trunk/Source/WebCore/platform/mediastream/chromium/RTCPeerConnectionHandlerChromium.h 2012-08-02 15:56:21 UTC (rev 124460)
@@ -0,0 +1,59 @@
+/*
+ * Copyright (C) 2012 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:
+ *
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * 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.
+ * * Neither the name of Google Inc. 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 RTCPeerConnectionHandlerChromium_h
+#define RTCPeerConnectionHandlerChromium_h
+
+#if ENABLE(MEDIA_STREAM)
+
+#include "RTCPeerConnectionHandler.h"
+#include <public/WebRTCPeerConnectionHandler.h>
+#include <public/WebRTCPeerConnectionHandlerClient.h>
+#include <wtf/OwnPtr.h>
+#include <wtf/PassRefPtr.h>
+
+namespace WebCore {
+
+class RTCPeerConnectionHandlerChromium : public RTCPeerConnectionHandler, public WebKit::WebRTCPeerConnectionHandlerClient {
+public:
+ RTCPeerConnectionHandlerChromium(RTCPeerConnectionHandlerClient*);
+ virtual ~RTCPeerConnectionHandlerChromium();
+
+ virtual bool initialize() OVERRIDE;
+
+private:
+ OwnPtr<WebKit::WebRTCPeerConnectionHandler> m_webHandler;
+};
+
+} // namespace WebCore
+
+#endif // ENABLE(MEDIA_STREAM)
+
+#endif // RTCPeerConnectionHandlerChromium_h