[GTK] UserMedia Permission Request API
authorphiln@webkit.org <philn@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 8 Dec 2014 18:14:19 +0000 (18:14 +0000)
committerphiln@webkit.org <philn@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 8 Dec 2014 18:14:19 +0000 (18:14 +0000)
commit4d644376ad10a1325ccbf83e5482a2bad43493d2
tree9553c238eebcdf37902da016c27547ab81ecfb5d
parent6f280c7f730717c675e3a5cb493045846516f3f7
[GTK] UserMedia Permission Request API
https://bugs.webkit.org/show_bug.cgi?id=136449

Reviewed by Carlos Garcia Campos.

Source/WebCore:

Very basic constraints validation support in the GStreamer
MediaStreamCenter. This is needed so the GTK C API tests using the
getUserMedia() API would not time out.

* platform/mediastream/gstreamer/MediaStreamCenterGStreamer.cpp:
(WebCore::MediaStreamCenterGStreamer::~MediaStreamCenterGStreamer):
(WebCore::MediaStreamCenterGStreamer::validateRequestConstraints):
(WebCore::MediaStreamCenterGStreamer::createMediaStream):

Source/WebKit2:

* PlatformGTK.cmake: GTK-specific new files.
* UIProcess/API/gtk/WebKitUIClient.cpp:  DecidePolicy handler
implementation for UserMediaPermissionRequest.
* UIProcess/API/gtk/WebKitUserMediaPermissionRequest.cpp: Added,
WebKitGTK API for UserMediaPermissionRequest, very similar to the
one used for Geolocation.
(webkitUserMediaPermissionRequestAllow):
(webkitUserMediaPermissionRequestDeny):
(webkit_permission_request_interface_init):
(webkitUserMediaPermissionRequestDispose):
(webkit_user_media_permission_get_media_types):
(webkitUserMediaPermissionRequestGetProperty):
(webkit_user_media_permission_request_class_init):
(webkitUserMediaPermissionRequestCreate):
* UIProcess/API/gtk/WebKitUserMediaPermissionRequest.h: Added.
* UIProcess/API/gtk/WebKitUserMediaPermissionRequestPrivate.h: Added.
* UIProcess/API/gtk/docs/webkit2gtk-docs.sgml: Expose new API
in documentation.
* UIProcess/API/gtk/docs/webkit2gtk-sections.txt: Ditto.
* UIProcess/API/gtk/webkit2.h: Expose UserMediaPermissionRequest API.

Tools:

The GTK version of the MiniBrowser has gained UserMedia permission
request support.

* MiniBrowser/gtk/BrowserWindow.c: Show a popup when the page
requires user permission to access audio/video devices.
(permissionRequestDialogCallback):
(webViewDecidePermissionRequest):
(geolocationRequestDialogCallback): Deleted.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@176952 268f45cc-cd09-0410-ab3c-d52691b4dbfc
19 files changed:
Source/WebCore/ChangeLog
Source/WebCore/platform/mediastream/gstreamer/MediaStreamCenterGStreamer.cpp
Source/WebKit2/ChangeLog
Source/WebKit2/PlatformGTK.cmake
Source/WebKit2/UIProcess/API/gtk/WebKitPrivate.h
Source/WebKit2/UIProcess/API/gtk/WebKitUIClient.cpp
Source/WebKit2/UIProcess/API/gtk/WebKitUserMediaPermissionRequest.cpp [new file with mode: 0644]
Source/WebKit2/UIProcess/API/gtk/WebKitUserMediaPermissionRequest.h [new file with mode: 0644]
Source/WebKit2/UIProcess/API/gtk/WebKitUserMediaPermissionRequestPrivate.h [new file with mode: 0644]
Source/WebKit2/UIProcess/API/gtk/docs/webkit2gtk-docs.sgml
Source/WebKit2/UIProcess/API/gtk/docs/webkit2gtk-sections.txt
Source/WebKit2/UIProcess/API/gtk/webkit2.h
Source/WebKit2/UIProcess/UserMediaPermissionRequestManagerProxy.cpp
Source/WebKit2/UIProcess/UserMediaPermissionRequestProxy.cpp
Source/WebKit2/UIProcess/UserMediaPermissionRequestProxy.h
Tools/ChangeLog
Tools/MiniBrowser/gtk/BrowserWindow.c
Tools/Scripts/run-gtk-tests
Tools/TestWebKitAPI/Tests/WebKit2Gtk/TestUIClient.cpp