Title: [111707] trunk/Source/WebKit/gtk
Revision
111707
Author
commit-qu...@webkit.org
Date
2012-03-22 08:36:10 -0700 (Thu, 22 Mar 2012)

Log Message

[GTK] Add MediaStream feature to avoid MediaStream test failure
https://bugs.webkit.org/show_bug.cgi?id=81727

Patch by Mao Yujie <yujie....@intel.com> on 2012-03-22
Reviewed by Martin Robinson.

* GNUmakefile.am:
* WebCoreSupport/UserMediaClientGtk.cpp: Added.
(WebKit):
(WebKit::UserMediaClientGtk::UserMediaClientGtk):
(WebKit::UserMediaClientGtk::~UserMediaClientGtk):
(WebKit::UserMediaClientGtk::pageDestroyed):
(WebKit::UserMediaClientGtk::requestUserMedia):
(WebKit::UserMediaClientGtk::cancelUserMediaRequest):
* WebCoreSupport/UserMediaClientGtk.h: Added.
(WebKit):
(UserMediaClientGtk):
* webkit/webkitwebview.cpp:
(webkit_web_view_init):

Modified Paths

Added Paths

Diff

Modified: trunk/Source/WebKit/gtk/ChangeLog (111706 => 111707)


--- trunk/Source/WebKit/gtk/ChangeLog	2012-03-22 15:30:26 UTC (rev 111706)
+++ trunk/Source/WebKit/gtk/ChangeLog	2012-03-22 15:36:10 UTC (rev 111707)
@@ -1,3 +1,24 @@
+2012-03-22  Mao Yujie  <yujie....@intel.com>
+
+        [GTK] Add MediaStream feature to avoid MediaStream test failure
+        https://bugs.webkit.org/show_bug.cgi?id=81727
+
+        Reviewed by Martin Robinson.
+
+        * GNUmakefile.am:
+        * WebCoreSupport/UserMediaClientGtk.cpp: Added.
+        (WebKit):
+        (WebKit::UserMediaClientGtk::UserMediaClientGtk):
+        (WebKit::UserMediaClientGtk::~UserMediaClientGtk):
+        (WebKit::UserMediaClientGtk::pageDestroyed):
+        (WebKit::UserMediaClientGtk::requestUserMedia):
+        (WebKit::UserMediaClientGtk::cancelUserMediaRequest):
+        * WebCoreSupport/UserMediaClientGtk.h: Added.
+        (WebKit):
+        (UserMediaClientGtk):
+        * webkit/webkitwebview.cpp:
+        (webkit_web_view_init):
+
 2012-03-22  Sergio Villar Senin  <svil...@igalia.com>
 
         [GTK] icon database requests not dispatched until new data arrives

Modified: trunk/Source/WebKit/gtk/GNUmakefile.am (111706 => 111707)


--- trunk/Source/WebKit/gtk/GNUmakefile.am	2012-03-22 15:30:26 UTC (rev 111706)
+++ trunk/Source/WebKit/gtk/GNUmakefile.am	2012-03-22 15:36:10 UTC (rev 111707)
@@ -211,6 +211,8 @@
 	Source/WebKit/gtk/WebCoreSupport/InspectorClientGtk.cpp \
 	Source/WebKit/gtk/WebCoreSupport/InspectorClientGtk.h \
 	Source/WebKit/gtk/WebCoreSupport/PasteboardHelperGtk.h \
+	Source/WebKit/gtk/WebCoreSupport/UserMediaClientGtk.cpp \
+	Source/WebKit/gtk/WebCoreSupport/UserMediaClientGtk.h \
 	Source/WebKit/gtk/webkit/webkitapplicationcache.cpp \
 	Source/WebKit/gtk/webkit/webkitdownload.cpp \
 	Source/WebKit/gtk/webkit/webkitdownloadprivate.h \

Added: trunk/Source/WebKit/gtk/WebCoreSupport/UserMediaClientGtk.cpp (0 => 111707)


--- trunk/Source/WebKit/gtk/WebCoreSupport/UserMediaClientGtk.cpp	                        (rev 0)
+++ trunk/Source/WebKit/gtk/WebCoreSupport/UserMediaClientGtk.cpp	2012-03-22 15:36:10 UTC (rev 111707)
@@ -0,0 +1,58 @@
+/*
+ * Copyright (C) 2012 Intel Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library 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
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public License
+ * along with this library; see the file COPYING.LIB.  If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ *
+ */
+
+#include "config.h"
+#include "UserMediaClientGtk.h"
+
+#if ENABLE(MEDIA_STREAM)
+#include "MediaStreamSource.h"
+#include "NotImplemented.h"
+#include "UserMediaRequest.h"
+
+using namespace WebCore;
+
+namespace WebKit {
+
+UserMediaClientGtk::UserMediaClientGtk()
+{
+}
+
+UserMediaClientGtk::~UserMediaClientGtk()
+{
+}
+
+void UserMediaClientGtk::pageDestroyed()
+{
+    notImplemented();
+}
+
+void UserMediaClientGtk::requestUserMedia(WTF::PassRefPtr<UserMediaRequest> prpRequest, const MediaStreamSourceVector& audioSource, const MediaStreamSourceVector& videoSource)
+{
+    notImplemented();
+}
+
+void UserMediaClientGtk::cancelUserMediaRequest(UserMediaRequest* request)
+{
+    notImplemented();
+}
+
+} // namespace WebKit;
+
+#endif // MEDIA_STREAM

Added: trunk/Source/WebKit/gtk/WebCoreSupport/UserMediaClientGtk.h (0 => 111707)


--- trunk/Source/WebKit/gtk/WebCoreSupport/UserMediaClientGtk.h	                        (rev 0)
+++ trunk/Source/WebKit/gtk/WebCoreSupport/UserMediaClientGtk.h	2012-03-22 15:36:10 UTC (rev 111707)
@@ -0,0 +1,39 @@
+/*
+ * Copyright (C) 2012 Intel Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library 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
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public License
+ * along with this library; see the file COPYING.LIB.  If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ *
+ */
+#ifndef UserMediaClientGtk_h
+#define UserMediaClientGtk_h
+
+#include "UserMediaClient.h"
+
+namespace WebKit {
+
+class UserMediaClientGtk : public WebCore::UserMediaClient {
+public:
+    UserMediaClientGtk();
+    virtual ~UserMediaClientGtk();
+
+    virtual void pageDestroyed();
+    virtual void requestUserMedia(WTF::PassRefPtr<WebCore::UserMediaRequest>, const WebCore::MediaStreamSourceVector&, const WebCore::MediaStreamSourceVector&);
+    virtual void cancelUserMediaRequest(WebCore::UserMediaRequest*);
+};
+
+} // namespace WebKit
+
+#endif // UserMediaClientGtk_h

Modified: trunk/Source/WebKit/gtk/webkit/webkitwebview.cpp (111706 => 111707)


--- trunk/Source/WebKit/gtk/webkit/webkitwebview.cpp	2012-03-22 15:30:26 UTC (rev 111706)
+++ trunk/Source/WebKit/gtk/webkit/webkitwebview.cpp	2012-03-22 15:36:10 UTC (rev 111707)
@@ -118,6 +118,10 @@
 #include "DeviceOrientationClientGtk.h"
 #endif
 
+#if ENABLE(MEDIA_STREAM)
+#include "UserMediaClientGtk.h"
+#endif
+
 /**
  * SECTION:webkitwebview
  * @short_description: The central class of the WebKitGTK+ API
@@ -3520,6 +3524,10 @@
     WebCore::provideDeviceOrientationTo(priv->corePage, new DeviceOrientationClientGtk);
 #endif
 
+#if ENABLE(MEDIA_STREAM)
+    WebCore::provideUserMediaTo(priv->corePage, new UserMediaClientGtk);
+#endif
+
     if (DumpRenderTreeSupportGtk::dumpRenderTreeModeEnabled()) {
         static_cast<GeolocationClientMock*>(pageClients.geolocationClient)->setController(priv->corePage->geolocationController());
         // Set some testing-specific settings
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to