Diff
Modified: trunk/Source/WebCore/ChangeLog (112420 => 112421)
--- trunk/Source/WebCore/ChangeLog 2012-03-28 18:37:24 UTC (rev 112420)
+++ trunk/Source/WebCore/ChangeLog 2012-03-28 18:44:06 UTC (rev 112421)
@@ -1,3 +1,19 @@
+2012-03-28 Tommy Widenflycht <[email protected]>
+
+ [chromium] MediaStream API (JSEP): Introducing WebPeerConnection00Handler
+ https://bugs.webkit.org/show_bug.cgi?id=82450
+
+ Reviewed by Adam Barth.
+
+ This change removes the default PeerConnection00Handler.cpp from the Chromium build.
+
+ A major overhaul of the existing layout tests is forthcoming.
+
+ * WebCore.gypi:
+ * platform/mediastream/PeerConnection00Handler.h:
+ (WebCore):
+ (PeerConnection00Handler):
+
2012-03-28 Robert Hogan <[email protected]>
[REGRESSION] Web Inspector: column caption delimiters are misaligned in DataGrid
Modified: trunk/Source/WebCore/WebCore.gypi (112420 => 112421)
--- trunk/Source/WebCore/WebCore.gypi 2012-03-28 18:37:24 UTC (rev 112420)
+++ trunk/Source/WebCore/WebCore.gypi 2012-03-28 18:44:06 UTC (rev 112421)
@@ -430,7 +430,6 @@
'platform/mediastream/MediaStreamComponent.h',
'platform/mediastream/MediaStreamDescriptor.h',
'platform/mediastream/MediaStreamSource.h',
- 'platform/mediastream/PeerConnection00Handler.cpp',
'platform/mediastream/PeerConnection00Handler.h',
'platform/mediastream/PeerConnection00HandlerClient.h',
'platform/mediastream/SessionDescriptionDescriptor.cpp',
Modified: trunk/Source/WebCore/platform/mediastream/PeerConnection00Handler.h (112420 => 112421)
--- trunk/Source/WebCore/platform/mediastream/PeerConnection00Handler.h 2012-03-28 18:37:24 UTC (rev 112420)
+++ trunk/Source/WebCore/platform/mediastream/PeerConnection00Handler.h 2012-03-28 18:44:06 UTC (rev 112421)
@@ -46,6 +46,10 @@
class PeerConnection00HandlerClient;
class SessionDescriptionDescriptor;
+#if PLATFORM(CHROMIUM)
+class PeerConnection00HandlerInternal;
+#endif
+
class PeerConnection00Handler {
WTF_MAKE_NONCOPYABLE(PeerConnection00Handler);
WTF_MAKE_FAST_ALLOCATED;
@@ -68,7 +72,11 @@
private:
PeerConnection00Handler(PeerConnection00HandlerClient*, const String& serverConfiguration, const String& username);
+#if PLATFORM(CHROMIUM)
+ OwnPtr<PeerConnection00HandlerInternal> m_private;
+#else
PeerConnection00HandlerClient* m_client;
+#endif
};
} // namespace WebCore
Modified: trunk/Source/WebKit/chromium/ChangeLog (112420 => 112421)
--- trunk/Source/WebKit/chromium/ChangeLog 2012-03-28 18:37:24 UTC (rev 112420)
+++ trunk/Source/WebKit/chromium/ChangeLog 2012-03-28 18:44:06 UTC (rev 112421)
@@ -1,3 +1,67 @@
+2012-03-28 Tommy Widenflycht <[email protected]>
+
+ [chromium] MediaStream API (JSEP): Introducing WebPeerConnection00Handler
+ https://bugs.webkit.org/show_bug.cgi?id=82450
+
+ Reviewed by Adam Barth.
+
+ Last patch to enable the PeerConnection00 functionality in Chromium introduces
+ WebPeerConnection00Handler and WebPeerConnection00HandlerClient, together with the necessary plumbing.
+
+ * WebKit.gyp:
+ * bridge/PeerConnection00Handler.cpp: Added.
+ (WebCore):
+ (WebCore::PeerConnection00Handler::create):
+ (WebCore::PeerConnection00Handler::PeerConnection00Handler):
+ (WebCore::PeerConnection00Handler::~PeerConnection00Handler):
+ (WebCore::PeerConnection00Handler::createOffer):
+ (WebCore::PeerConnection00Handler::createAnswer):
+ (WebCore::PeerConnection00Handler::setLocalDescription):
+ (WebCore::PeerConnection00Handler::setRemoteDescription):
+ (WebCore::PeerConnection00Handler::localDescription):
+ (WebCore::PeerConnection00Handler::remoteDescription):
+ (WebCore::PeerConnection00Handler::startIce):
+ (WebCore::PeerConnection00Handler::processIceMessage):
+ (WebCore::PeerConnection00Handler::addStream):
+ (WebCore::PeerConnection00Handler::removeStream):
+ (WebCore::PeerConnection00Handler::stop):
+ * bridge/PeerConnection00HandlerInternal.cpp: Added.
+ (WebCore):
+ (WebCore::PeerConnection00HandlerInternal::PeerConnection00HandlerInternal):
+ (WebCore::PeerConnection00HandlerInternal::~PeerConnection00HandlerInternal):
+ (WebCore::PeerConnection00HandlerInternal::createOffer):
+ (WebCore::PeerConnection00HandlerInternal::createAnswer):
+ (WebCore::PeerConnection00HandlerInternal::setLocalDescription):
+ (WebCore::PeerConnection00HandlerInternal::setRemoteDescription):
+ (WebCore::PeerConnection00HandlerInternal::localDescription):
+ (WebCore::PeerConnection00HandlerInternal::remoteDescription):
+ (WebCore::PeerConnection00HandlerInternal::startIce):
+ (WebCore::PeerConnection00HandlerInternal::processIceMessage):
+ (WebCore::PeerConnection00HandlerInternal::addStream):
+ (WebCore::PeerConnection00HandlerInternal::removeStream):
+ (WebCore::PeerConnection00HandlerInternal::stop):
+ (WebCore::PeerConnection00HandlerInternal::didGenerateICECandidate):
+ (WebCore::PeerConnection00HandlerInternal::didChangeReadyState):
+ (WebCore::PeerConnection00HandlerInternal::didChangeICEState):
+ (WebCore::PeerConnection00HandlerInternal::didAddRemoteStream):
+ (WebCore::PeerConnection00HandlerInternal::didRemoveRemoteStream):
+ * bridge/PeerConnection00HandlerInternal.h: Copied from Source/WebCore/platform/mediastream/PeerConnection00Handler.h.
+ (WebKit):
+ (WebCore):
+ (PeerConnection00HandlerInternal):
+ * public/platform/WebKitPlatformSupport.h:
+ (WebKit):
+ (WebKit::WebKitPlatformSupport::createPeerConnection00Handler):
+ * public/platform/WebPeerConnection00Handler.h: Added.
+ (WebKit):
+ (WebPeerConnection00Handler):
+ (WebKit::WebPeerConnection00Handler::~WebPeerConnection00Handler):
+ * public/platform/WebPeerConnection00HandlerClient.h: Added.
+ (WebKit):
+ (WebPeerConnection00HandlerClient):
+ (WebKit::WebPeerConnection00HandlerClient::~WebPeerConnection00HandlerClient):
+ * src/AssertMatchingEnums.cpp:
+
2012-03-28 James Robinson <[email protected]>
[chromium] Compositor visibility setting must be updated even if not actively compositing
Modified: trunk/Source/WebKit/chromium/WebKit.gyp (112420 => 112421)
--- trunk/Source/WebKit/chromium/WebKit.gyp 2012-03-28 18:37:24 UTC (rev 112420)
+++ trunk/Source/WebKit/chromium/WebKit.gyp 2012-03-28 18:44:06 UTC (rev 112421)
@@ -97,6 +97,9 @@
'bridge/MediaStreamCenter.cpp',
'bridge/MediaStreamCenterInternal.cpp',
'bridge/MediaStreamCenterInternal.h',
+ 'bridge/PeerConnection00Handler.cpp',
+ 'bridge/PeerConnection00HandlerInternal.cpp',
+ 'bridge/PeerConnection00HandlerInternal.h',
'public/WebAccessibilityNotification.h',
'public/WebAccessibilityObject.h',
'public/WebAccessibilityRole.h',
@@ -328,6 +331,8 @@
'public/platform/WebMediaStreamSource.h',
'public/platform/WebMediaStreamSourcesRequest.h',
'public/platform/WebNonCopyable.h',
+ 'public/platform/WebPeerConnection00Handler.h',
+ 'public/platform/WebPeerConnection00HandlerClient.h',
'public/platform/WebPeerConnectionHandler.h',
'public/platform/WebPeerConnectionHandlerClient.h',
'public/platform/WebPoint.h',
Added: trunk/Source/WebKit/chromium/bridge/PeerConnection00Handler.cpp (0 => 112421)
--- trunk/Source/WebKit/chromium/bridge/PeerConnection00Handler.cpp (rev 0)
+++ trunk/Source/WebKit/chromium/bridge/PeerConnection00Handler.cpp 2012-03-28 18:44:06 UTC (rev 112421)
@@ -0,0 +1,118 @@
+/*
+ * 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.
+ */
+
+#include "config.h"
+
+#if ENABLE(MEDIA_STREAM)
+
+#include "PeerConnection00Handler.h"
+
+#include "IceCandidateDescriptor.h"
+#include "IceOptions.h"
+#include "MediaHints.h"
+#include "MediaStreamDescriptor.h"
+#include "PeerConnection00HandlerClient.h"
+#include "PeerConnection00HandlerInternal.h"
+#include "SessionDescriptionDescriptor.h"
+
+namespace WebCore {
+
+PassOwnPtr<PeerConnection00Handler> PeerConnection00Handler::create(PeerConnection00HandlerClient* client, const String& serverConfiguration, const String& username)
+{
+ return adoptPtr(new PeerConnection00Handler(client, serverConfiguration, username));
+}
+
+PeerConnection00Handler::PeerConnection00Handler(PeerConnection00HandlerClient* client, const String& serverConfiguration, const String& username)
+ : m_private(adoptPtr(new PeerConnection00HandlerInternal(client, serverConfiguration, username)))
+{
+}
+
+PeerConnection00Handler::~PeerConnection00Handler()
+{
+}
+
+PassRefPtr<SessionDescriptionDescriptor> PeerConnection00Handler::createOffer(PassRefPtr<MediaHints> mediaHints)
+{
+ return m_private->createOffer(mediaHints);
+}
+
+PassRefPtr<SessionDescriptionDescriptor> PeerConnection00Handler::createAnswer(const String& offer, PassRefPtr<MediaHints> mediaHints)
+{
+ return m_private->createAnswer(offer, mediaHints);
+}
+
+bool PeerConnection00Handler::setLocalDescription(int action, PassRefPtr<SessionDescriptionDescriptor> sessionDescription)
+{
+ return m_private->setLocalDescription(action, sessionDescription);
+}
+
+bool PeerConnection00Handler::setRemoteDescription(int action, PassRefPtr<SessionDescriptionDescriptor> sessionDescription)
+{
+ return m_private->setRemoteDescription(action, sessionDescription);
+}
+
+PassRefPtr<SessionDescriptionDescriptor> PeerConnection00Handler::localDescription()
+{
+ return m_private->localDescription();
+}
+
+PassRefPtr<SessionDescriptionDescriptor> PeerConnection00Handler::remoteDescription()
+{
+ return m_private->remoteDescription();
+}
+
+bool PeerConnection00Handler::startIce(PassRefPtr<IceOptions> iceOptions)
+{
+ return m_private->startIce(iceOptions);
+}
+
+bool PeerConnection00Handler::processIceMessage(PassRefPtr<IceCandidateDescriptor> iceCandidate)
+{
+ return m_private->processIceMessage(iceCandidate);
+}
+
+void PeerConnection00Handler::addStream(PassRefPtr<MediaStreamDescriptor> mediaStream)
+{
+ m_private->addStream(mediaStream);
+}
+
+void PeerConnection00Handler::removeStream(PassRefPtr<MediaStreamDescriptor> mediaStream)
+{
+ m_private->removeStream(mediaStream);
+}
+
+void PeerConnection00Handler::stop()
+{
+ m_private->stop();
+}
+
+} // namespace WebCore
+
+#endif // ENABLE(MEDIA_STREAM)
Added: trunk/Source/WebKit/chromium/bridge/PeerConnection00HandlerInternal.cpp (0 => 112421)
--- trunk/Source/WebKit/chromium/bridge/PeerConnection00HandlerInternal.cpp (rev 0)
+++ trunk/Source/WebKit/chromium/bridge/PeerConnection00HandlerInternal.cpp 2012-03-28 18:44:06 UTC (rev 112421)
@@ -0,0 +1,187 @@
+/*
+ * 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 "PeerConnection00HandlerInternal.h"
+
+#include "IceCandidateDescriptor.h"
+#include "IceOptions.h"
+#include "MediaHints.h"
+#include "PeerConnection00.h"
+#include "PeerConnection00HandlerClient.h"
+#include "SessionDescriptionDescriptor.h"
+#include "WebKit.h"
+#include "platform/WebICECandidateDescriptor.h"
+#include "platform/WebICEOptions.h"
+#include "platform/WebKitPlatformSupport.h"
+#include "platform/WebMediaHints.h"
+#include "platform/WebMediaStreamDescriptor.h"
+#include "platform/WebPeerConnection00Handler.h"
+#include "platform/WebPeerConnection00HandlerClient.h"
+#include "platform/WebSessionDescriptionDescriptor.h"
+#include <wtf/PassOwnPtr.h>
+
+namespace WebCore {
+
+PeerConnection00HandlerInternal::PeerConnection00HandlerInternal(PeerConnection00HandlerClient* client, const String& serverConfiguration, const String& username)
+ : m_client(client)
+{
+ ASSERT(m_client);
+ m_webHandler = adoptPtr(WebKit::webKitPlatformSupport()->createPeerConnection00Handler(this));
+ // FIXME: When there is some error reporting avaliable in the PeerConnection object report
+ // if we didn't get a WebPeerConnection00Handler instance.
+
+ if (m_webHandler)
+ m_webHandler->initialize(serverConfiguration, username);
+}
+
+PeerConnection00HandlerInternal::~PeerConnection00HandlerInternal()
+{
+}
+
+PassRefPtr<SessionDescriptionDescriptor> PeerConnection00HandlerInternal::createOffer(PassRefPtr<MediaHints> mediaHints)
+{
+ if (!m_webHandler)
+ return 0;
+
+ return m_webHandler->createOffer(mediaHints);
+}
+
+PassRefPtr<SessionDescriptionDescriptor> PeerConnection00HandlerInternal::createAnswer(const String& offer, PassRefPtr<MediaHints> mediaHints)
+{
+ if (!m_webHandler)
+ return 0;
+
+ return m_webHandler->createAnswer(offer, mediaHints);
+}
+
+bool PeerConnection00HandlerInternal::setLocalDescription(int action, PassRefPtr<SessionDescriptionDescriptor> sessionDescription)
+{
+ if (!m_webHandler)
+ return false;
+
+ return m_webHandler->setLocalDescription(static_cast<WebKit::WebPeerConnection00Handler::Action>(action), sessionDescription);
+}
+
+bool PeerConnection00HandlerInternal::setRemoteDescription(int action, PassRefPtr<SessionDescriptionDescriptor> sessionDescription)
+{
+ if (!m_webHandler)
+ return false;
+
+ return m_webHandler->setRemoteDescription(static_cast<WebKit::WebPeerConnection00Handler::Action>(action), sessionDescription);
+}
+
+PassRefPtr<SessionDescriptionDescriptor> PeerConnection00HandlerInternal::localDescription()
+{
+ if (!m_webHandler)
+ return 0;
+
+ return m_webHandler->localDescription();
+}
+
+PassRefPtr<SessionDescriptionDescriptor> PeerConnection00HandlerInternal::remoteDescription()
+{
+ if (!m_webHandler)
+ return 0;
+
+ return m_webHandler->remoteDescription();
+}
+
+bool PeerConnection00HandlerInternal::startIce(PassRefPtr<IceOptions> iceOptions)
+{
+ if (!m_webHandler)
+ return false;
+
+ return m_webHandler->startIce(iceOptions);
+}
+
+bool PeerConnection00HandlerInternal::processIceMessage(PassRefPtr<IceCandidateDescriptor> iceCandidate)
+{
+ if (!m_webHandler)
+ return false;
+
+ return m_webHandler->processIceMessage(iceCandidate);
+}
+
+void PeerConnection00HandlerInternal::addStream(PassRefPtr<MediaStreamDescriptor> mediaStream)
+{
+ if (!m_webHandler)
+ return;
+
+ m_webHandler->addStream(mediaStream);
+}
+
+void PeerConnection00HandlerInternal::removeStream(PassRefPtr<MediaStreamDescriptor> mediaStream)
+{
+ if (!m_webHandler)
+ return;
+
+ m_webHandler->removeStream(mediaStream);
+}
+
+void PeerConnection00HandlerInternal::stop()
+{
+ if (!m_webHandler)
+ return;
+
+ m_webHandler->stop();
+}
+
+void PeerConnection00HandlerInternal::didGenerateICECandidate(const WebKit::WebICECandidateDescriptor& iceCandidate, bool moreToFollow)
+{
+ m_client->didGenerateIceCandidate(iceCandidate, moreToFollow);
+}
+
+void PeerConnection00HandlerInternal::didChangeReadyState(ReadyState state)
+{
+ m_client->didChangeReadyState(state);
+}
+
+void PeerConnection00HandlerInternal::didChangeICEState(ICEState state)
+{
+ m_client->didChangeIceState(state);
+}
+
+void PeerConnection00HandlerInternal::didAddRemoteStream(const WebKit::WebMediaStreamDescriptor& webMediaStreamDescriptor)
+{
+ m_client->didAddRemoteStream(webMediaStreamDescriptor);
+}
+
+void PeerConnection00HandlerInternal::didRemoveRemoteStream(const WebKit::WebMediaStreamDescriptor& webMediaStreamDescriptor)
+{
+ m_client->didRemoveRemoteStream(webMediaStreamDescriptor);
+}
+
+} // namespace WebCore
+
+#endif // ENABLE(MEDIA_STREAM)
Copied: trunk/Source/WebKit/chromium/bridge/PeerConnection00HandlerInternal.h (from rev 112419, trunk/Source/WebCore/platform/mediastream/PeerConnection00Handler.h) (0 => 112421)
--- trunk/Source/WebKit/chromium/bridge/PeerConnection00HandlerInternal.h (rev 0)
+++ trunk/Source/WebKit/chromium/bridge/PeerConnection00HandlerInternal.h 2012-03-28 18:44:06 UTC (rev 112421)
@@ -0,0 +1,90 @@
+/*
+ * 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 PeerConnection00HandlerInternal_h
+#define PeerConnection00HandlerInternal_h
+
+#if ENABLE(MEDIA_STREAM)
+
+#include "MediaStreamDescriptor.h"
+#include "platform/WebPeerConnection00HandlerClient.h"
+#include <wtf/OwnPtr.h>
+#include <wtf/PassRefPtr.h>
+#include <wtf/text/WTFString.h>
+
+namespace WebKit {
+class WebICECandidateDescriptor;
+class WebPeerConnection00Handler;
+class WebMediaStreamDescriptor;
+class WebString;
+}
+
+namespace WebCore {
+
+class IceCandidateDescriptor;
+class IceOptions;
+class MediaHints;
+class PeerConnection00HandlerClient;
+class SessionDescriptionDescriptor;
+
+class PeerConnection00HandlerInternal : public WebKit::WebPeerConnection00HandlerClient {
+public:
+ PeerConnection00HandlerInternal(PeerConnection00HandlerClient*, const String& serverConfiguration, const String& username);
+ ~PeerConnection00HandlerInternal();
+
+ PassRefPtr<SessionDescriptionDescriptor> createOffer(PassRefPtr<MediaHints>);
+ PassRefPtr<SessionDescriptionDescriptor> createAnswer(const String& offer, PassRefPtr<MediaHints>);
+ bool setLocalDescription(int action, PassRefPtr<SessionDescriptionDescriptor>);
+ bool setRemoteDescription(int action, PassRefPtr<SessionDescriptionDescriptor>);
+ PassRefPtr<SessionDescriptionDescriptor> localDescription();
+ PassRefPtr<SessionDescriptionDescriptor> remoteDescription();
+ bool startIce(PassRefPtr<IceOptions>);
+ bool processIceMessage(PassRefPtr<IceCandidateDescriptor>);
+ void addStream(PassRefPtr<MediaStreamDescriptor>);
+ void removeStream(PassRefPtr<MediaStreamDescriptor>);
+ void stop();
+
+ // WebKit::WebJSEPPeerConnectionHandlerClient implementation.
+ virtual void didGenerateICECandidate(const WebKit::WebICECandidateDescriptor&, bool moreToFollow);
+ virtual void didChangeReadyState(ReadyState);
+ virtual void didChangeICEState(ICEState);
+ virtual void didAddRemoteStream(const WebKit::WebMediaStreamDescriptor&);
+ virtual void didRemoveRemoteStream(const WebKit::WebMediaStreamDescriptor&);
+
+private:
+ OwnPtr<WebKit::WebPeerConnection00Handler> m_webHandler;
+ PeerConnection00HandlerClient* m_client;
+};
+
+} // namespace WebCore
+
+#endif // ENABLE(MEDIA_STREAM)
+
+#endif // PeerConnection00HandlerInternal_h
Modified: trunk/Source/WebKit/chromium/public/platform/WebKitPlatformSupport.h (112420 => 112421)
--- trunk/Source/WebKit/chromium/public/platform/WebKitPlatformSupport.h 2012-03-28 18:37:24 UTC (rev 112420)
+++ trunk/Source/WebKit/chromium/public/platform/WebKitPlatformSupport.h 2012-03-28 18:44:06 UTC (rev 112421)
@@ -60,6 +60,8 @@
class WebFileUtilities;
class WebIDBFactory; // FIXME: Does this belong in platform?
class WebIDBKey; // FIXME: Does this belong in platform?
+class WebPeerConnection00Handler;
+class WebPeerConnection00HandlerClient;
class WebMediaStreamCenter;
class WebMediaStreamCenterClient;
class WebMessagePortChannel; // FIXME: Does this belong in platform?
@@ -408,6 +410,7 @@
// May return null if WebRTC functionality is not avaliable or out of resources.
virtual WebPeerConnectionHandler* createPeerConnectionHandler(WebPeerConnectionHandlerClient*) { return 0; }
+ virtual WebPeerConnection00Handler* createPeerConnection00Handler(WebPeerConnection00HandlerClient*) { return 0; }
virtual WebMediaStreamCenter* createMediaStreamCenter(WebMediaStreamCenterClient*) { return 0; }
virtual void didStartWorkerRunLoop(const WebWorkerRunLoop&) { }
Added: trunk/Source/WebKit/chromium/public/platform/WebPeerConnection00Handler.h (0 => 112421)
--- trunk/Source/WebKit/chromium/public/platform/WebPeerConnection00Handler.h (rev 0)
+++ trunk/Source/WebKit/chromium/public/platform/WebPeerConnection00Handler.h 2012-03-28 18:44:06 UTC (rev 112421)
@@ -0,0 +1,74 @@
+/*
+ * 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 WebPeerConnection00Handler_h
+#define WebPeerConnection00Handler_h
+
+#include "WebString.h"
+#include "WebVector.h"
+
+namespace WebKit {
+
+class WebICECandidateDescriptor;
+class WebICEOptions;
+class WebPeerConnection00HandlerClient;
+class WebMediaHints;
+class WebMediaStreamDescriptor;
+class WebSessionDescriptionDescriptor;
+
+class WebPeerConnection00Handler {
+public:
+ enum Action {
+ ActionSDPOffer = 0x100,
+ ActionSDPPRanswer = 0x200,
+ ActionSDPAnswer = 0x300
+ };
+
+ virtual ~WebPeerConnection00Handler() { }
+
+ virtual void initialize(const WebString& serverConfiguration, const WebString& username) = 0;
+
+ virtual WebSessionDescriptionDescriptor createOffer(const WebMediaHints&) = 0;
+ virtual WebSessionDescriptionDescriptor createAnswer(const WebString& offer, const WebMediaHints&) = 0;
+ virtual bool setLocalDescription(Action, const WebSessionDescriptionDescriptor&) = 0;
+ virtual bool setRemoteDescription(Action, const WebSessionDescriptionDescriptor&) = 0;
+ virtual WebSessionDescriptionDescriptor localDescription() = 0;
+ virtual WebSessionDescriptionDescriptor remoteDescription() = 0;
+ virtual bool startIce(const WebICEOptions&) = 0;
+ virtual bool processIceMessage(const WebICECandidateDescriptor&) = 0;
+ virtual void addStream(const WebMediaStreamDescriptor&) = 0;
+ virtual void removeStream(const WebMediaStreamDescriptor&) = 0;
+
+ virtual void stop() = 0;
+};
+
+} // namespace WebKit
+
+#endif // WebPeerConnection00Handler_h
Added: trunk/Source/WebKit/chromium/public/platform/WebPeerConnection00HandlerClient.h (0 => 112421)
--- trunk/Source/WebKit/chromium/public/platform/WebPeerConnection00HandlerClient.h (rev 0)
+++ trunk/Source/WebKit/chromium/public/platform/WebPeerConnection00HandlerClient.h 2012-03-28 18:44:06 UTC (rev 112421)
@@ -0,0 +1,69 @@
+/*
+ * 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 WebPeerConnection00HandlerClient_h
+#define WebPeerConnection00HandlerClient_h
+
+namespace WebKit {
+class WebICECandidateDescriptor;
+class WebMediaStreamDescriptor;
+class WebString;
+
+class WebPeerConnection00HandlerClient {
+public:
+ enum ReadyState {
+ ReadyStateNew = 0,
+ ReadyStateNegotiating = 1,
+ ReadyStateActive = 2,
+ ReadyStateClosed = 3
+ };
+
+ enum ICEState {
+ ICEStateGathering = 0x100,
+ ICEStateWaiting = 0x200,
+ ICEStateChecking = 0x300,
+ ICEStateConnected = 0x400,
+ ICEStateCompleted = 0x500,
+ ICEStateFailed = 0x600,
+ ICEStateClosed = 0x700
+ };
+
+ virtual ~WebPeerConnection00HandlerClient() { }
+
+ virtual void didGenerateICECandidate(const WebICECandidateDescriptor&, bool moreToFollow) = 0;
+ virtual void didChangeReadyState(ReadyState) = 0;
+ virtual void didChangeICEState(ICEState) = 0;
+ virtual void didAddRemoteStream(const WebMediaStreamDescriptor&) = 0;
+ virtual void didRemoveRemoteStream(const WebMediaStreamDescriptor&) = 0;
+};
+
+} // namespace WebKit
+
+#endif // WebPeerConnection00HandlerClient_h
Modified: trunk/Source/WebKit/chromium/src/AssertMatchingEnums.cpp (112420 => 112421)
--- trunk/Source/WebKit/chromium/src/AssertMatchingEnums.cpp 2012-03-28 18:37:24 UTC (rev 112420)
+++ trunk/Source/WebKit/chromium/src/AssertMatchingEnums.cpp 2012-03-28 18:44:06 UTC (rev 112421)
@@ -58,6 +58,7 @@
#include "NotificationClient.h"
#include "PageVisibilityState.h"
#include "PasteboardPrivate.h"
+#include "PeerConnection00.h"
#include "PlatformCursor.h"
#include "SecurityPolicy.h"
#include "Settings.h"
@@ -103,6 +104,8 @@
#include "platform/WebFileSystem.h"
#include "platform/WebICEOptions.h"
#include "platform/WebMediaStreamSource.h"
+#include "platform/WebPeerConnection00Handler.h"
+#include "platform/WebPeerConnection00HandlerClient.h"
#include <wtf/Assertions.h>
#include <wtf/text/StringImpl.h>
@@ -509,6 +512,23 @@
COMPILE_ASSERT_MATCHING_ENUM(WebICEOptions::CandidateTypeAll, IceOptions::ALL);
COMPILE_ASSERT_MATCHING_ENUM(WebICEOptions::CandidateTypeNoRelay, IceOptions::NO_RELAY);
COMPILE_ASSERT_MATCHING_ENUM(WebICEOptions::CandidateTypeOnlyRelay, IceOptions::ONLY_RELAY);
+
+COMPILE_ASSERT_MATCHING_ENUM(WebPeerConnection00Handler::ActionSDPOffer, PeerConnection00::SDP_OFFER);
+COMPILE_ASSERT_MATCHING_ENUM(WebPeerConnection00Handler::ActionSDPPRanswer, PeerConnection00::SDP_PRANSWER);
+COMPILE_ASSERT_MATCHING_ENUM(WebPeerConnection00Handler::ActionSDPAnswer, PeerConnection00::SDP_ANSWER);
+
+COMPILE_ASSERT_MATCHING_ENUM(WebPeerConnection00HandlerClient::ReadyStateNew, PeerConnection00::NEW);
+COMPILE_ASSERT_MATCHING_ENUM(WebPeerConnection00HandlerClient::ReadyStateNegotiating, PeerConnection00::NEGOTIATING);
+COMPILE_ASSERT_MATCHING_ENUM(WebPeerConnection00HandlerClient::ReadyStateActive, PeerConnection00::ACTIVE);
+COMPILE_ASSERT_MATCHING_ENUM(WebPeerConnection00HandlerClient::ReadyStateClosed, PeerConnection00::CLOSED);
+
+COMPILE_ASSERT_MATCHING_ENUM(WebPeerConnection00HandlerClient::ICEStateGathering, PeerConnection00::ICE_GATHERING);
+COMPILE_ASSERT_MATCHING_ENUM(WebPeerConnection00HandlerClient::ICEStateWaiting, PeerConnection00::ICE_WAITING);
+COMPILE_ASSERT_MATCHING_ENUM(WebPeerConnection00HandlerClient::ICEStateChecking, PeerConnection00::ICE_CHECKING);
+COMPILE_ASSERT_MATCHING_ENUM(WebPeerConnection00HandlerClient::ICEStateConnected, PeerConnection00::ICE_CONNECTED);
+COMPILE_ASSERT_MATCHING_ENUM(WebPeerConnection00HandlerClient::ICEStateCompleted, PeerConnection00::ICE_COMPLETED);
+COMPILE_ASSERT_MATCHING_ENUM(WebPeerConnection00HandlerClient::ICEStateFailed, PeerConnection00::ICE_FAILED);
+COMPILE_ASSERT_MATCHING_ENUM(WebPeerConnection00HandlerClient::ICEStateClosed, PeerConnection00::ICE_CLOSED);
#endif
COMPILE_ASSERT_MATCHING_ENUM(WebReferrerPolicyAlways, SecurityPolicy::ReferrerPolicyAlways);