Commit 4c876962 authored by commit-queue@webkit.org's avatar commit-queue@webkit.org
Browse files

[GTK] Add MediaStream feature to avoid MediaStream test failure

https://bugs.webkit.org/show_bug.cgi?id=81727

Patch by Mao Yujie <yujie.mao@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):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@111707 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 1cf7bc93
2012-03-22 Mao Yujie <yujie.mao@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 <svillar@igalia.com>
 
[GTK] icon database requests not dispatched until new data arrives
......
......@@ -211,6 +211,8 @@ webkitgtk_sources += \
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 \
......
/*
* 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
/*
* 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
......@@ -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 @@ static void webkit_web_view_init(WebKitWebView* webView)
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
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment