Diff
Modified: trunk/Tools/ChangeLog (124627 => 124628)
--- trunk/Tools/ChangeLog 2012-08-03 17:45:09 UTC (rev 124627)
+++ trunk/Tools/ChangeLog 2012-08-03 18:17:59 UTC (rev 124628)
@@ -1,3 +1,28 @@
+2012-08-03 Tommy Widenflycht <[email protected]>
+
+ [chromium] MediaStream API: Add MockWebRTCPeerConnectionHandler
+ https://bugs.webkit.org/show_bug.cgi?id=93091
+
+ Reviewed by Adam Barth.
+
+ Add a skeleton MockWebRTCPeerConnectionHandler to DumpRenderTree,
+ to complete the infrastructure for RTCPeerConnection.
+
+ * DumpRenderTree/DumpRenderTree.gypi:
+ * DumpRenderTree/chromium/MockWebKitPlatformSupport.cpp:
+ (MockWebKitPlatformSupport::createRTCPeerConnectionHandler):
+ * DumpRenderTree/chromium/MockWebKitPlatformSupport.h:
+ (MockWebKitPlatformSupport):
+ * DumpRenderTree/chromium/MockWebMediaStreamCenter.cpp:
+ * DumpRenderTree/chromium/MockWebMediaStreamCenter.h:
+ * DumpRenderTree/chromium/MockWebRTCPeerConnectionHandler.cpp: Copied from Tools/DumpRenderTree/chromium/MockWebKitPlatformSupport.h.
+ (MockWebRTCPeerConnectionHandler::MockWebRTCPeerConnectionHandler):
+ (MockWebRTCPeerConnectionHandler::initialize):
+ * DumpRenderTree/chromium/MockWebRTCPeerConnectionHandler.h: Copied from Tools/DumpRenderTree/chromium/MockWebKitPlatformSupport.h.
+ (WebKit):
+ (MockWebRTCPeerConnectionHandler):
+ (MockWebRTCPeerConnectionHandler::MockWebRTCPeerConnectionHandler):
+
2012-08-03 Hugo Parente Lima <[email protected]>
[Qt][WK2] There's no way to test the gesture tap on WTR
Modified: trunk/Tools/DumpRenderTree/DumpRenderTree.gypi (124627 => 124628)
--- trunk/Tools/DumpRenderTree/DumpRenderTree.gypi 2012-08-03 17:45:09 UTC (rev 124627)
+++ trunk/Tools/DumpRenderTree/DumpRenderTree.gypi 2012-08-03 18:17:59 UTC (rev 124628)
@@ -18,6 +18,8 @@
'chromium/MockWebMediaStreamCenter.h',
'chromium/MockWebPrerenderingSupport.cpp',
'chromium/MockWebPrerenderingSupport.h',
+ 'chromium/MockWebRTCPeerConnectionHandler.cpp',
+ 'chromium/MockWebRTCPeerConnectionHandler.h',
'chromium/MockWebSpeechInputController.cpp',
'chromium/MockWebSpeechInputController.h',
'chromium/MockWebSpeechRecognizer.cpp',
Modified: trunk/Tools/DumpRenderTree/chromium/MockWebKitPlatformSupport.cpp (124627 => 124628)
--- trunk/Tools/DumpRenderTree/chromium/MockWebKitPlatformSupport.cpp 2012-08-03 17:45:09 UTC (rev 124627)
+++ trunk/Tools/DumpRenderTree/chromium/MockWebKitPlatformSupport.cpp 2012-08-03 18:17:59 UTC (rev 124628)
@@ -32,6 +32,7 @@
#include "MockWebKitPlatformSupport.h"
#include "MockWebMediaStreamCenter.h"
+#include "MockWebRTCPeerConnectionHandler.h"
#include <wtf/Assertions.h>
#include <wtf/PassOwnPtr.h>
@@ -63,4 +64,12 @@
return m_mockMediaStreamCenter.get();
}
+
+WebRTCPeerConnectionHandler* MockWebKitPlatformSupport::createRTCPeerConnectionHandler(WebRTCPeerConnectionHandlerClient* client)
+{
+ if (!m_mockRTCPeerConnectionHandler)
+ m_mockRTCPeerConnectionHandler = adoptPtr(new MockWebRTCPeerConnectionHandler(client));
+
+ return m_mockRTCPeerConnectionHandler.get();
+}
#endif // ENABLE(MEDIA_STREAM)
Modified: trunk/Tools/DumpRenderTree/chromium/MockWebKitPlatformSupport.h (124627 => 124628)
--- trunk/Tools/DumpRenderTree/chromium/MockWebKitPlatformSupport.h 2012-08-03 17:45:09 UTC (rev 124627)
+++ trunk/Tools/DumpRenderTree/chromium/MockWebKitPlatformSupport.h 2012-08-03 18:17:59 UTC (rev 124628)
@@ -44,6 +44,7 @@
#if ENABLE(MEDIA_STREAM)
virtual WebKit::WebMediaStreamCenter* createMediaStreamCenter(WebKit::WebMediaStreamCenterClient*) OVERRIDE;
+ virtual WebKit::WebRTCPeerConnectionHandler* createRTCPeerConnectionHandler(WebKit::WebRTCPeerConnectionHandlerClient*) OVERRIDE;
#endif // ENABLE(MEDIA_STREAM)
private:
@@ -51,6 +52,7 @@
#if ENABLE(MEDIA_STREAM)
OwnPtr<WebKit::WebMediaStreamCenter> m_mockMediaStreamCenter;
+ OwnPtr<WebKit::WebRTCPeerConnectionHandler> m_mockRTCPeerConnectionHandler;
#endif // ENABLE(MEDIA_STREAM)
};
Modified: trunk/Tools/DumpRenderTree/chromium/MockWebMediaStreamCenter.cpp (124627 => 124628)
--- trunk/Tools/DumpRenderTree/chromium/MockWebMediaStreamCenter.cpp 2012-08-03 17:45:09 UTC (rev 124627)
+++ trunk/Tools/DumpRenderTree/chromium/MockWebMediaStreamCenter.cpp 2012-08-03 18:17:59 UTC (rev 124628)
@@ -33,14 +33,14 @@
#include "MockWebMediaStreamCenter.h"
-#include "platform/WebICECandidateDescriptor.h"
-#include "platform/WebMediaStreamCenterClient.h"
-#include "platform/WebMediaStreamComponent.h"
-#include "platform/WebMediaStreamDescriptor.h"
-#include "platform/WebMediaStreamSource.h"
-#include "platform/WebMediaStreamSourcesRequest.h"
-#include "platform/WebSessionDescriptionDescriptor.h"
-#include "platform/WebVector.h"
+#include <public/WebICECandidateDescriptor.h>
+#include <public/WebMediaStreamCenterClient.h>
+#include <public/WebMediaStreamComponent.h>
+#include <public/WebMediaStreamDescriptor.h>
+#include <public/WebMediaStreamSource.h>
+#include <public/WebMediaStreamSourcesRequest.h>
+#include <public/WebSessionDescriptionDescriptor.h>
+#include <public/WebVector.h>
using namespace WebKit;
Modified: trunk/Tools/DumpRenderTree/chromium/MockWebMediaStreamCenter.h (124627 => 124628)
--- trunk/Tools/DumpRenderTree/chromium/MockWebMediaStreamCenter.h 2012-08-03 17:45:09 UTC (rev 124627)
+++ trunk/Tools/DumpRenderTree/chromium/MockWebMediaStreamCenter.h 2012-08-03 18:17:59 UTC (rev 124628)
@@ -32,7 +32,7 @@
#define MockWebMediaStreamCenter_h
#if ENABLE(MEDIA_STREAM)
-#include "platform/WebMediaStreamCenter.h"
+#include <public/WebMediaStreamCenter.h>
namespace WebKit {
class WebMediaStreamCenterClient;
Copied: trunk/Tools/DumpRenderTree/chromium/MockWebRTCPeerConnectionHandler.cpp (from rev 124627, trunk/Tools/DumpRenderTree/chromium/MockWebKitPlatformSupport.h) (0 => 124628)
--- trunk/Tools/DumpRenderTree/chromium/MockWebRTCPeerConnectionHandler.cpp (rev 0)
+++ trunk/Tools/DumpRenderTree/chromium/MockWebRTCPeerConnectionHandler.cpp 2012-08-03 18:17:59 UTC (rev 124628)
@@ -0,0 +1,49 @@
+/*
+ * 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 "MockWebRTCPeerConnectionHandler.h"
+
+#include <public/WebRTCPeerConnectionHandlerClient.h>
+
+using namespace WebKit;
+
+MockWebRTCPeerConnectionHandler::MockWebRTCPeerConnectionHandler(WebRTCPeerConnectionHandlerClient* client)
+{
+}
+
+bool MockWebRTCPeerConnectionHandler::initialize()
+{
+ return true;
+}
+
+#endif // ENABLE(MEDIA_STREAM)
Copied: trunk/Tools/DumpRenderTree/chromium/MockWebRTCPeerConnectionHandler.h (from rev 124627, trunk/Tools/DumpRenderTree/chromium/MockWebKitPlatformSupport.h) (0 => 124628)
--- trunk/Tools/DumpRenderTree/chromium/MockWebRTCPeerConnectionHandler.h (rev 0)
+++ trunk/Tools/DumpRenderTree/chromium/MockWebRTCPeerConnectionHandler.h 2012-08-03 18:17:59 UTC (rev 124628)
@@ -0,0 +1,54 @@
+/*
+ * 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 MockWebRTCPeerConnectionHandler_h
+#define MockWebRTCPeerConnectionHandler_h
+
+#if ENABLE(MEDIA_STREAM)
+#include <public/WebRTCPeerConnectionHandler.h>
+
+namespace WebKit {
+class WebRTCPeerConnectionHandlerClient;
+};
+
+class MockWebRTCPeerConnectionHandler : public WebKit::WebRTCPeerConnectionHandler {
+public:
+ explicit MockWebRTCPeerConnectionHandler(WebKit::WebRTCPeerConnectionHandlerClient*);
+
+ virtual bool initialize() OVERRIDE;
+
+private:
+ MockWebRTCPeerConnectionHandler() { }
+};
+
+#endif // ENABLE(MEDIA_STREAM)
+
+#endif // MockWebRTCPeerConnectionHandler_h
+