[WPE] Add initial implementation of glib API
authorcarlosgc@webkit.org <carlosgc@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 20 Jun 2017 07:20:16 +0000 (07:20 +0000)
committercarlosgc@webkit.org <carlosgc@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 20 Jun 2017 07:20:16 +0000 (07:20 +0000)
https://bugs.webkit.org/show_bug.cgi?id=173546

Reviewed by Žan Doberšek.

.:

Add some definitions required to build WPE glib API.

* Source/cmake/OptionsWPE.cmake:

Source/WebCore/platform/gtk/po:

Add WebKitWebViewGtk.cpp to the list of files with translatable strings.

* POTFILES.in:

Source/WebKit2:

Make current API files under glib directories build in WPE, and add the minimum implementation to make it
work. For now it doesn't have web extensions API, and there are a few FIXMEs that will be fixed in follow up
commits. It doesn't include install rules yet, since it's still not ready to be installed.

* PlatformGTK.cmake:
* PlatformWPE.cmake:
* Shared/API/glib/WebKitContextMenuActions.cpp:
(webkitContextMenuActionGetActionTag):
(webkitContextMenuActionGetForContextMenuItem):
(webkitContextMenuActionGetLabel):
* Shared/API/glib/WebKitContextMenuItem.cpp:
* UIProcess/API/glib/WebKitEditorState.cpp:
(webkitEditorStateChanged):
* UIProcess/API/glib/WebKitError.cpp:
* UIProcess/API/glib/WebKitFileChooserRequest.cpp:
(webkitFileChooserRequestGetProperty):
(webkit_file_chooser_request_class_init):
* UIProcess/API/glib/WebKitInstallMissingMediaPluginsPermissionRequest.cpp:
(createGstInstallPluginsContext):
(webkitInstallMissingMediaPluginsPermissionRequestAllow):
* UIProcess/API/glib/WebKitNavigationAction.cpp:
* UIProcess/API/glib/WebKitNavigationActionPrivate.h:
(_WebKitNavigationAction::_WebKitNavigationAction):
* UIProcess/API/glib/WebKitNotificationPrivate.h:
* UIProcess/API/glib/WebKitNotificationProvider.cpp:
(WebKitNotificationProvider::show):
* UIProcess/API/glib/WebKitPrivate.cpp:
(toPlatformModifiers):
(toWebKitError):
(toWebCoreError):
* UIProcess/API/glib/WebKitPrivate.h:
* UIProcess/API/glib/WebKitSettings.cpp:
(webKitSettingsSetProperty):
(webKitSettingsGetProperty):
(webkit_settings_class_init):
(webkit_settings_set_user_agent):
(webkit_settings_set_user_agent_with_application_details):
* UIProcess/API/glib/WebKitUIClient.cpp:
* UIProcess/API/glib/WebKitURISchemeRequest.cpp:
(webkit_uri_scheme_request_get_web_view):
* UIProcess/API/glib/WebKitUserContentManager.cpp:
* UIProcess/API/glib/WebKitWebContext.cpp:
(webkitWebContextConstructed):
* UIProcess/API/glib/WebKitWebView.cpp:
(webkitWebViewCreate):
(webkit_web_view_class_init):
(webkitWebViewCreatePage):
(webkitWebViewRunAsModal):
(webkitWebViewMouseTargetChanged):
(webkitWebViewEnterFullScreen):
(webkitWebViewExitFullScreen):
(webkitWebViewPopulateContextMenu):
* UIProcess/API/glib/WebKitWebViewPrivate.h:
* UIProcess/API/glib/WebKitWindowProperties.cpp:
(webkitWindowPropertiesGetProperty):
(webkitWindowPropertiesSetProperty):
(webkit_window_properties_class_init):
(webkitWindowPropertiesUpdateFromWebWindowFeatures):
* UIProcess/API/glib/WebKitWindowPropertiesPrivate.h:
* UIProcess/API/gtk/WebKitWebViewGtk.cpp: Added.
(webkitWebViewAuthenticate):
(webkitWebViewCreateJavaScriptDialog):
(webkitWebViewScriptDialog):
(fileChooserDialogResponseCallback):
(webkitWebViewRunFileChooser):
(webkit_web_view_new):
(webkit_web_view_new_with_context):
(webkit_web_view_new_with_related_view):
(webkit_web_view_new_with_settings):
(webkit_web_view_new_with_user_content_manager):
* UIProcess/API/wpe/WPEView.h:
* UIProcess/API/wpe/WebKitAuthenticationRequest.h: Added.
* UIProcess/API/wpe/WebKitAutomationSession.h: Added.
* UIProcess/API/wpe/WebKitBackForwardList.h: Added.
* UIProcess/API/wpe/WebKitBackForwardListItem.h: Added.
* UIProcess/API/wpe/WebKitContextMenu.h: Added.
* UIProcess/API/wpe/WebKitContextMenuActions.h: Added.
* UIProcess/API/wpe/WebKitContextMenuItem.h: Added.
* UIProcess/API/wpe/WebKitCookieManager.h: Added.
* UIProcess/API/wpe/WebKitCredential.h: Added.
* UIProcess/API/wpe/WebKitDefines.h: Copied from Source/WebKit2/UIProcess/API/glib/WebKitPrivate.h.
* UIProcess/API/wpe/WebKitDownload.h: Added.
* UIProcess/API/wpe/WebKitEditingCommands.h: Added.
* UIProcess/API/wpe/WebKitEditorState.h: Added.
* UIProcess/API/wpe/WebKitEnumTypes.cpp.template: Added.
* UIProcess/API/wpe/WebKitEnumTypes.h.template: Copied from Source/WebKit2/UIProcess/API/glib/WebKitNotificationPrivate.h.
* UIProcess/API/wpe/WebKitError.h: Added.
* UIProcess/API/wpe/WebKitFaviconDatabase.h: Added.
* UIProcess/API/wpe/WebKitFileChooserRequest.h: Added.
* UIProcess/API/wpe/WebKitFindController.h: Added.
* UIProcess/API/wpe/WebKitFormSubmissionRequest.h: Added.
* UIProcess/API/wpe/WebKitGeolocationPermissionRequest.h: Added.
* UIProcess/API/wpe/WebKitHitTestResult.h: Added.
* UIProcess/API/wpe/WebKitInstallMissingMediaPluginsPermissionRequest.h: Added.
* UIProcess/API/wpe/WebKitJavascriptResult.h: Added.
* UIProcess/API/wpe/WebKitMimeInfo.h: Added.
* UIProcess/API/wpe/WebKitNavigationAction.h: Added.
* UIProcess/API/wpe/WebKitNavigationPolicyDecision.h: Added.
* UIProcess/API/wpe/WebKitNetworkProxySettings.h: Added.
* UIProcess/API/wpe/WebKitNotification.h: Added.
* UIProcess/API/wpe/WebKitNotificationPermissionRequest.h: Added.
* UIProcess/API/wpe/WebKitPermissionRequest.h: Added.
* UIProcess/API/wpe/WebKitPlugin.h: Added.
* UIProcess/API/wpe/WebKitPolicyDecision.h: Added.
* UIProcess/API/wpe/WebKitResponsePolicyDecision.h: Added.
* UIProcess/API/wpe/WebKitScriptDialog.h: Added.
* UIProcess/API/wpe/WebKitSecurityManager.h: Added.
* UIProcess/API/wpe/WebKitSecurityOrigin.h: Added.
* UIProcess/API/wpe/WebKitSettings.h: Added.
* UIProcess/API/wpe/WebKitURIRequest.h: Added.
* UIProcess/API/wpe/WebKitURIResponse.h: Added.
* UIProcess/API/wpe/WebKitURISchemeRequest.h: Added.
* UIProcess/API/wpe/WebKitUserContent.h: Added.
* UIProcess/API/wpe/WebKitUserContentManager.h: Added.
* UIProcess/API/wpe/WebKitUserMediaPermissionRequest.h: Added.
* UIProcess/API/wpe/WebKitWebContext.h: Added.
* UIProcess/API/wpe/WebKitWebResource.h: Added.
* UIProcess/API/wpe/WebKitWebView.h: Added.
* UIProcess/API/wpe/WebKitWebViewSessionState.h: Added.
* UIProcess/API/wpe/WebKitWebViewWPE.cpp: Added.
(webkitWebViewAuthenticate):
(webkitWebViewScriptDialog):
(webkitWebViewRunFileChooser):
(webkit_web_view_new):
(webkit_web_view_new_with_context):
(webkit_web_view_new_with_related_view):
(webkit_web_view_new_with_settings):
(webkit_web_view_new_with_user_content_manager):
* UIProcess/API/wpe/WebKitWebsiteData.h: Added.
* UIProcess/API/wpe/WebKitWebsiteDataManager.h: Added.
* UIProcess/API/wpe/WebKitWindowProperties.h: Added.
* UIProcess/API/wpe/webkit.h: Added.

Tools:

Disable geolocation because WPE doesn't implement any provider and update the style checker exceptions to
include WPE glib API files.

* Scripts/webkitperl/FeatureList.pm:
* Scripts/webkitpy/style/checker.py:
* Scripts/webkitpy/style/checkers/cpp.py:
(check_identifier_name_in_declaration):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@218553 268f45cc-cd09-0410-ab3c-d52691b4dbfc

87 files changed:
ChangeLog
Source/WebCore/platform/gtk/po/ChangeLog
Source/WebCore/platform/gtk/po/POTFILES.in
Source/WebKit2/ChangeLog
Source/WebKit2/PlatformGTK.cmake
Source/WebKit2/PlatformWPE.cmake
Source/WebKit2/Shared/API/glib/WebKitContextMenuActions.cpp
Source/WebKit2/Shared/API/glib/WebKitContextMenuItem.cpp
Source/WebKit2/UIProcess/API/glib/WebKitEditorState.cpp
Source/WebKit2/UIProcess/API/glib/WebKitError.cpp
Source/WebKit2/UIProcess/API/glib/WebKitFileChooserRequest.cpp
Source/WebKit2/UIProcess/API/glib/WebKitInstallMissingMediaPluginsPermissionRequest.cpp
Source/WebKit2/UIProcess/API/glib/WebKitNavigationAction.cpp
Source/WebKit2/UIProcess/API/glib/WebKitNavigationActionPrivate.h
Source/WebKit2/UIProcess/API/glib/WebKitNotificationPrivate.h
Source/WebKit2/UIProcess/API/glib/WebKitNotificationProvider.cpp
Source/WebKit2/UIProcess/API/glib/WebKitPrivate.cpp
Source/WebKit2/UIProcess/API/glib/WebKitPrivate.h
Source/WebKit2/UIProcess/API/glib/WebKitSettings.cpp
Source/WebKit2/UIProcess/API/glib/WebKitUIClient.cpp
Source/WebKit2/UIProcess/API/glib/WebKitURISchemeRequest.cpp
Source/WebKit2/UIProcess/API/glib/WebKitUserContentManager.cpp
Source/WebKit2/UIProcess/API/glib/WebKitWebContext.cpp
Source/WebKit2/UIProcess/API/glib/WebKitWebView.cpp
Source/WebKit2/UIProcess/API/glib/WebKitWebViewPrivate.h
Source/WebKit2/UIProcess/API/glib/WebKitWindowProperties.cpp
Source/WebKit2/UIProcess/API/glib/WebKitWindowPropertiesPrivate.h
Source/WebKit2/UIProcess/API/gtk/WebKitWebViewGtk.cpp [new file with mode: 0644]
Source/WebKit2/UIProcess/API/wpe/WPEView.h
Source/WebKit2/UIProcess/API/wpe/WebKitAuthenticationRequest.h [new file with mode: 0644]
Source/WebKit2/UIProcess/API/wpe/WebKitAutomationSession.h [new file with mode: 0644]
Source/WebKit2/UIProcess/API/wpe/WebKitBackForwardList.h [new file with mode: 0644]
Source/WebKit2/UIProcess/API/wpe/WebKitBackForwardListItem.h [new file with mode: 0644]
Source/WebKit2/UIProcess/API/wpe/WebKitContextMenu.h [new file with mode: 0644]
Source/WebKit2/UIProcess/API/wpe/WebKitContextMenuActions.h [new file with mode: 0644]
Source/WebKit2/UIProcess/API/wpe/WebKitContextMenuItem.h [new file with mode: 0644]
Source/WebKit2/UIProcess/API/wpe/WebKitCookieManager.h [new file with mode: 0644]
Source/WebKit2/UIProcess/API/wpe/WebKitCredential.h [new file with mode: 0644]
Source/WebKit2/UIProcess/API/wpe/WebKitDefines.h [new file with mode: 0644]
Source/WebKit2/UIProcess/API/wpe/WebKitDownload.h [new file with mode: 0644]
Source/WebKit2/UIProcess/API/wpe/WebKitEditingCommands.h [new file with mode: 0644]
Source/WebKit2/UIProcess/API/wpe/WebKitEditorState.h [new file with mode: 0644]
Source/WebKit2/UIProcess/API/wpe/WebKitEnumTypes.cpp.template [new file with mode: 0644]
Source/WebKit2/UIProcess/API/wpe/WebKitEnumTypes.h.template [new file with mode: 0644]
Source/WebKit2/UIProcess/API/wpe/WebKitError.h [new file with mode: 0644]
Source/WebKit2/UIProcess/API/wpe/WebKitFaviconDatabase.h [new file with mode: 0644]
Source/WebKit2/UIProcess/API/wpe/WebKitFileChooserRequest.h [new file with mode: 0644]
Source/WebKit2/UIProcess/API/wpe/WebKitFindController.h [new file with mode: 0644]
Source/WebKit2/UIProcess/API/wpe/WebKitFormSubmissionRequest.h [new file with mode: 0644]
Source/WebKit2/UIProcess/API/wpe/WebKitGeolocationPermissionRequest.h [new file with mode: 0644]
Source/WebKit2/UIProcess/API/wpe/WebKitHitTestResult.h [new file with mode: 0644]
Source/WebKit2/UIProcess/API/wpe/WebKitInstallMissingMediaPluginsPermissionRequest.h [new file with mode: 0644]
Source/WebKit2/UIProcess/API/wpe/WebKitJavascriptResult.h [new file with mode: 0644]
Source/WebKit2/UIProcess/API/wpe/WebKitMimeInfo.h [new file with mode: 0644]
Source/WebKit2/UIProcess/API/wpe/WebKitNavigationAction.h [new file with mode: 0644]
Source/WebKit2/UIProcess/API/wpe/WebKitNavigationPolicyDecision.h [new file with mode: 0644]
Source/WebKit2/UIProcess/API/wpe/WebKitNetworkProxySettings.h [new file with mode: 0644]
Source/WebKit2/UIProcess/API/wpe/WebKitNotification.h [new file with mode: 0644]
Source/WebKit2/UIProcess/API/wpe/WebKitNotificationPermissionRequest.h [new file with mode: 0644]
Source/WebKit2/UIProcess/API/wpe/WebKitPermissionRequest.h [new file with mode: 0644]
Source/WebKit2/UIProcess/API/wpe/WebKitPlugin.h [new file with mode: 0644]
Source/WebKit2/UIProcess/API/wpe/WebKitPolicyDecision.h [new file with mode: 0644]
Source/WebKit2/UIProcess/API/wpe/WebKitResponsePolicyDecision.h [new file with mode: 0644]
Source/WebKit2/UIProcess/API/wpe/WebKitScriptDialog.h [new file with mode: 0644]
Source/WebKit2/UIProcess/API/wpe/WebKitSecurityManager.h [new file with mode: 0644]
Source/WebKit2/UIProcess/API/wpe/WebKitSecurityOrigin.h [new file with mode: 0644]
Source/WebKit2/UIProcess/API/wpe/WebKitSettings.h [new file with mode: 0644]
Source/WebKit2/UIProcess/API/wpe/WebKitURIRequest.h [new file with mode: 0644]
Source/WebKit2/UIProcess/API/wpe/WebKitURIResponse.h [new file with mode: 0644]
Source/WebKit2/UIProcess/API/wpe/WebKitURISchemeRequest.h [new file with mode: 0644]
Source/WebKit2/UIProcess/API/wpe/WebKitUserContent.h [new file with mode: 0644]
Source/WebKit2/UIProcess/API/wpe/WebKitUserContentManager.h [new file with mode: 0644]
Source/WebKit2/UIProcess/API/wpe/WebKitUserMediaPermissionRequest.h [new file with mode: 0644]
Source/WebKit2/UIProcess/API/wpe/WebKitWebContext.h [new file with mode: 0644]
Source/WebKit2/UIProcess/API/wpe/WebKitWebResource.h [new file with mode: 0644]
Source/WebKit2/UIProcess/API/wpe/WebKitWebView.h [new file with mode: 0644]
Source/WebKit2/UIProcess/API/wpe/WebKitWebViewSessionState.h [new file with mode: 0644]
Source/WebKit2/UIProcess/API/wpe/WebKitWebViewWPE.cpp [new file with mode: 0644]
Source/WebKit2/UIProcess/API/wpe/WebKitWebsiteData.h [new file with mode: 0644]
Source/WebKit2/UIProcess/API/wpe/WebKitWebsiteDataManager.h [new file with mode: 0644]
Source/WebKit2/UIProcess/API/wpe/WebKitWindowProperties.h [new file with mode: 0644]
Source/WebKit2/UIProcess/API/wpe/webkit.h [new file with mode: 0644]
Source/cmake/OptionsWPE.cmake
Tools/ChangeLog
Tools/Scripts/webkitperl/FeatureList.pm
Tools/Scripts/webkitpy/style/checker.py
Tools/Scripts/webkitpy/style/checkers/cpp.py

index dc77bac..e23075e 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,14 @@
+2017-06-20  Carlos Garcia Campos  <cgarcia@igalia.com>
+
+        [WPE] Add initial implementation of glib API
+        https://bugs.webkit.org/show_bug.cgi?id=173546
+
+        Reviewed by Žan Doberšek.
+
+        Add some definitions required to build WPE glib API.
+
+        * Source/cmake/OptionsWPE.cmake:
+
 2017-06-18  Carlos Garcia Campos  <cgarcia@igalia.com>
 
         Unreviewed. Update OptionsGTK.cmake and NEWS for 2.17.4 release.
index f45fa85..956d214 100644 (file)
@@ -1,3 +1,14 @@
+2017-06-20  Carlos Garcia Campos  <cgarcia@igalia.com>
+
+        [WPE] Add initial implementation of glib API
+        https://bugs.webkit.org/show_bug.cgi?id=173546
+
+        Reviewed by Žan Doberšek.
+
+        Add WebKitWebViewGtk.cpp to the list of files with translatable strings.
+
+        * POTFILES.in:
+
 2017-06-19  Carlos Garcia Campos  <cgarcia@igalia.com>
 
         [GTK] Move GTK+ API files that could be shared to glib dirs
index d1cbb1a..7159223 100644 (file)
@@ -32,6 +32,7 @@ LocalizedStringsGtk.cpp
 ../../../WebKit2/UIProcess/API/gtk/WebKitPrintOperation.cpp
 ../../../WebKit2/UIProcess/API/gtk/WebKitWebInspector.cpp
 ../../../WebKit2/UIProcess/API/gtk/WebKitWebViewBase.cpp
+../../../WebKit2/UIProcess/API/gtk/WebKitWebViewGtk.cpp
 ../../../WebKit2/UIProcess/gtk/WebColorPickerGtk.cpp
 ../../../WebKit2/UIProcess/gtk/WebKitInspectorWindow.cpp
 ../../../WebKit2/UIProcess/WebEditCommandProxy.cpp
index bfdeb3f..ef011e1 100644 (file)
@@ -1,3 +1,143 @@
+2017-06-20  Carlos Garcia Campos  <cgarcia@igalia.com>
+
+        [WPE] Add initial implementation of glib API
+        https://bugs.webkit.org/show_bug.cgi?id=173546
+
+        Reviewed by Žan Doberšek.
+
+        Make current API files under glib directories build in WPE, and add the minimum implementation to make it
+        work. For now it doesn't have web extensions API, and there are a few FIXMEs that will be fixed in follow up
+        commits. It doesn't include install rules yet, since it's still not ready to be installed.
+
+        * PlatformGTK.cmake:
+        * PlatformWPE.cmake:
+        * Shared/API/glib/WebKitContextMenuActions.cpp:
+        (webkitContextMenuActionGetActionTag):
+        (webkitContextMenuActionGetForContextMenuItem):
+        (webkitContextMenuActionGetLabel):
+        * Shared/API/glib/WebKitContextMenuItem.cpp:
+        * UIProcess/API/glib/WebKitEditorState.cpp:
+        (webkitEditorStateChanged):
+        * UIProcess/API/glib/WebKitError.cpp:
+        * UIProcess/API/glib/WebKitFileChooserRequest.cpp:
+        (webkitFileChooserRequestGetProperty):
+        (webkit_file_chooser_request_class_init):
+        * UIProcess/API/glib/WebKitInstallMissingMediaPluginsPermissionRequest.cpp:
+        (createGstInstallPluginsContext):
+        (webkitInstallMissingMediaPluginsPermissionRequestAllow):
+        * UIProcess/API/glib/WebKitNavigationAction.cpp:
+        * UIProcess/API/glib/WebKitNavigationActionPrivate.h:
+        (_WebKitNavigationAction::_WebKitNavigationAction):
+        * UIProcess/API/glib/WebKitNotificationPrivate.h:
+        * UIProcess/API/glib/WebKitNotificationProvider.cpp:
+        (WebKitNotificationProvider::show):
+        * UIProcess/API/glib/WebKitPrivate.cpp:
+        (toPlatformModifiers):
+        (toWebKitError):
+        (toWebCoreError):
+        * UIProcess/API/glib/WebKitPrivate.h:
+        * UIProcess/API/glib/WebKitSettings.cpp:
+        (webKitSettingsSetProperty):
+        (webKitSettingsGetProperty):
+        (webkit_settings_class_init):
+        (webkit_settings_set_user_agent):
+        (webkit_settings_set_user_agent_with_application_details):
+        * UIProcess/API/glib/WebKitUIClient.cpp:
+        * UIProcess/API/glib/WebKitURISchemeRequest.cpp:
+        (webkit_uri_scheme_request_get_web_view):
+        * UIProcess/API/glib/WebKitUserContentManager.cpp:
+        * UIProcess/API/glib/WebKitWebContext.cpp:
+        (webkitWebContextConstructed):
+        * UIProcess/API/glib/WebKitWebView.cpp:
+        (webkitWebViewCreate):
+        (webkit_web_view_class_init):
+        (webkitWebViewCreatePage):
+        (webkitWebViewRunAsModal):
+        (webkitWebViewMouseTargetChanged):
+        (webkitWebViewEnterFullScreen):
+        (webkitWebViewExitFullScreen):
+        (webkitWebViewPopulateContextMenu):
+        * UIProcess/API/glib/WebKitWebViewPrivate.h:
+        * UIProcess/API/glib/WebKitWindowProperties.cpp:
+        (webkitWindowPropertiesGetProperty):
+        (webkitWindowPropertiesSetProperty):
+        (webkit_window_properties_class_init):
+        (webkitWindowPropertiesUpdateFromWebWindowFeatures):
+        * UIProcess/API/glib/WebKitWindowPropertiesPrivate.h:
+        * UIProcess/API/gtk/WebKitWebViewGtk.cpp: Added.
+        (webkitWebViewAuthenticate):
+        (webkitWebViewCreateJavaScriptDialog):
+        (webkitWebViewScriptDialog):
+        (fileChooserDialogResponseCallback):
+        (webkitWebViewRunFileChooser):
+        (webkit_web_view_new):
+        (webkit_web_view_new_with_context):
+        (webkit_web_view_new_with_related_view):
+        (webkit_web_view_new_with_settings):
+        (webkit_web_view_new_with_user_content_manager):
+        * UIProcess/API/wpe/WPEView.h:
+        * UIProcess/API/wpe/WebKitAuthenticationRequest.h: Added.
+        * UIProcess/API/wpe/WebKitAutomationSession.h: Added.
+        * UIProcess/API/wpe/WebKitBackForwardList.h: Added.
+        * UIProcess/API/wpe/WebKitBackForwardListItem.h: Added.
+        * UIProcess/API/wpe/WebKitContextMenu.h: Added.
+        * UIProcess/API/wpe/WebKitContextMenuActions.h: Added.
+        * UIProcess/API/wpe/WebKitContextMenuItem.h: Added.
+        * UIProcess/API/wpe/WebKitCookieManager.h: Added.
+        * UIProcess/API/wpe/WebKitCredential.h: Added.
+        * UIProcess/API/wpe/WebKitDefines.h: Copied from Source/WebKit2/UIProcess/API/glib/WebKitPrivate.h.
+        * UIProcess/API/wpe/WebKitDownload.h: Added.
+        * UIProcess/API/wpe/WebKitEditingCommands.h: Added.
+        * UIProcess/API/wpe/WebKitEditorState.h: Added.
+        * UIProcess/API/wpe/WebKitEnumTypes.cpp.template: Added.
+        * UIProcess/API/wpe/WebKitEnumTypes.h.template: Copied from Source/WebKit2/UIProcess/API/glib/WebKitNotificationPrivate.h.
+        * UIProcess/API/wpe/WebKitError.h: Added.
+        * UIProcess/API/wpe/WebKitFaviconDatabase.h: Added.
+        * UIProcess/API/wpe/WebKitFileChooserRequest.h: Added.
+        * UIProcess/API/wpe/WebKitFindController.h: Added.
+        * UIProcess/API/wpe/WebKitFormSubmissionRequest.h: Added.
+        * UIProcess/API/wpe/WebKitGeolocationPermissionRequest.h: Added.
+        * UIProcess/API/wpe/WebKitHitTestResult.h: Added.
+        * UIProcess/API/wpe/WebKitInstallMissingMediaPluginsPermissionRequest.h: Added.
+        * UIProcess/API/wpe/WebKitJavascriptResult.h: Added.
+        * UIProcess/API/wpe/WebKitMimeInfo.h: Added.
+        * UIProcess/API/wpe/WebKitNavigationAction.h: Added.
+        * UIProcess/API/wpe/WebKitNavigationPolicyDecision.h: Added.
+        * UIProcess/API/wpe/WebKitNetworkProxySettings.h: Added.
+        * UIProcess/API/wpe/WebKitNotification.h: Added.
+        * UIProcess/API/wpe/WebKitNotificationPermissionRequest.h: Added.
+        * UIProcess/API/wpe/WebKitPermissionRequest.h: Added.
+        * UIProcess/API/wpe/WebKitPlugin.h: Added.
+        * UIProcess/API/wpe/WebKitPolicyDecision.h: Added.
+        * UIProcess/API/wpe/WebKitResponsePolicyDecision.h: Added.
+        * UIProcess/API/wpe/WebKitScriptDialog.h: Added.
+        * UIProcess/API/wpe/WebKitSecurityManager.h: Added.
+        * UIProcess/API/wpe/WebKitSecurityOrigin.h: Added.
+        * UIProcess/API/wpe/WebKitSettings.h: Added.
+        * UIProcess/API/wpe/WebKitURIRequest.h: Added.
+        * UIProcess/API/wpe/WebKitURIResponse.h: Added.
+        * UIProcess/API/wpe/WebKitURISchemeRequest.h: Added.
+        * UIProcess/API/wpe/WebKitUserContent.h: Added.
+        * UIProcess/API/wpe/WebKitUserContentManager.h: Added.
+        * UIProcess/API/wpe/WebKitUserMediaPermissionRequest.h: Added.
+        * UIProcess/API/wpe/WebKitWebContext.h: Added.
+        * UIProcess/API/wpe/WebKitWebResource.h: Added.
+        * UIProcess/API/wpe/WebKitWebView.h: Added.
+        * UIProcess/API/wpe/WebKitWebViewSessionState.h: Added.
+        * UIProcess/API/wpe/WebKitWebViewWPE.cpp: Added.
+        (webkitWebViewAuthenticate):
+        (webkitWebViewScriptDialog):
+        (webkitWebViewRunFileChooser):
+        (webkit_web_view_new):
+        (webkit_web_view_new_with_context):
+        (webkit_web_view_new_with_related_view):
+        (webkit_web_view_new_with_settings):
+        (webkit_web_view_new_with_user_content_manager):
+        * UIProcess/API/wpe/WebKitWebsiteData.h: Added.
+        * UIProcess/API/wpe/WebKitWebsiteDataManager.h: Added.
+        * UIProcess/API/wpe/WebKitWindowProperties.h: Added.
+        * UIProcess/API/wpe/webkit.h: Added.
+
 2017-06-19  Frederic Wang  <fwang@igalia.com>
 
         [iOS] Always include frames in the scrolling tree when async frame scrolling is enabled
index e90a32d..85fc209 100644 (file)
@@ -189,6 +189,7 @@ list(APPEND WebKit2_SOURCES
     UIProcess/API/gtk/WebKitWebInspector.cpp
     UIProcess/API/gtk/WebKitWebViewBase.cpp
     UIProcess/API/gtk/WebKitWebViewBaseAccessible.cpp
+    UIProcess/API/gtk/WebKitWebViewGtk.cpp
 
     UIProcess/Automation/gtk/WebAutomationSessionGtk.cpp
 
index 2d129b3..ba2ab33 100644 (file)
@@ -1,10 +1,13 @@
 file(MAKE_DIRECTORY ${DERIVED_SOURCES_WEBKIT2_DIR})
+file(MAKE_DIRECTORY ${DERIVED_SOURCES_WPE_API_DIR})
+file(MAKE_DIRECTORY ${FORWARDING_HEADERS_WPE_DIR})
 
 configure_file(wpe/wpe-webkit.pc.in ${CMAKE_BINARY_DIR}/wpe-webkit.pc @ONLY)
 
 add_definitions(-DWEBKIT2_COMPILATION)
 
 add_definitions(-DLIBEXECDIR="${LIBEXEC_INSTALL_DIR}")
+add_definitions(-DLOCALEDIR="${CMAKE_INSTALL_FULL_LOCALEDIR}")
 
 set(WebKit2_USE_PREFIX_HEADER ON)
 
@@ -12,6 +15,13 @@ add_custom_target(webkit2wpe-forwarding-headers
     COMMAND ${PERL_EXECUTABLE} ${WEBKIT2_DIR}/Scripts/generate-forwarding-headers.pl --include-path ${WEBKIT2_DIR} --output ${FORWARDING_HEADERS_DIR} --platform wpe --platform soup
 )
 
+ # These symbolic link allows includes like #include <wpe/WebkitWebView.h> which simulates installed headers.
+add_custom_command(
+    OUTPUT ${FORWARDING_HEADERS_WPE_DIR}/wpe
+    DEPENDS ${WEBKIT2_DIR}/UIProcess/API/wpe
+    COMMAND ln -n -s -f ${WEBKIT2_DIR}/UIProcess/API/wpe ${FORWARDING_HEADERS_WPE_DIR}/wpe
+)
+
 set(WEBKIT2_EXTRA_DEPENDENCIES
     webkit2wpe-forwarding-headers
 )
@@ -59,6 +69,13 @@ list(APPEND WebKit2_SOURCES
 
     Shared/API/c/cairo/WKImageCairo.cpp
 
+    Shared/API/glib/WebKitContextMenu.cpp
+    Shared/API/glib/WebKitContextMenuActions.cpp
+    Shared/API/glib/WebKitContextMenuItem.cpp
+    Shared/API/glib/WebKitHitTestResult.cpp
+    Shared/API/glib/WebKitURIRequest.cpp
+    Shared/API/glib/WebKitURIResponse.cpp
+
     Shared/Authentication/soup/AuthenticationManagerSoup.cpp
 
     Shared/CoordinatedGraphics/CoordinatedBackingStore.cpp
@@ -74,6 +91,7 @@ list(APPEND WebKit2_SOURCES
 
     Shared/cairo/ShareableBitmapCairo.cpp
 
+    Shared/glib/WebContextMenuItemGlib.cpp
     Shared/glib/WebErrorsGlib.cpp
 
     Shared/linux/WebMemorySamplerLinux.cpp
@@ -104,9 +122,63 @@ list(APPEND WebKit2_SOURCES
 
     UIProcess/API/C/wpe/WKView.cpp
 
+    UIProcess/API/glib/WebKitAuthenticationRequest.cpp
+    UIProcess/API/glib/WebKitAutomationSession.cpp
+    UIProcess/API/glib/WebKitBackForwardList.cpp
+    UIProcess/API/glib/WebKitBackForwardListItem.cpp
+    UIProcess/API/glib/WebKitContextMenuClient.cpp
+    UIProcess/API/glib/WebKitCookieManager.cpp
+    UIProcess/API/glib/WebKitCredential.cpp
+    UIProcess/API/glib/WebKitCustomProtocolManagerClient.cpp
+    UIProcess/API/glib/WebKitDownload.cpp
+    UIProcess/API/glib/WebKitDownloadClient.cpp
+    UIProcess/API/glib/WebKitEditorState.cpp
+    UIProcess/API/glib/WebKitError.cpp
+    UIProcess/API/glib/WebKitFaviconDatabase.cpp
+    UIProcess/API/glib/WebKitFileChooserRequest.cpp
+    UIProcess/API/glib/WebKitFindController.cpp
+    UIProcess/API/glib/WebKitFormClient.cpp
+    UIProcess/API/glib/WebKitFormSubmissionRequest.cpp
+    UIProcess/API/glib/WebKitGeolocationPermissionRequest.cpp
+    UIProcess/API/glib/WebKitGeolocationProvider.cpp
+    UIProcess/API/glib/WebKitInjectedBundleClient.cpp
+    UIProcess/API/glib/WebKitInstallMissingMediaPluginsPermissionRequest.cpp
+    UIProcess/API/glib/WebKitJavascriptResult.cpp
+    UIProcess/API/glib/WebKitLoaderClient.cpp
+    UIProcess/API/glib/WebKitMimeInfo.cpp
+    UIProcess/API/glib/WebKitNavigationAction.cpp
+    UIProcess/API/glib/WebKitNavigationPolicyDecision.cpp
+    UIProcess/API/glib/WebKitNetworkProxySettings.cpp
+    UIProcess/API/glib/WebKitNotification.cpp
+    UIProcess/API/glib/WebKitNotificationPermissionRequest.cpp
+    UIProcess/API/glib/WebKitNotificationProvider.cpp
+    UIProcess/API/glib/WebKitPermissionRequest.cpp
+    UIProcess/API/glib/WebKitPlugin.cpp
+    UIProcess/API/glib/WebKitPolicyClient.cpp
+    UIProcess/API/glib/WebKitPolicyDecision.cpp
+    UIProcess/API/glib/WebKitPrivate.cpp
+    UIProcess/API/glib/WebKitResponsePolicyDecision.cpp
+    UIProcess/API/glib/WebKitScriptDialog.cpp
+    UIProcess/API/glib/WebKitSecurityManager.cpp
+    UIProcess/API/glib/WebKitSecurityOrigin.cpp
+    UIProcess/API/glib/WebKitSettings.cpp
+    UIProcess/API/glib/WebKitUIClient.cpp
+    UIProcess/API/glib/WebKitURISchemeRequest.cpp
+    UIProcess/API/glib/WebKitUserContent.cpp
+    UIProcess/API/glib/WebKitUserContentManager.cpp
+    UIProcess/API/glib/WebKitUserMediaPermissionRequest.cpp
+    UIProcess/API/glib/WebKitWebContext.cpp
+    UIProcess/API/glib/WebKitWebResource.cpp
+    UIProcess/API/glib/WebKitWebView.cpp
+    UIProcess/API/glib/WebKitWebViewSessionState.cpp
+    UIProcess/API/glib/WebKitWebsiteData.cpp
+    UIProcess/API/glib/WebKitWebsiteDataManager.cpp
+    UIProcess/API/glib/WebKitWindowProperties.cpp
+
     UIProcess/API/wpe/CompositingManagerProxy.cpp
     UIProcess/API/wpe/PageClientImpl.cpp
     UIProcess/API/wpe/ScrollGestureController.cpp
+    UIProcess/API/wpe/WebKitWebViewWPE.cpp
     UIProcess/API/wpe/WPEView.cpp
     UIProcess/API/wpe/WPEViewClient.cpp
 
@@ -180,6 +252,74 @@ list(APPEND WebKit2_MESSAGES_IN_FILES
 
 list(APPEND WebKit2_DERIVED_SOURCES
     ${DERIVED_SOURCES_WEBKIT2_DIR}/WebKit2ResourcesGResourceBundle.c
+
+    ${DERIVED_SOURCES_WPE_API_DIR}/WebKitEnumTypes.cpp
+)
+
+set(WPE_API_INSTALLED_HEADERS
+    ${DERIVED_SOURCES_WPE_API_DIR}/WebKitEnumTypes.h
+    ${WEBKIT2_DIR}/UIProcess/API/wpe/WebKitAuthenticationRequest.h
+    ${WEBKIT2_DIR}/UIProcess/API/wpe/WebKitAutomationSession.h
+    ${WEBKIT2_DIR}/UIProcess/API/wpe/WebKitBackForwardList.h
+    ${WEBKIT2_DIR}/UIProcess/API/wpe/WebKitBackForwardListItem.h
+    ${WEBKIT2_DIR}/UIProcess/API/wpe/WebKitCredential.h
+    ${WEBKIT2_DIR}/UIProcess/API/wpe/WebKitContextMenu.h
+    ${WEBKIT2_DIR}/UIProcess/API/wpe/WebKitContextMenuActions.h
+    ${WEBKIT2_DIR}/UIProcess/API/wpe/WebKitContextMenuItem.h
+    ${WEBKIT2_DIR}/UIProcess/API/wpe/WebKitCookieManager.h
+    ${WEBKIT2_DIR}/UIProcess/API/wpe/WebKitDefines.h
+    ${WEBKIT2_DIR}/UIProcess/API/wpe/WebKitDownload.h
+    ${WEBKIT2_DIR}/UIProcess/API/wpe/WebKitEditingCommands.h
+    ${WEBKIT2_DIR}/UIProcess/API/wpe/WebKitEditorState.h
+    ${WEBKIT2_DIR}/UIProcess/API/wpe/WebKitError.h
+    ${WEBKIT2_DIR}/UIProcess/API/wpe/WebKitFaviconDatabase.h
+    ${WEBKIT2_DIR}/UIProcess/API/wpe/WebKitFindController.h
+    ${WEBKIT2_DIR}/UIProcess/API/wpe/WebKitFormSubmissionRequest.h
+    ${WEBKIT2_DIR}/UIProcess/API/wpe/WebKitGeolocationPermissionRequest.h
+    ${WEBKIT2_DIR}/UIProcess/API/wpe/WebKitHitTestResult.h
+    ${WEBKIT2_DIR}/UIProcess/API/wpe/WebKitInstallMissingMediaPluginsPermissionRequest.h
+    ${WEBKIT2_DIR}/UIProcess/API/wpe/WebKitJavascriptResult.h
+    ${WEBKIT2_DIR}/UIProcess/API/wpe/WebKitMimeInfo.h
+    ${WEBKIT2_DIR}/UIProcess/API/wpe/WebKitNavigationAction.h
+    ${WEBKIT2_DIR}/UIProcess/API/wpe/WebKitNavigationPolicyDecision.h
+    ${WEBKIT2_DIR}/UIProcess/API/wpe/WebKitNetworkProxySettings.h
+    ${WEBKIT2_DIR}/UIProcess/API/wpe/WebKitNotificationPermissionRequest.h
+    ${WEBKIT2_DIR}/UIProcess/API/wpe/WebKitNotification.h
+    ${WEBKIT2_DIR}/UIProcess/API/wpe/WebKitPermissionRequest.h
+    ${WEBKIT2_DIR}/UIProcess/API/wpe/WebKitPlugin.h
+    ${WEBKIT2_DIR}/UIProcess/API/wpe/WebKitPolicyDecision.h
+    ${WEBKIT2_DIR}/UIProcess/API/wpe/WebKitResponsePolicyDecision.h
+    ${WEBKIT2_DIR}/UIProcess/API/wpe/WebKitSecurityManager.h
+    ${WEBKIT2_DIR}/UIProcess/API/wpe/WebKitSecurityOrigin.h
+    ${WEBKIT2_DIR}/UIProcess/API/wpe/WebKitSettings.h
+    ${WEBKIT2_DIR}/UIProcess/API/wpe/WebKitURIRequest.h
+    ${WEBKIT2_DIR}/UIProcess/API/wpe/WebKitURIResponse.h
+    ${WEBKIT2_DIR}/UIProcess/API/wpe/WebKitURISchemeRequest.h
+    ${WEBKIT2_DIR}/UIProcess/API/wpe/WebKitUserContent.h
+    ${WEBKIT2_DIR}/UIProcess/API/wpe/WebKitUserContentManager.h
+    ${WEBKIT2_DIR}/UIProcess/API/wpe/WebKitUserMediaPermissionRequest.h
+    ${WEBKIT2_DIR}/UIProcess/API/wpe/WebKitWebContext.h
+    ${WEBKIT2_DIR}/UIProcess/API/wpe/WebKitWebResource.h
+    ${WEBKIT2_DIR}/UIProcess/API/wpe/WebKitWebView.h
+    ${WEBKIT2_DIR}/UIProcess/API/wpe/WebKitWebViewSessionState.h
+    ${WEBKIT2_DIR}/UIProcess/API/wpe/WebKitWebsiteData.h
+    ${WEBKIT2_DIR}/UIProcess/API/wpe/WebKitWebsiteDataManager.h
+    ${WEBKIT2_DIR}/UIProcess/API/wpe/WebKitWindowProperties.h
+    ${WEBKIT2_DIR}/UIProcess/API/wpe/webkit.h
+)
+
+# To generate WebKitEnumTypes.h we want to use all installed headers, except WebKitEnumTypes.h itself.
+set(WPE_ENUM_GENERATION_HEADERS ${WPE_API_INSTALLED_HEADERS})
+list(REMOVE_ITEM WPE_ENUM_GENERATION_HEADERS ${DERIVED_SOURCES_WPE_API_DIR}/WebKitEnumTypes.h)
+add_custom_command(
+    OUTPUT ${DERIVED_SOURCES_WPE_API_DIR}/WebKitEnumTypes.h
+           ${DERIVED_SOURCES_WPE_API_DIR}/WebKitEnumTypes.cpp
+    DEPENDS ${WPE_ENUM_GENERATION_HEADERS}
+
+    COMMAND glib-mkenums --template ${WEBKIT2_DIR}/UIProcess/API/wpe/WebKitEnumTypes.h.template ${WPE_ENUM_GENERATION_HEADERS} | sed s/web_kit/webkit/ | sed s/WEBKIT_TYPE_KIT/WEBKIT_TYPE/ > ${DERIVED_SOURCES_WPE_API_DIR}/WebKitEnumTypes.h
+
+    COMMAND glib-mkenums --template ${WEBKIT2_DIR}/UIProcess/API/wpe/WebKitEnumTypes.cpp.template ${WPE_ENUM_GENERATION_HEADERS} | sed s/web_kit/webkit/ > ${DERIVED_SOURCES_WPE_API_DIR}/WebKitEnumTypes.cpp
+    VERBATIM
 )
 
 set(WebKit2Resources
@@ -209,7 +349,9 @@ add_custom_command(
 
 list(APPEND WebKit2_INCLUDE_DIRECTORIES
     "${FORWARDING_HEADERS_DIR}"
+    "${FORWARDING_HEADERS_WPE_DIR}"
     "${DERIVED_SOURCES_DIR}"
+    "${DERIVED_SOURCES_WPE_API_DIR}"
     "${WEBCORE_DIR}/platform/graphics/cairo"
     "${WEBCORE_DIR}/platform/graphics/freetype"
     "${WEBCORE_DIR}/platform/graphics/opentype"
@@ -224,15 +366,19 @@ list(APPEND WebKit2_INCLUDE_DIRECTORIES
     "${WEBKIT2_DIR}/Platform/IPC/unix"
     "${WEBKIT2_DIR}/Platform/classifier"
     "${WEBKIT2_DIR}/Shared/API/c/wpe"
+    "${WEBKIT2_DIR}/Shared/API/glib"
     "${WEBKIT2_DIR}/Shared/CoordinatedGraphics"
     "${WEBKIT2_DIR}/Shared/CoordinatedGraphics/threadedcompositor"
+    "${WEBKIT2_DIR}/Shared/glib"
     "${WEBKIT2_DIR}/Shared/soup"
     "${WEBKIT2_DIR}/Shared/unix"
     "${WEBKIT2_DIR}/Shared/wpe"
     "${WEBKIT2_DIR}/UIProcess/API/C/cairo"
     "${WEBKIT2_DIR}/UIProcess/API/C/wpe"
+    "${WEBKIT2_DIR}/UIProcess/API/glib"
     "${WEBKIT2_DIR}/UIProcess/API/wpe"
     "${WEBKIT2_DIR}/UIProcess/Network/CustomProtocols/soup"
+    "${WEBKIT2_DIR}/UIProcess/gstreamer"
     "${WEBKIT2_DIR}/UIProcess/linux"
     "${WEBKIT2_DIR}/UIProcess/soup"
     "${WEBKIT2_DIR}/WebProcess/soup"
index 1cbbe55..dc57d53 100644 (file)
@@ -58,8 +58,10 @@ ContextMenuAction webkitContextMenuActionGetActionTag(WebKitContextMenuAction ac
         return ContextMenuItemTagDownloadImageToDisk;
     case WEBKIT_CONTEXT_MENU_ACTION_COPY_IMAGE_TO_CLIPBOARD:
         return ContextMenuItemTagCopyImageToClipboard;
+#if PLATFORM(GTK)
     case WEBKIT_CONTEXT_MENU_ACTION_COPY_IMAGE_URL_TO_CLIPBOARD:
         return ContextMenuItemTagCopyImageUrlToClipboard;
+#endif
     case WEBKIT_CONTEXT_MENU_ACTION_OPEN_FRAME_IN_NEW_WINDOW:
         return ContextMenuItemTagOpenFrameInNewWindow;
     case WEBKIT_CONTEXT_MENU_ACTION_GO_BACK:
@@ -76,6 +78,7 @@ ContextMenuAction webkitContextMenuActionGetActionTag(WebKitContextMenuAction ac
         return ContextMenuItemTagCut;
     case WEBKIT_CONTEXT_MENU_ACTION_PASTE:
         return ContextMenuItemTagPaste;
+#if PLATFORM(GTK)
     case WEBKIT_CONTEXT_MENU_ACTION_DELETE:
         return ContextMenuItemTagDelete;
     case WEBKIT_CONTEXT_MENU_ACTION_SELECT_ALL:
@@ -84,6 +87,7 @@ ContextMenuAction webkitContextMenuActionGetActionTag(WebKitContextMenuAction ac
         return ContextMenuItemTagInputMethods;
     case WEBKIT_CONTEXT_MENU_ACTION_UNICODE:
         return ContextMenuItemTagUnicode;
+#endif
     case WEBKIT_CONTEXT_MENU_ACTION_SPELLING_GUESS:
         return ContextMenuItemTagSpellingGuess;
     case WEBKIT_CONTEXT_MENU_ACTION_NO_GUESSES_FOUND:
@@ -154,8 +158,10 @@ WebKitContextMenuAction webkitContextMenuActionGetForContextMenuItem(const WebKi
         return WEBKIT_CONTEXT_MENU_ACTION_DOWNLOAD_IMAGE_TO_DISK;
     case ContextMenuItemTagCopyImageToClipboard:
         return WEBKIT_CONTEXT_MENU_ACTION_COPY_IMAGE_TO_CLIPBOARD;
+#if PLATFORM(GTK)
     case ContextMenuItemTagCopyImageUrlToClipboard:
         return WEBKIT_CONTEXT_MENU_ACTION_COPY_IMAGE_URL_TO_CLIPBOARD;
+#endif
     case ContextMenuItemTagOpenFrameInNewWindow:
         return WEBKIT_CONTEXT_MENU_ACTION_OPEN_FRAME_IN_NEW_WINDOW;
     case ContextMenuItemTagGoBack:
@@ -172,6 +178,7 @@ WebKitContextMenuAction webkitContextMenuActionGetForContextMenuItem(const WebKi
         return WEBKIT_CONTEXT_MENU_ACTION_CUT;
     case ContextMenuItemTagPaste:
         return WEBKIT_CONTEXT_MENU_ACTION_PASTE;
+#if PLATFORM(GTK)
     case ContextMenuItemTagDelete:
         return WEBKIT_CONTEXT_MENU_ACTION_DELETE;
     case ContextMenuItemTagSelectAll:
@@ -180,6 +187,7 @@ WebKitContextMenuAction webkitContextMenuActionGetForContextMenuItem(const WebKi
         return WEBKIT_CONTEXT_MENU_ACTION_INPUT_METHODS;
     case ContextMenuItemTagUnicode:
         return WEBKIT_CONTEXT_MENU_ACTION_UNICODE;
+#endif
     case ContextMenuItemTagSpellingGuess:
         return WEBKIT_CONTEXT_MENU_ACTION_SPELLING_GUESS;
     case ContextMenuItemTagNoGuessesFound:
@@ -248,8 +256,10 @@ String webkitContextMenuActionGetLabel(WebKitContextMenuAction action)
         return contextMenuItemTagDownloadImageToDisk();
     case WEBKIT_CONTEXT_MENU_ACTION_COPY_IMAGE_TO_CLIPBOARD:
         return contextMenuItemTagCopyImageToClipboard();
+#if PLATFORM(GTK)
     case WEBKIT_CONTEXT_MENU_ACTION_COPY_IMAGE_URL_TO_CLIPBOARD:
         return contextMenuItemTagCopyImageUrlToClipboard();
+#endif
     case WEBKIT_CONTEXT_MENU_ACTION_OPEN_FRAME_IN_NEW_WINDOW:
         return contextMenuItemTagOpenFrameInNewWindow();
     case WEBKIT_CONTEXT_MENU_ACTION_GO_BACK:
@@ -266,6 +276,7 @@ String webkitContextMenuActionGetLabel(WebKitContextMenuAction action)
         return contextMenuItemTagCut();
     case WEBKIT_CONTEXT_MENU_ACTION_PASTE:
         return contextMenuItemTagPaste();
+#if PLATFORM(GTK)
     case WEBKIT_CONTEXT_MENU_ACTION_DELETE:
         return contextMenuItemTagDelete();
     case WEBKIT_CONTEXT_MENU_ACTION_SELECT_ALL:
@@ -274,6 +285,7 @@ String webkitContextMenuActionGetLabel(WebKitContextMenuAction action)
         return contextMenuItemTagInputMethods();
     case WEBKIT_CONTEXT_MENU_ACTION_UNICODE:
         return contextMenuItemTagUnicode();
+#endif
     case WEBKIT_CONTEXT_MENU_ACTION_NO_GUESSES_FOUND:
         return contextMenuItemTagNoGuessesFound();
     case WEBKIT_CONTEXT_MENU_ACTION_IGNORE_SPELLING:
index 944d046..7ed11e6 100644 (file)
@@ -28,7 +28,6 @@
 #include "WebKitContextMenuPrivate.h"
 #include <WebCore/ContextMenu.h>
 #include <WebCore/ContextMenuItem.h>
-#include <gtk/gtk.h>
 #include <memory>
 #include <wtf/glib/GRefPtr.h>
 #include <wtf/glib/GUniquePtr.h>
@@ -125,6 +124,7 @@ WebContextMenuItemData webkitContextMenuItemToWebContextMenuItemData(WebKitConte
     return WebContextMenuItemData(item->priv->menuItem->type(), item->priv->menuItem->action(), item->priv->menuItem->title(), item->priv->menuItem->enabled(), item->priv->menuItem->checked());
 }
 
+#if PLATFORM(GTK)
 /**
  * webkit_context_menu_item_new:
  * @action: a #GtkAction
@@ -144,6 +144,7 @@ WebKitContextMenuItem* webkit_context_menu_item_new(GtkAction* action)
 
     return item;
 }
+#endif
 
 /**
  * webkit_context_menu_item_new_from_gaction:
@@ -260,6 +261,7 @@ WebKitContextMenuItem* webkit_context_menu_item_new_separator(void)
     return item;
 }
 
+#if PLATFORM(GTK)
 /**
  * webkit_context_menu_item_get_action:
  * @item: a #WebKitContextMenuItem
@@ -277,6 +279,7 @@ GtkAction* webkit_context_menu_item_get_action(WebKitContextMenuItem* item)
 
     return item->priv->menuItem->gtkAction();
 }
+#endif
 
 /**
  * webkit_context_menu_item_get_gaction:
index c87e019..6553a8d 100644 (file)
@@ -111,6 +111,7 @@ void webkitEditorStateChanged(WebKitEditorState* editorState, const EditorState&
         return;
 
     unsigned typingAttributes = WEBKIT_EDITOR_TYPING_ATTRIBUTE_NONE;
+#if PLATFORM(GTK)
     const auto& postLayoutData = newState.postLayoutData();
     if (postLayoutData.typingAttributes & AttributeBold)
         typingAttributes |= WEBKIT_EDITOR_TYPING_ATTRIBUTE_BOLD;
@@ -120,6 +121,7 @@ void webkitEditorStateChanged(WebKitEditorState* editorState, const EditorState&
         typingAttributes |= WEBKIT_EDITOR_TYPING_ATTRIBUTE_UNDERLINE;
     if (postLayoutData.typingAttributes & AttributeStrikeThrough)
         typingAttributes |= WEBKIT_EDITOR_TYPING_ATTRIBUTE_STRIKETHROUGH;
+#endif
     webkitEditorStateSetTypingAttributes(editorState, typingAttributes);
 }
 
index 092fe5b..ae9f74f 100644 (file)
@@ -55,10 +55,12 @@ GQuark webkit_download_error_quark()
     return g_quark_from_static_string(reinterpret_cast<const char*>(API::Error::webKitDownloadErrorDomain().characters8()));
 }
 
+#if PLATFORM(GTK)
 GQuark webkit_print_error_quark()
 {
     return g_quark_from_static_string(reinterpret_cast<const char*>(API::Error::webKitPrintErrorDomain().characters8()));
 }
+#endif
 
 GQuark webkit_javascript_error_quark()
 {
index 4c11287..f6012c8 100644 (file)
@@ -63,7 +63,9 @@ using namespace WebCore;
 struct _WebKitFileChooserRequestPrivate {
     RefPtr<API::OpenPanelParameters> parameters;
     RefPtr<WebOpenPanelResultListenerProxy> listener;
+#if PLATFORM(GTK)
     GRefPtr<GtkFileFilter> filter;
+#endif
     GRefPtr<GPtrArray> mimeTypes;
     GRefPtr<GPtrArray> selectedFiles;
     bool handledRequest;
@@ -73,7 +75,9 @@ WEBKIT_DEFINE_TYPE(WebKitFileChooserRequest, webkit_file_chooser_request, G_TYPE
 
 enum {
     PROP_0,
+#if PLATFORM(GTK)
     PROP_FILTER,
+#endif
     PROP_MIME_TYPES,
     PROP_SELECT_MULTIPLE,
     PROP_SELECTED_FILES,
@@ -94,9 +98,11 @@ static void webkitFileChooserRequestGetProperty(GObject* object, guint propId, G
 {
     WebKitFileChooserRequest* request = WEBKIT_FILE_CHOOSER_REQUEST(object);
     switch (propId) {
+#if PLATFORM(GTK)
     case PROP_FILTER:
         g_value_set_object(value, webkit_file_chooser_request_get_mime_types_filter(request));
         break;
+#endif
     case PROP_MIME_TYPES:
         g_value_set_boxed(value, webkit_file_chooser_request_get_mime_types(request));
         break;
@@ -118,6 +124,7 @@ static void webkit_file_chooser_request_class_init(WebKitFileChooserRequestClass
     objectClass->dispose = webkitFileChooserRequestDispose;
     objectClass->get_property = webkitFileChooserRequestGetProperty;
 
+#if PLATFORM(GTK)
     /**
      * WebKitFileChooserRequest:filter:
      *
@@ -132,6 +139,8 @@ static void webkit_file_chooser_request_class_init(WebKitFileChooserRequestClass
                                                       _("The filter currently associated with the request"),
                                                       GTK_TYPE_FILE_FILTER,
                                                       WEBKIT_PARAM_READABLE));
+#endif
+
     /**
      * WebKitFileChooserRequest:mime-types:
      *
@@ -226,6 +235,7 @@ const gchar* const* webkit_file_chooser_request_get_mime_types(WebKitFileChooser
     return reinterpret_cast<gchar**>(request->priv->mimeTypes->pdata);
 }
 
+#if PLATFORM(GTK)
 /**
  * webkit_file_chooser_request_get_mime_types_filter:
  * @request: a #WebKitFileChooserRequest
@@ -268,6 +278,7 @@ GtkFileFilter* webkit_file_chooser_request_get_mime_types_filter(WebKitFileChoos
 
     return request->priv->filter.get();
 }
+#endif // PLATFORM(GTK)
 
 /**
  * webkit_file_chooser_request_get_select_multiple:
index 968e62b..50e17e3 100644 (file)
@@ -27,9 +27,9 @@
 
 #if ENABLE(VIDEO)
 #include <WebCore/PlatformDisplay.h>
-#include <gtk/gtk.h>
 #if PLATFORM(X11)
 #include <gdk/gdkx.h>
+#include <gtk/gtk.h>
 #endif
 #endif
 
@@ -68,12 +68,12 @@ WEBKIT_DEFINE_TYPE_WITH_CODE(
     G_IMPLEMENT_INTERFACE(WEBKIT_TYPE_PERMISSION_REQUEST, webkit_permission_request_interface_init))
 
 #if ENABLE(VIDEO)
-static GUniquePtr<GstInstallPluginsContext> createGstInstallPluginsContext(GtkWidget* widget)
+static GUniquePtr<GstInstallPluginsContext> createGstInstallPluginsContext(WebPageProxy& page)
 {
 #if PLATFORM(X11)
     if (PlatformDisplay::sharedDisplay().type() == PlatformDisplay::Type::X11) {
         GUniquePtr<GstInstallPluginsContext> context(gst_install_plugins_context_new());
-        gst_install_plugins_context_set_xid(context.get(), GDK_WINDOW_XID(gtk_widget_get_window(widget)));
+        gst_install_plugins_context_set_xid(context.get(), GDK_WINDOW_XID(gtk_widget_get_window(page.viewWidget())));
         return context;
     }
 #endif
@@ -92,7 +92,7 @@ static void webkitInstallMissingMediaPluginsPermissionRequestAllow(WebKitPermiss
     if (priv->madeDecision)
         return;
 #if ENABLE(VIDEO)
-    priv->request->allow(createGstInstallPluginsContext(priv->request->page().viewWidget()));
+    priv->request->allow(createGstInstallPluginsContext(priv->request->page()));
 #endif
     priv->madeDecision = true;
 }
index bcce8ba..2ff0f71 100644 (file)
@@ -21,7 +21,6 @@
 #include "WebKitNavigationAction.h"
 
 #include "WebKitNavigationActionPrivate.h"
-#include <gdk/gdk.h>
 #include <wtf/glib/GRefPtr.h>
 
 using namespace WebKit;
index ccedf6c..bd5e364 100644 (file)
@@ -28,7 +28,7 @@ struct _WebKitNavigationAction {
     _WebKitNavigationAction(WebKitURIRequest* uriRequest, const WebKit::NavigationActionData& navigationActionData)
         : type(toWebKitNavigationType(navigationActionData.navigationType))
         , mouseButton(toWebKitMouseButton(navigationActionData.mouseButton))
-        , modifiers(toGdkModifiers(navigationActionData.modifiers))
+        , modifiers(toPlatformModifiers(navigationActionData.modifiers))
         , isUserGesture(navigationActionData.userGestureTokenIdentifier)
         , request(uriRequest)
     {
index aad499c..0c86236 100644 (file)
@@ -20,6 +20,7 @@
 #pragma once
 
 #include "WebKitNotification.h"
+#include "WebKitWebView.h"
 #include "WebNotification.h"
 #include <wtf/text/CString.h>
 
index 71b3ce5..236e81c 100644 (file)
@@ -118,16 +118,18 @@ void WebKitNotificationProvider::withdrawAnyPreviousNotificationMatchingTag(cons
 void WebKitNotificationProvider::show(WebPageProxy& page, const WebNotification& webNotification)
 {
     GRefPtr<WebKitNotification> notification = m_notifications.get(webNotification.notificationID());
+    auto* webView = webkitWebContextGetWebViewForPage(m_webContext, &page);
+    ASSERT(webView);
 
     if (!notification) {
         withdrawAnyPreviousNotificationMatchingTag(webNotification.tag().utf8());
-        notification = adoptGRef(webkitNotificationCreate(WEBKIT_WEB_VIEW(page.viewWidget()), webNotification));
+        notification = adoptGRef(webkitNotificationCreate(webView, webNotification));
         g_signal_connect(notification.get(), "closed", G_CALLBACK(notificationCloseCallback), this);
         g_signal_connect(notification.get(), "clicked", G_CALLBACK(notificationClickedCallback), this);
         m_notifications.set(webNotification.notificationID(), notification);
     }
 
-    if (webkitWebViewEmitShowNotification(WEBKIT_WEB_VIEW(page.viewWidget()), notification.get()))
+    if (webkitWebViewEmitShowNotification(webView, notification.get()))
         m_notificationManager->providerDidShowNotification(webNotification.notificationID());
 }
 
index eb78f83..f251a71 100644 (file)
 #include "APIError.h"
 #include "WebEvent.h"
 #include "WebKitError.h"
+
+#if PLATFORM(GTK)
 #include <gdk/gdk.h>
+#elif PLATFORM(WPE)
+#include <wpe/input.h>
+#endif
 
-unsigned toGdkModifiers(WebKit::WebEvent::Modifiers wkModifiers)
+#if PLATFORM(GTK)
+unsigned toPlatformModifiers(WebKit::WebEvent::Modifiers wkModifiers)
 {
     unsigned modifiers = 0;
     if (wkModifiers & WebKit::WebEvent::Modifiers::ShiftKey)
@@ -40,6 +46,21 @@ unsigned toGdkModifiers(WebKit::WebEvent::Modifiers wkModifiers)
         modifiers |= GDK_LOCK_MASK;
     return modifiers;
 }
+#elif PLATFORM(WPE)
+unsigned toPlatformModifiers(WebKit::WebEvent::Modifiers wkModifiers)
+{
+    unsigned modifiers = 0;
+    if (wkModifiers & WebKit::WebEvent::Modifiers::ShiftKey)
+        modifiers |= wpe_input_keyboard_modifier_shift;
+    if (wkModifiers & WebKit::WebEvent::Modifiers::ControlKey)
+        modifiers |= wpe_input_keyboard_modifier_control;
+    if (wkModifiers & WebKit::WebEvent::Modifiers::AltKey)
+        modifiers |= wpe_input_keyboard_modifier_alt;
+    if (wkModifiers & WebKit::WebEvent::Modifiers::MetaKey)
+        modifiers |= wpe_input_keyboard_modifier_meta;
+    return modifiers;
+}
+#endif
 
 WebKitNavigationType toWebKitNavigationType(WebCore::NavigationType type)
 {
@@ -109,12 +130,14 @@ unsigned toWebKitError(unsigned webCoreError)
         return WEBKIT_DOWNLOAD_ERROR_CANCELLED_BY_USER;
     case API::Error::Download::Destination:
         return WEBKIT_DOWNLOAD_ERROR_DESTINATION;
+#if PLATFORM(GTK)
     case API::Error::Print::Generic:
         return WEBKIT_PRINT_ERROR_GENERAL;
     case API::Error::Print::PrinterNotFound:
         return WEBKIT_PRINT_ERROR_PRINTER_NOT_FOUND;
     case API::Error::Print::InvalidPageRange:
         return WEBKIT_PRINT_ERROR_INVALID_PAGE_RANGE;
+#endif
     default:
         // This may be a user app defined error, which needs to be passed as-is.
         return webCoreError;
@@ -152,12 +175,14 @@ unsigned toWebCoreError(unsigned webKitError)
         return API::Error::Download::CancelledByUser;
     case WEBKIT_DOWNLOAD_ERROR_DESTINATION:
         return API::Error::Download::Destination;
+#if PLATFORM(GTK)
     case WEBKIT_PRINT_ERROR_GENERAL:
         return API::Error::Print::Generic;
     case WEBKIT_PRINT_ERROR_PRINTER_NOT_FOUND:
         return API::Error::Print::PrinterNotFound;
     case WEBKIT_PRINT_ERROR_INVALID_PAGE_RANGE:
         return API::Error::Print::InvalidPageRange;
+#endif
     default:
         // This may be a user app defined error, which needs to be passed as-is.
         return webKitError;
index 9def927..b771ec4 100644 (file)
@@ -29,7 +29,7 @@
 #include "WebKitNavigationAction.h"
 #include <WebCore/FrameLoaderTypes.h>
 
-unsigned toGdkModifiers(WebKit::WebEvent::Modifiers);
+unsigned toPlatformModifiers(WebKit::WebEvent::Modifiers);
 WebKitNavigationType toWebKitNavigationType(WebCore::NavigationType);
 unsigned toWebKitMouseButton(WebKit::WebMouseEvent::Button);
 unsigned toWebKitError(unsigned webCoreError);
index edef3f4..c404b8b 100644 (file)
@@ -31,7 +31,6 @@
 #include "config.h"
 #include "WebKitSettings.h"
 
-#include "HardwareAccelerationManager.h"
 #include "WebKitEnumTypes.h"
 #include "WebKitSettingsPrivate.h"
 #include "WebPageProxy.h"
 #include <wtf/glib/WTFGType.h>
 #include <wtf/text/CString.h>
 
+#if PLATFORM(GTK)
+#include "HardwareAccelerationManager.h"
+#endif
+
 #if PLATFORM(WAYLAND)
 #include <WebCore/PlatformDisplay.h>
 #endif
@@ -147,7 +150,9 @@ enum {
     PROP_ENABLE_MEDIASOURCE,
     PROP_ALLOW_FILE_ACCESS_FROM_FILE_URLS,
     PROP_ALLOW_UNIVERSAL_ACCESS_FROM_FILE_URLS,
+#if PLATFORM(GTK)
     PROP_HARDWARE_ACCELERATION_POLICY,
+#endif
 };
 
 static void webKitSettingsConstructed(GObject* object)
@@ -321,9 +326,11 @@ static void webKitSettingsSetProperty(GObject* object, guint propId, const GValu
     case PROP_ALLOW_UNIVERSAL_ACCESS_FROM_FILE_URLS:
         webkit_settings_set_allow_universal_access_from_file_urls(settings, g_value_get_boolean(value));
         break;
+#if PLATFORM(GTK)
     case PROP_HARDWARE_ACCELERATION_POLICY:
         webkit_settings_set_hardware_acceleration_policy(settings, static_cast<WebKitHardwareAccelerationPolicy>(g_value_get_enum(value)));
         break;
+#endif
     default:
         G_OBJECT_WARN_INVALID_PROPERTY_ID(object, propId, paramSpec);
         break;
@@ -487,9 +494,11 @@ static void webKitSettingsGetProperty(GObject* object, guint propId, GValue* val
     case PROP_ALLOW_UNIVERSAL_ACCESS_FROM_FILE_URLS:
         g_value_set_boolean(value, webkit_settings_get_allow_universal_access_from_file_urls(settings));
         break;
+#if PLATFORM(GTK)
     case PROP_HARDWARE_ACCELERATION_POLICY:
         g_value_set_enum(value, webkit_settings_get_hardware_acceleration_policy(settings));
         break;
+#endif
     default:
         G_OBJECT_WARN_INVALID_PROPERTY_ID(object, propId, paramSpec);
         break;
@@ -1284,6 +1293,7 @@ static void webkit_settings_class_init(WebKitSettingsClass* klass)
             FALSE,
             readWriteConstructParamFlags));
 
+#if PLATFORM(GTK)
     /**
      * WebKitSettings:hardware-acceleration-policy:
      *
@@ -1309,6 +1319,7 @@ static void webkit_settings_class_init(WebKitSettingsClass* klass)
             WEBKIT_TYPE_HARDWARE_ACCELERATION_POLICY,
             WEBKIT_HARDWARE_ACCELERATION_POLICY_ON_DEMAND,
             readWriteConstructParamFlags));
+#endif // PLATFOTM(GTK)
 }
 
 WebPreferences* webkitSettingsGetPreferences(WebKitSettings* settings)
@@ -2839,6 +2850,7 @@ void webkit_settings_set_user_agent(WebKitSettings* settings, const char* userAg
 {
     g_return_if_fail(WEBKIT_IS_SETTINGS(settings));
 
+#if PLATFORM(GTK)
     WebKitSettingsPrivate* priv = settings->priv;
     CString newUserAgent = (!userAgent || !strlen(userAgent)) ? WebCore::standardUserAgent("").utf8() : userAgent;
     if (newUserAgent == priv->userAgent)
@@ -2846,6 +2858,9 @@ void webkit_settings_set_user_agent(WebKitSettings* settings, const char* userAg
 
     priv->userAgent = newUserAgent;
     g_object_notify(G_OBJECT(settings), "user-agent");
+#elif PLATFORM(WPE)
+    // FIXME: WPE should implement WebCore::standardUserAgent.
+#endif
 }
 
 /**
@@ -2862,8 +2877,12 @@ void webkit_settings_set_user_agent_with_application_details(WebKitSettings* set
 {
     g_return_if_fail(WEBKIT_IS_SETTINGS(settings));
 
+#if PLATFORM(GTK)
     CString newUserAgent = WebCore::standardUserAgent(String::fromUTF8(applicationName), String::fromUTF8(applicationVersion)).utf8();
     webkit_settings_set_user_agent(settings, newUserAgent.data());
+#elif PLATFORM(WPE)
+    // FIXME: WPE should implement WebCore::standardUserAgent.
+#endif
 }
 
 /**
@@ -3176,6 +3195,7 @@ void webkit_settings_set_allow_universal_access_from_file_urls(WebKitSettings* s
     g_object_notify(G_OBJECT(settings), "allow-universal-access-from-file-urls");
 }
 
+#if PLATFORM(GTK)
 /**
  * webkit_settings_get_hardware_acceleration_policy:
  * @settings: a #WebKitSettings
@@ -3257,3 +3277,4 @@ void webkit_settings_set_hardware_acceleration_policy(WebKitSettings* settings,
     if (changed)
         g_object_notify(G_OBJECT(settings), "hardware-acceleration-policy");
 }
+#endif // PLATFORM(GTK)
index 314e0b4..bd8896a 100644 (file)
 #include "WebKitWebViewPrivate.h"
 #include "WebKitWindowPropertiesPrivate.h"
 #include "WebPageProxy.h"
-#include <WebCore/GtkUtilities.h>
 #include <wtf/glib/GRefPtr.h>
 
+#if PLATFORM(GTK)
+#include <WebCore/GtkUtilities.h>
+#endif
+
 using namespace WebKit;
 
 class UIClient : public API::UIClient {
@@ -91,7 +94,7 @@ private:
 
     void mouseDidMoveOverElement(WebPageProxy*, const WebHitTestResultData& data, WebEvent::Modifiers modifiers, API::Object*) override
     {
-        webkitWebViewMouseTargetChanged(m_webView, data, toGdkModifiers(modifiers));
+        webkitWebViewMouseTargetChanged(m_webView, data, modifiers);
     }
 
     bool toolbarsAreVisible(WebPageProxy*) override
@@ -136,6 +139,7 @@ private:
 
     void setWindowFrame(WebPageProxy*, const WebCore::FloatRect& frame) override
     {
+#if PLATFORM(GTK)
         GdkRectangle geometry = WebCore::IntRect(frame);
         GtkWidget* window = gtk_widget_get_toplevel(GTK_WIDGET(m_webView));
         if (webkit_web_view_is_controlled_by_automation(m_webView) && WebCore::widgetIsOnscreenToplevelWindow(window) && gtk_widget_get_visible(window)) {
@@ -145,10 +149,12 @@ private:
                 gtk_window_resize(GTK_WINDOW(window), geometry.width, geometry.height);
         } else
             webkitWindowPropertiesSetGeometry(webkit_web_view_get_window_properties(m_webView), &geometry);
+#endif
     }
 
     WebCore::FloatRect windowFrame(WebPageProxy*) override
     {
+#if PLATFORM(GTK)
         GdkRectangle geometry = { 0, 0, 0, 0 };
         GtkWidget* window = gtk_widget_get_toplevel(GTK_WIDGET(m_webView));
         if (WebCore::widgetIsOnscreenToplevelWindow(window) && gtk_widget_get_visible(window)) {
@@ -156,6 +162,10 @@ private:
             gtk_window_get_size(GTK_WINDOW(window), &geometry.width, &geometry.height);
         }
         return WebCore::FloatRect(geometry);
+#elif PLATFORM(WPE)
+        // FIXME: I guess this is actually the view size in WPE. We need more refactoring here.
+        return { };
+#endif
     }
 
     void exceededDatabaseQuota(WebPageProxy*, WebFrameProxy*, API::SecurityOrigin*, const String&, const String&, unsigned long long /*currentQuota*/, unsigned long long /*currentOriginUsage*/, unsigned long long /*currentDatabaseUsage*/, unsigned long long /*expectedUsage*/, Function<void (unsigned long long)>&& completionHandler) override
@@ -193,10 +203,12 @@ private:
         return true;
     }
 
+#if PLATFORM(GTK)
     void printFrame(WebPageProxy*, WebFrameProxy* frame) override
     {
         webkitWebViewPrintFrame(m_webView, frame);
     }
+#endif
 
     bool canRunModal() const override { return true; }
 
index f669e6b..91674ac 100644 (file)
@@ -166,7 +166,7 @@ WebKitWebView* webkit_uri_scheme_request_get_web_view(WebKitURISchemeRequest* re
     g_return_val_if_fail(WEBKIT_IS_URI_SCHEME_REQUEST(request), 0);
 
     // FIXME: initiatingPage is now always null, we need to re-implement this somehow.
-    return request->priv->initiatingPage ? WEBKIT_WEB_VIEW(request->priv->initiatingPage->viewWidget()) : nullptr;
+    return request->priv->initiatingPage ? webkitWebContextGetWebViewForPage(request->priv->webContext, request->priv->initiatingPage.get()) : nullptr;
 }
 
 static void webkitURISchemeRequestReadCallback(GInputStream* inputStream, GAsyncResult* result, WebKitURISchemeRequest* schemeRequest)
index 9fcf5ca..31d4f84 100644 (file)
@@ -186,9 +186,13 @@ public:
 
     void didPostMessage(WebPageProxy& page, const FrameInfoData&, WebCore::SerializedScriptValue& serializedScriptValue) override
     {
+#if PLATFORM(GTK)
         WebKitJavascriptResult* jsResult = webkitJavascriptResultCreate(WEBKIT_WEB_VIEW(page.viewWidget()), serializedScriptValue);
         g_signal_emit(m_manager, signals[SCRIPT_MESSAGE_RECEIVED], m_handlerName, jsResult);
         webkit_javascript_result_unref(jsResult);
+#else
+        // FIXME: We need a way to get the WebKitWebView here in WPE.
+#endif
     }
 
     virtual ~ScriptMessageClientGtk() { }
index 933d850..06d254e 100644 (file)
@@ -43,7 +43,6 @@
 #include "WebKitNotificationProvider.h"
 #include "WebKitPluginPrivate.h"
 #include "WebKitPrivate.h"
-#include "WebKitRemoteInspectorProtocolHandler.h"
 #include "WebKitSecurityManagerPrivate.h"
 #include "WebKitSecurityOriginPrivate.h"
 #include "WebKitSettingsPrivate.h"
 #include <wtf/glib/WTFGType.h>
 #include <wtf/text/CString.h>
 
+#if PLATFORM(GTK)
+#include "WebKitRemoteInspectorProtocolHandler.h"
+#endif
+
 using namespace WebKit;
 
 /**
@@ -185,7 +188,9 @@ struct _WebKitWebContextPrivate {
 
     CString localStorageDirectory;
 #if ENABLE(REMOTE_INSPECTOR)
+#if PLATFORM(GTK)
     std::unique_ptr<RemoteInspectorProtocolHandler> remoteInspectorProtocolHandler;
+#endif
     std::unique_ptr<WebKitAutomationClient> automationClient;
     GRefPtr<WebKitAutomationSession> automationSession;
 #endif
@@ -232,9 +237,14 @@ static const char* injectedBundleDirectory()
         return bundleDirectory;
 #endif
 
+#if PLATFORM(GTK)
     static const char* injectedBundlePath = LIBDIR G_DIR_SEPARATOR_S "webkit2gtk-" WEBKITGTK_API_VERSION_STRING
         G_DIR_SEPARATOR_S "injected-bundle" G_DIR_SEPARATOR_S;
     return injectedBundlePath;
+#elif PLATFORM(WPE)
+    // FIXME: Add web extensions API support to WPE.
+    return nullptr;
+#endif
 }
 
 static void webkitWebContextGetProperty(GObject* object, guint propID, GValue* value, GParamSpec* paramSpec)
@@ -327,7 +337,7 @@ static void webkitWebContextConstructed(GObject* object)
     priv->geolocationProvider = std::make_unique<WebKitGeolocationProvider>(priv->processPool->supplement<WebGeolocationManagerProxy>());
 #endif
     priv->notificationProvider = std::make_unique<WebKitNotificationProvider>(priv->processPool->supplement<WebNotificationManagerProxy>(), webContext);
-#if ENABLE(REMOTE_INSPECTOR)
+#if PLATFORM(GTK) && ENABLE(REMOTE_INSPECTOR)
     priv->remoteInspectorProtocolHandler = std::make_unique<RemoteInspectorProtocolHandler>(webContext);
 #endif
 }
index 1066f73..713ff88 100644 (file)
@@ -28,7 +28,6 @@
 #include "WebCertificateInfo.h"
 #include "WebContextMenuItem.h"
 #include "WebContextMenuItemData.h"
-#include "WebKitAuthenticationDialog.h"
 #include "WebKitAuthenticationRequestPrivate.h"
 #include "WebKitBackForwardListPrivate.h"
 #include "WebKitContextMenuClient.h"
@@ -46,7 +45,6 @@
 #include "WebKitLoaderClient.h"
 #include "WebKitNotificationPrivate.h"
 #include "WebKitPolicyClient.h"
-#include "WebKitPrintOperationPrivate.h"
 #include "WebKitPrivate.h"
 #include "WebKitResponsePolicyDecision.h"
 #include "WebKitScriptDialogPrivate.h"
 #include "WebKitURIRequestPrivate.h"
 #include "WebKitURIResponsePrivate.h"
 #include "WebKitWebContextPrivate.h"
-#include "WebKitWebInspectorPrivate.h"
 #include "WebKitWebResourcePrivate.h"
-#include "WebKitWebViewBasePrivate.h"
 #include "WebKitWebViewPrivate.h"
 #include "WebKitWebViewSessionStatePrivate.h"
 #include "WebKitWebsiteDataManagerPrivate.h"
 #include "WebKitWindowPropertiesPrivate.h"
 #include <JavaScriptCore/APICast.h>
 #include <WebCore/CertificateInfo.h>
-#include <WebCore/GUniquePtrGtk.h>
 #include <WebCore/GUniquePtrSoup.h>
-#include <WebCore/GtkUtilities.h>
 #include <WebCore/JSDOMExceptionHandling.h>
 #include <WebCore/RefPtrCairo.h>
 #include <glib/gi18n-lib.h>
 #include <wtf/text/CString.h>
 #include <wtf/text/StringBuilder.h>
 
+#if PLATFORM(GTK)
+#include "WebKitPrintOperationPrivate.h"
+#include "WebKitWebInspectorPrivate.h"
+#include "WebKitWebViewBasePrivate.h"
+#include <WebCore/GUniquePtrGtk.h>
+#endif
+
+#if PLATFORM(WPE)
+#include "WPEView.h"
+#endif
+
 #if USE(LIBNOTIFY)
 #include <libnotify/notify.h>
 #endif
@@ -114,7 +119,9 @@ enum {
 
     MOUSE_TARGET_CHANGED,
 
+#if PLATFORM(GTK)
     PRINT,
+#endif
 
     RESOURCE_LOAD_STARTED,
 
@@ -136,9 +143,11 @@ enum {
 
     SHOW_NOTIFICATION,
 
+#if PLATFORM(GTK)
     RUN_COLOR_CHOOSER,
 
     SHOW_OPTION_MENU,
+#endif
 
     LAST_SIGNAL
 };
@@ -178,6 +187,10 @@ struct _WebKitWebViewPrivate {
             g_main_loop_quit(modalLoop.get());
     }
 
+#if PLATFORM(WPE)
+    std::unique_ptr<WKWPE::View> view;
+#endif
+
     WebKitWebView* relatedView;
     CString title;
     CString customTextEncoding;
@@ -198,7 +211,7 @@ struct _WebKitWebViewPrivate {
     GRefPtr<GMainLoop> modalLoop;
 
     GRefPtr<WebKitHitTestResult> mouseTargetHitTestResult;
-    unsigned mouseTargetModifiers;
+    WebEvent::Modifiers mouseTargetModifiers;
 
     GRefPtr<WebKitFindController> findController;
     JSGlobalContextRef javascriptGlobalContext;
@@ -206,7 +219,9 @@ struct _WebKitWebViewPrivate {
     GRefPtr<WebKitWebResource> mainResource;
     LoadingResourcesMap loadingResourcesMap;
 
+#if PLATFORM(GTK)
     GRefPtr<WebKitWebInspector> inspector;
+#endif
 
     RefPtr<cairo_surface_t> favicon;
     GRefPtr<GCancellable> faviconCancellable;
@@ -221,13 +236,22 @@ struct _WebKitWebViewPrivate {
 
 static guint signals[LAST_SIGNAL] = { 0, };
 
+#if PLATFORM(GTK)
 WEBKIT_DEFINE_TYPE(WebKitWebView, webkit_web_view, WEBKIT_TYPE_WEB_VIEW_BASE)
+#elif PLATFORM(WPE)
+WEBKIT_DEFINE_TYPE(WebKitWebView, webkit_web_view, G_TYPE_OBJECT)
+#endif
 
 static inline WebPageProxy& getPage(WebKitWebView* webView)
 {
+#if PLATFORM(GTK)
     auto* page = webkitWebViewBaseGetPage(reinterpret_cast<WebKitWebViewBase*>(webView));
     ASSERT(page);
     return *page;
+#elif PLATFORM(WPE)
+    ASSERT(webView->priv->view);
+    return webView->priv->view->page();
+#endif
 }
 
 static void webkitWebViewSetIsLoading(WebKitWebView* webView, bool isLoading)
@@ -324,63 +348,17 @@ static gboolean webkitWebViewLoadFail(WebKitWebView* webView, WebKitLoadEvent, c
     return TRUE;
 }
 
+#if PLATFORM(GTK)
 static GtkWidget* webkitWebViewCreate(WebKitWebView*, WebKitNavigationAction*)
 {
     return nullptr;
 }
-
-static GtkWidget* webkitWebViewCreateJavaScriptDialog(WebKitWebView* webView, GtkMessageType type, GtkButtonsType buttons, int defaultResponse, const char* primaryText, const char* secondaryText = nullptr)
-{
-    GtkWidget* parent = gtk_widget_get_toplevel(GTK_WIDGET(webView));
-    GtkWidget* dialog = gtk_message_dialog_new(widgetIsOnscreenToplevelWindow(parent) ? GTK_WINDOW(parent) : nullptr,
-        GTK_DIALOG_DESTROY_WITH_PARENT, type, buttons, "%s", primaryText);
-    if (secondaryText)
-        gtk_message_dialog_format_secondary_text(GTK_MESSAGE_DIALOG(dialog), "%s", secondaryText);
-    GUniquePtr<char> title(g_strdup_printf("JavaScript - %s", getPage(webView).pageLoadState().url().utf8().data()));
-    gtk_window_set_title(GTK_WINDOW(dialog), title.get());
-    if (buttons != GTK_BUTTONS_NONE)
-        gtk_dialog_set_default_response(GTK_DIALOG(dialog), defaultResponse);
-
-    return dialog;
-}
-
-static gboolean webkitWebViewScriptDialog(WebKitWebView* webView, WebKitScriptDialog* scriptDialog)
+#else
+static WebKitWebView* webkitWebViewCreate(WebKitWebView*, WebKitNavigationAction*)
 {
-    GtkWidget* dialog = 0;
-
-    switch (scriptDialog->type) {
-    case WEBKIT_SCRIPT_DIALOG_ALERT:
-        dialog = webkitWebViewCreateJavaScriptDialog(webView, GTK_MESSAGE_WARNING, GTK_BUTTONS_CLOSE, GTK_RESPONSE_CLOSE, scriptDialog->message.data());
-        gtk_dialog_run(GTK_DIALOG(dialog));
-        break;
-    case WEBKIT_SCRIPT_DIALOG_CONFIRM:
-        dialog = webkitWebViewCreateJavaScriptDialog(webView, GTK_MESSAGE_QUESTION, GTK_BUTTONS_OK_CANCEL, GTK_RESPONSE_OK, scriptDialog->message.data());
-        scriptDialog->confirmed = gtk_dialog_run(GTK_DIALOG(dialog)) == GTK_RESPONSE_OK;
-        break;
-    case WEBKIT_SCRIPT_DIALOG_PROMPT: {
-        dialog = webkitWebViewCreateJavaScriptDialog(webView, GTK_MESSAGE_QUESTION, GTK_BUTTONS_OK_CANCEL, GTK_RESPONSE_OK, scriptDialog->message.data());
-        GtkWidget* entry = gtk_entry_new();
-        gtk_entry_set_text(GTK_ENTRY(entry), scriptDialog->defaultText.data());
-        gtk_container_add(GTK_CONTAINER(gtk_dialog_get_content_area(GTK_DIALOG(dialog))), entry);
-        gtk_entry_set_activates_default(GTK_ENTRY(entry), TRUE);
-        gtk_widget_show(entry);
-        if (gtk_dialog_run(GTK_DIALOG(dialog)) == GTK_RESPONSE_OK)
-            scriptDialog->text = gtk_entry_get_text(GTK_ENTRY(entry));
-        break;
-    }
-    case WEBKIT_SCRIPT_DIALOG_BEFORE_UNLOAD_CONFIRM:
-        dialog = webkitWebViewCreateJavaScriptDialog(webView, GTK_MESSAGE_QUESTION, GTK_BUTTONS_NONE, GTK_RESPONSE_OK,
-            _("Are you sure you want to leave this page?"), scriptDialog->message.data());
-        gtk_dialog_add_buttons(GTK_DIALOG(dialog), _("Stay on Page"), GTK_RESPONSE_CLOSE, _("Leave Page"), GTK_RESPONSE_OK, nullptr);
-        gtk_dialog_set_default_response(GTK_DIALOG(dialog), GTK_RESPONSE_OK);
-        scriptDialog->confirmed = gtk_dialog_run(GTK_DIALOG(dialog)) == GTK_RESPONSE_OK;
-        break;
-    }
-
-    gtk_widget_destroy(dialog);
-
-    return TRUE;
+    return nullptr;
 }
+#endif
 
 static gboolean webkitWebViewDecidePolicy(WebKitWebView*, WebKitPolicyDecision* decision, WebKitPolicyDecisionType decisionType)
 {
@@ -543,76 +521,6 @@ static void webkitWebViewDisconnectFaviconDatabaseSignalHandlers(WebKitWebView*
     priv->faviconChangedHandlerID = 0;
 }
 
-static gboolean webkitWebViewAuthenticate(WebKitWebView* webView, WebKitAuthenticationRequest* request)
-{
-    CredentialStorageMode credentialStorageMode = webkit_authentication_request_can_save_credentials(request) ? AllowPersistentStorage : DisallowPersistentStorage;
-    webkitWebViewBaseAddAuthenticationDialog(WEBKIT_WEB_VIEW_BASE(webView), webkitAuthenticationDialogNew(request, credentialStorageMode));
-
-    return TRUE;
-}
-
-static void fileChooserDialogResponseCallback(GtkFileChooser* dialog, gint responseID, WebKitFileChooserRequest* request)
-{
-    GRefPtr<WebKitFileChooserRequest> adoptedRequest = adoptGRef(request);
-    if (responseID == GTK_RESPONSE_ACCEPT) {
-        GUniquePtr<GSList> filesList(gtk_file_chooser_get_filenames(dialog));
-        GRefPtr<GPtrArray> filesArray = adoptGRef(g_ptr_array_new());
-        for (GSList* file = filesList.get(); file; file = g_slist_next(file))
-            g_ptr_array_add(filesArray.get(), file->data);
-        g_ptr_array_add(filesArray.get(), 0);
-        webkit_file_chooser_request_select_files(adoptedRequest.get(), reinterpret_cast<const gchar* const*>(filesArray->pdata));
-    } else
-        webkit_file_chooser_request_cancel(adoptedRequest.get());
-
-#if GTK_CHECK_VERSION(3, 20, 0)
-    g_object_unref(dialog);
-#else
-    gtk_widget_destroy(GTK_WIDGET(dialog));
-#endif
-}
-
-static gboolean webkitWebViewRunFileChooser(WebKitWebView* webView, WebKitFileChooserRequest* request)
-{
-    GtkWidget* toplevel = gtk_widget_get_toplevel(GTK_WIDGET(webView));
-    if (!widgetIsOnscreenToplevelWindow(toplevel))
-        toplevel = 0;
-
-    gboolean allowsMultipleSelection = webkit_file_chooser_request_get_select_multiple(request);
-
-#if GTK_CHECK_VERSION(3, 20, 0)
-    GtkFileChooserNative* dialog = gtk_file_chooser_native_new(allowsMultipleSelection ? _("Select Files") : _("Select File"),
-        toplevel ? GTK_WINDOW(toplevel) : nullptr, GTK_FILE_CHOOSER_ACTION_OPEN, nullptr, nullptr);
-    if (toplevel)
-        gtk_native_dialog_set_modal(GTK_NATIVE_DIALOG(dialog), TRUE);
-#else
-    GtkWidget* dialog = gtk_file_chooser_dialog_new(allowsMultipleSelection ? _("Select Files") : _("Select File"),
-                                                    toplevel ? GTK_WINDOW(toplevel) : 0,
-                                                    GTK_FILE_CHOOSER_ACTION_OPEN,
-                                                    GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
-                                                    GTK_STOCK_OPEN, GTK_RESPONSE_ACCEPT,
-                                                    NULL);
-    if (toplevel)
-        gtk_window_set_modal(GTK_WINDOW(dialog), TRUE);
-#endif
-
-    if (GtkFileFilter* filter = webkit_file_chooser_request_get_mime_types_filter(request))
-        gtk_file_chooser_set_filter(GTK_FILE_CHOOSER(dialog), filter);
-    gtk_file_chooser_set_select_multiple(GTK_FILE_CHOOSER(dialog), allowsMultipleSelection);
-
-    if (const gchar* const* selectedFiles = webkit_file_chooser_request_get_selected_files(request))
-        gtk_file_chooser_select_filename(GTK_FILE_CHOOSER(dialog), selectedFiles[0]);
-
-    g_signal_connect(dialog, "response", G_CALLBACK(fileChooserDialogResponseCallback), g_object_ref(request));
-
-#if GTK_CHECK_VERSION(3, 20, 0)
-    gtk_native_dialog_show(GTK_NATIVE_DIALOG(dialog));
-#else
-    gtk_widget_show(dialog);
-#endif
-
-    return TRUE;
-}
-
 #if USE(LIBNOTIFY)
 static const char* gNotifyNotificationID = "wk-notify-notification";
 
@@ -1255,7 +1163,12 @@ static void webkit_web_view_class_init(WebKitWebViewClass* webViewClass)
         G_STRUCT_OFFSET(WebKitWebViewClass, create),
         webkitWebViewAccumulatorObjectHandled, 0,
         g_cclosure_marshal_generic,
-        GTK_TYPE_WIDGET, 1,
+#if PLATFORM(GTK)
+        GTK_TYPE_WIDGET,
+#else
+        WEBKIT_TYPE_WEB_VIEW,
+#endif
+        1,
         WEBKIT_TYPE_NAVIGATION_ACTION | G_SIGNAL_TYPE_STATIC_SCOPE);
 
     /**
@@ -1510,6 +1423,7 @@ static void webkit_web_view_class_init(WebKitWebViewClass* webViewClass)
         WEBKIT_TYPE_HIT_TEST_RESULT,
         G_TYPE_UINT);
 
+#if PLATFORM(GTK)
     /**
      * WebKitWebView::print:
      * @web_view: the #WebKitWebView on which the signal is emitted
@@ -1537,6 +1451,7 @@ static void webkit_web_view_class_init(WebKitWebViewClass* webViewClass)
         g_cclosure_marshal_generic,
         G_TYPE_BOOLEAN, 1,
         WEBKIT_TYPE_PRINT_OPERATION);
+#endif // PLATFORM(GTK)
 
     /**
      * WebKitWebView::resource-load-started:
@@ -1706,7 +1621,11 @@ static void webkit_web_view_class_init(WebKitWebViewClass* webViewClass)
         g_cclosure_marshal_generic,
         G_TYPE_BOOLEAN, 3,
         WEBKIT_TYPE_CONTEXT_MENU,
+#if PLATFORM(GTK)
         GDK_TYPE_EVENT | G_SIGNAL_TYPE_STATIC_SCOPE,
+#elif PLATFORM(WPE)
+        G_TYPE_POINTER, // FIXME: use a wpe thing here. I'm not sure we want to expose libwpe in the API.
+#endif
         WEBKIT_TYPE_HIT_TEST_RESULT);
 
     /**
@@ -1853,6 +1772,7 @@ static void webkit_web_view_class_init(WebKitWebViewClass* webViewClass)
         G_TYPE_BOOLEAN, 1,
         WEBKIT_TYPE_NOTIFICATION);
 
+#if PLATFORM(GTK)
      /**
       * WebKitWebView::run-color-chooser:
       * @web_view: the #WebKitWebView on which the signal is emitted
@@ -1920,6 +1840,7 @@ static void webkit_web_view_class_init(WebKitWebViewClass* webViewClass)
         WEBKIT_TYPE_OPTION_MENU,
         GDK_TYPE_EVENT | G_SIGNAL_TYPE_STATIC_SCOPE,
         GDK_TYPE_RECTANGLE | G_SIGNAL_TYPE_STATIC_SCOPE);
+#endif // PLATFORM(GTK)
 }
 
 static void webkitWebViewCancelAuthenticationRequest(WebKitWebView* webView)
@@ -1933,7 +1854,11 @@ static void webkitWebViewCancelAuthenticationRequest(WebKitWebView* webView)
 
 void webkitWebViewCreatePage(WebKitWebView* webView, Ref<API::PageConfiguration>&& configuration)
 {
+#if PLATFORM(GTK)
     webkitWebViewBaseCreateWebPage(WEBKIT_WEB_VIEW_BASE(webView), WTFMove(configuration));
+#elif PLATFORM(WPE)
+    webView->priv->view.reset(WKWPE::View::create(nullptr, configuration.get()));
+#endif
 }
 
 WebPageProxy& webkitWebViewGetPage(WebKitWebView* webView)
@@ -2016,13 +1941,19 @@ void webkitWebViewRunAsModal(WebKitWebView* webView)
 
     webView->priv->modalLoop = adoptGRef(g_main_loop_new(0, FALSE));
 
+#if PLATFORM(GTK)
 // This is to suppress warnings about gdk_threads_leave and gdk_threads_enter.
 #pragma GCC diagnostic push
 #pragma GCC diagnostic ignored "-Wdeprecated-declarations"
     gdk_threads_leave();
+#endif
+
     g_main_loop_run(webView->priv->modalLoop.get());
+
+#if PLATFORM(GTK)
     gdk_threads_enter();
 #pragma GCC diagnostic pop
+#endif
 }
 
 void webkitWebViewClosePage(WebKitWebView* webView)
@@ -2073,9 +2004,11 @@ void webkitWebViewMakePermissionRequest(WebKitWebView* webView, WebKitPermission
     g_signal_emit(webView, signals[PERMISSION_REQUEST], 0, request, &returnValue);
 }
 
-void webkitWebViewMouseTargetChanged(WebKitWebView* webView, const WebHitTestResultData& hitTestResult, unsigned modifiers)
+void webkitWebViewMouseTargetChanged(WebKitWebView* webView, const WebHitTestResultData& hitTestResult, WebEvent::Modifiers modifiers)
 {
+#if PLATFORM(GTK)
     webkitWebViewBaseSetTooltipArea(WEBKIT_WEB_VIEW_BASE(webView), hitTestResult.elementBoundingBox);
+#endif
 
     WebKitWebViewPrivate* priv = webView->priv;
     if (priv->mouseTargetHitTestResult
@@ -2085,7 +2018,7 @@ void webkitWebViewMouseTargetChanged(WebKitWebView* webView, const WebHitTestRes
 
     priv->mouseTargetModifiers = modifiers;
     priv->mouseTargetHitTestResult = adoptGRef(webkitHitTestResultCreate(hitTestResult));
-    g_signal_emit(webView, signals[MOUSE_TARGET_CHANGED], 0, priv->mouseTargetHitTestResult.get(), modifiers);
+    g_signal_emit(webView, signals[MOUSE_TARGET_CHANGED], 0, priv->mouseTargetHitTestResult.get(), toPlatformModifiers(modifiers));
 }
 
 void webkitWebViewHandleDownloadRequest(WebKitWebView* webView, DownloadProxy* downloadProxy)
@@ -2095,6 +2028,7 @@ void webkitWebViewHandleDownloadRequest(WebKitWebView* webView, DownloadProxy* d
     webkitDownloadSetWebView(download.get(), webView);
 }
 
+#if PLATFORM(GTK)
 void webkitWebViewPrintFrame(WebKitWebView* webView, WebFrameProxy* frame)
 {
     auto printOperation = adoptGRef(webkit_print_operation_new(webView));
@@ -2109,6 +2043,7 @@ void webkitWebViewPrintFrame(WebKitWebView* webView, WebFrameProxy* frame)
         return;
     g_signal_connect(printOperation.leakRef(), "finished", G_CALLBACK(g_object_unref), 0);
 }
+#endif
 
 void webkitWebViewResourceLoadStarted(WebKitWebView* webView, WebFrameProxy* frame, uint64_t resourceIdentifier, WebKitURIRequest* request)
 {
@@ -2139,9 +2074,11 @@ void webkitWebViewEnterFullScreen(WebKitWebView* webView)
 #if ENABLE(FULLSCREEN_API)
     gboolean returnValue;
     g_signal_emit(webView, signals[ENTER_FULLSCREEN], 0, &returnValue);
+#if PLATFORM(GTK)
     if (!returnValue)
         webkitWebViewBaseEnterFullScreen(WEBKIT_WEB_VIEW_BASE(webView));
 #endif
+#endif
 }
 
 void webkitWebViewExitFullScreen(WebKitWebView* webView)
@@ -2149,9 +2086,11 @@ void webkitWebViewExitFullScreen(WebKitWebView* webView)
 #if ENABLE(FULLSCREEN_API)
     gboolean returnValue;
     g_signal_emit(webView, signals[LEAVE_FULLSCREEN], 0, &returnValue);
+#if PLATFORM(GTK)
     if (!returnValue)
         webkitWebViewBaseExitFullScreen(WEBKIT_WEB_VIEW_BASE(webView));
 #endif
+#endif
 }
 
 void webkitWebViewRunFileChooserRequest(WebKitWebView* webView, WebKitFileChooserRequest* request)
@@ -2160,6 +2099,7 @@ void webkitWebViewRunFileChooserRequest(WebKitWebView* webView, WebKitFileChoose
     g_signal_emit(webView, signals[RUN_FILE_CHOOSER], 0, request, &returnValue);
 }
 
+#if PLATFORM(GTK)
 static void contextMenuDismissed(GtkMenuShell*, WebKitWebView* webView)
 {
     g_signal_emit(webView, signals[CONTEXT_MENU_DISMISSED], 0, NULL);
@@ -2191,6 +2131,17 @@ void webkitWebViewPopulateContextMenu(WebKitWebView* webView, const Vector<WebCo
     // Clear the menu to make sure it's useless after signal emission.
     webkit_context_menu_remove_all(contextMenu.get());
 }
+#elif PLATFORM(WPE)
+void webkitWebViewPopulateContextMenu(WebKitWebView* webView, const Vector<WebContextMenuItemData>& proposedMenu, const WebHitTestResultData& hitTestResultData, GVariant* userData)
+{
+    GRefPtr<WebKitContextMenu> contextMenu = adoptGRef(webkitContextMenuCreate(proposedMenu));
+    if (userData)
+        webkit_context_menu_set_user_data(WEBKIT_CONTEXT_MENU(contextMenu.get()), userData);
+    GRefPtr<WebKitHitTestResult> hitTestResult = adoptGRef(webkitHitTestResultCreate(hitTestResultData));
+    gboolean returnValue;
+    g_signal_emit(webView, signals[CONTEXT_MENU], 0, contextMenu.get(), nullptr, hitTestResult.get(), &returnValue);
+}
+#endif
 
 void webkitWebViewSubmitFormRequest(WebKitWebView* webView, WebKitFormSubmissionRequest* request)
 {
@@ -2219,12 +2170,14 @@ bool webkitWebViewEmitShowNotification(WebKitWebView* webView, WebKitNotificatio
     return handled;
 }
 
+#if PLATFORM(GTK)
 bool webkitWebViewEmitRunColorChooser(WebKitWebView* webView, WebKitColorChooserRequest* request)
 {
     gboolean handled;
     g_signal_emit(webView, signals[RUN_COLOR_CHOOSER], 0, request, &handled);
     return handled;
 }
+#endif
 
 void webkitWebViewSelectionDidChange(WebKitWebView* webView)
 {
@@ -2249,6 +2202,7 @@ WebKitWebsiteDataManager* webkitWebViewGetWebsiteDataManager(WebKitWebView* webV
     return webView->priv->websiteDataManager.get();
 }
 
+#if PLATFORM(GTK)
 bool webkitWebViewShowOptionMenu(WebKitWebView* webView, const IntRect& rect, WebKitOptionMenu* menu, const GdkEvent* event)
 {
     GdkRectangle menuRect = rect;
@@ -2256,110 +2210,7 @@ bool webkitWebViewShowOptionMenu(WebKitWebView* webView, const IntRect& rect, We
     g_signal_emit(webView, signals[SHOW_OPTION_MENU], 0, menu, event, &menuRect, &handled);
     return handled;
 }
-
-/**
- * webkit_web_view_new:
- *
- * Creates a new #WebKitWebView with the default #WebKitWebContext and
- * no #WebKitUserContentManager associated with it.
- * See also webkit_web_view_new_with_context(),
- * webkit_web_view_new_with_user_content_manager(), and
- * webkit_web_view_new_with_settings().
- *
- * Returns: The newly created #WebKitWebView widget
- */
-GtkWidget* webkit_web_view_new()
-{
-    return webkit_web_view_new_with_context(webkit_web_context_get_default());
-}
-
-/**
- * webkit_web_view_new_with_context:
- * @context: the #WebKitWebContext to be used by the #WebKitWebView
- *
- * Creates a new #WebKitWebView with the given #WebKitWebContext and
- * no #WebKitUserContentManager associated with it.
- * See also webkit_web_view_new_with_user_content_manager() and
- * webkit_web_view_new_with_settings().
- *
- * Returns: The newly created #WebKitWebView widget
- */
-GtkWidget* webkit_web_view_new_with_context(WebKitWebContext* context)
-{
-    g_return_val_if_fail(WEBKIT_IS_WEB_CONTEXT(context), 0);
-
-    return GTK_WIDGET(g_object_new(WEBKIT_TYPE_WEB_VIEW,
-        "is-ephemeral", webkit_web_context_is_ephemeral(context),
-        "web-context", context,
-        nullptr));
-}
-
-/**
- * webkit_web_view_new_with_related_view:
- * @web_view: the related #WebKitWebView
- *
- * Creates a new #WebKitWebView sharing the same web process with @web_view.
- * This method doesn't have any effect when %WEBKIT_PROCESS_MODEL_SHARED_SECONDARY_PROCESS
- * process model is used, because a single web process is shared for all the web views in the
- * same #WebKitWebContext. When using %WEBKIT_PROCESS_MODEL_MULTIPLE_SECONDARY_PROCESSES process model,
- * this method should always be used when creating the #WebKitWebView in the #WebKitWebView::create signal.
- * You can also use this method to implement other process models based on %WEBKIT_PROCESS_MODEL_MULTIPLE_SECONDARY_PROCESSES,
- * like for example, sharing the same web process for all the views in the same security domain.
- *
- * The newly created #WebKitWebView will also have the same #WebKitUserContentManager
- * and #WebKitSettings as @web_view.
- *
- * Returns: (transfer full): The newly created #WebKitWebView widget
- *
- * Since: 2.4
- */
-GtkWidget* webkit_web_view_new_with_related_view(WebKitWebView* webView)
-{
-    g_return_val_if_fail(WEBKIT_IS_WEB_VIEW(webView), nullptr);
-
-    return GTK_WIDGET(g_object_new(WEBKIT_TYPE_WEB_VIEW,
-        "user-content-manager", webView->priv->userContentManager.get(),
-        "settings", webView->priv->settings.get(),
-        "related-view", webView,
-        nullptr));
-}
-
-/**
- * webkit_web_view_new_with_settings:
- * @settings: a #WebKitSettings
- *
- * Creates a new #WebKitWebView with the given #WebKitSettings.
- * See also webkit_web_view_new_with_context(), and
- * webkit_web_view_new_with_user_content_manager().
- *
- * Returns: The newly created #WebKitWebView widget
- *
- * Since: 2.6
- */
-GtkWidget* webkit_web_view_new_with_settings(WebKitSettings* settings)
-{
-    g_return_val_if_fail(WEBKIT_IS_SETTINGS(settings), nullptr);
-    return GTK_WIDGET(g_object_new(WEBKIT_TYPE_WEB_VIEW, "settings", settings, nullptr));
-}
-
-/**
- * webkit_web_view_new_with_user_content_manager:
- * @user_content_manager: a #WebKitUserContentManager.
- *
- * Creates a new #WebKitWebView with the given #WebKitUserContentManager.
- * The content loaded in the view may be affected by the content injected
- * in the view by the user content manager.
- *
- * Returns: The newly created #WebKitWebView widget
- *
- * Since: 2.6
- */
-GtkWidget* webkit_web_view_new_with_user_content_manager(WebKitUserContentManager* userContentManager)
-{
-    g_return_val_if_fail(WEBKIT_IS_USER_CONTENT_MANAGER(userContentManager), nullptr);
-
-    return GTK_WIDGET(g_object_new(WEBKIT_TYPE_WEB_VIEW, "user-content-manager", userContentManager, nullptr));
-}
+#endif
 
 /**
  * webkit_web_view_get_context:
@@ -3416,6 +3267,7 @@ WebKitWebResource* webkit_web_view_get_main_resource(WebKitWebView* webView)
     return webView->priv->mainResource.get();
 }
 
+#if PLATFORM(GTK)
 /**
  * webkit_web_view_get_inspector:
  * @web_view: a #WebKitWebView
@@ -3433,6 +3285,7 @@ WebKitWebInspector* webkit_web_view_get_inspector(WebKitWebView* webView)
 
     return webView->priv->inspector.get();
 }
+#endif
 
 /**
  * webkit_web_view_can_show_mime_type:
@@ -3768,6 +3621,7 @@ void webkitWebViewWebProcessCrashed(WebKitWebView* webView)
     g_signal_emit(webView, signals[WEB_PROCESS_CRASHED], 0, &returnValue);
 }
 
+#if PLATFORM(GTK)
 /**
  * webkit_web_view_set_background_color:
  * @web_view: a #WebKitWebView
@@ -3833,6 +3687,7 @@ void webkit_web_view_get_background_color(WebKitWebView* webView, GdkRGBA* rgba)
 
     *rgba = getPage(webView).backgroundColor();
 }
+#endif // PLATFORM(GTK)
 
 /*
  * webkit_web_view_is_editable:
index 7497661..53ba954 100644 (file)
@@ -29,6 +29,7 @@
 #include "APIPageConfiguration.h"
 #include "InstallMissingMediaPluginsPermissionRequest.h"
 #include "WebContextMenuItemData.h"
+#include "WebEvent.h"
 #include "WebHitTestResultData.h"
 #include "WebImage.h"
 #include "WebKitWebView.h"
@@ -51,7 +52,7 @@ CString webkitWebViewRunJavaScriptPrompt(WebKitWebView*, const CString& message,
 bool webkitWebViewRunJavaScriptBeforeUnloadConfirm(WebKitWebView*, const CString& message);
 void webkitWebViewMakePermissionRequest(WebKitWebView*, WebKitPermissionRequest*);
 void webkitWebViewMakePolicyDecision(WebKitWebView*, WebKitPolicyDecisionType, WebKitPolicyDecision*);
-void webkitWebViewMouseTargetChanged(WebKitWebView*, const WebKit::WebHitTestResultData&, unsigned modifiers);
+void webkitWebViewMouseTargetChanged(WebKitWebView*, const WebKit::WebHitTestResultData&, WebKit::WebEvent::Modifiers);
 void webkitWebViewHandleDownloadRequest(WebKitWebView*, WebKit::DownloadProxy*);
 void webkitWebViewPrintFrame(WebKitWebView*, WebKit::WebFrameProxy*);
 void webkitWebViewResourceLoadStarted(WebKitWebView*, WebKit::WebFrameProxy*, uint64_t resourceIdentifier, WebKitURIRequest*);
@@ -66,10 +67,17 @@ void webkitWebViewSubmitFormRequest(WebKitWebView*, WebKitFormSubmissionRequest*
 void webkitWebViewHandleAuthenticationChallenge(WebKitWebView*, WebKit::AuthenticationChallengeProxy*);
 void webkitWebViewInsecureContentDetected(WebKitWebView*, WebKitInsecureContentEvent);
 bool webkitWebViewEmitShowNotification(WebKitWebView*, WebKitNotification*);
-bool webkitWebViewEmitRunColorChooser(WebKitWebView*, WebKitColorChooserRequest*);
 void webkitWebViewWebProcessCrashed(WebKitWebView*);
 void webkitWebViewIsPlayingAudioChanged(WebKitWebView*);
 void webkitWebViewSelectionDidChange(WebKitWebView*);
 void webkitWebViewRequestInstallMissingMediaPlugins(WebKitWebView*, WebKit::InstallMissingMediaPluginsPermissionRequest&);
 WebKitWebsiteDataManager* webkitWebViewGetWebsiteDataManager(WebKitWebView*);
+
+#if PLATFORM(GTK)
+bool webkitWebViewEmitRunColorChooser(WebKitWebView*, WebKitColorChooserRequest*);
 bool webkitWebViewShowOptionMenu(WebKitWebView*, const WebCore::IntRect&, WebKitOptionMenu*, const GdkEvent*);
+#endif
+
+gboolean webkitWebViewAuthenticate(WebKitWebView*, WebKitAuthenticationRequest*);
+gboolean webkitWebViewScriptDialog(WebKitWebView*, WebKitScriptDialog*);
+gboolean webkitWebViewRunFileChooser(WebKitWebView*, WebKitFileChooserRequest*);
index a22184f..8f1e261 100644 (file)
@@ -96,7 +96,9 @@ using namespace WebCore;
 enum {
     PROP_0,
 
+#if PLATFORM(GTK)
     PROP_GEOMETRY,
+#endif
     PROP_TOOLBAR_VISIBLE,
     PROP_STATUSBAR_VISIBLE,
     PROP_SCROLLBARS_VISIBLE,
@@ -107,7 +109,9 @@ enum {
 };
 
 struct _WebKitWindowPropertiesPrivate {
+#if PLATFORM(GTK)
     GdkRectangle geometry;
+#endif
 
     bool toolbarVisible : 1;
     bool statusbarVisible : 1;
@@ -126,9 +130,11 @@ static void webkitWindowPropertiesGetProperty(GObject* object, guint propId, GVa
     WebKitWindowProperties* windowProperties = WEBKIT_WINDOW_PROPERTIES(object);
 
     switch (propId) {
+#if PLATFORM(GTK)
     case PROP_GEOMETRY:
         g_value_set_boxed(value, &windowProperties->priv->geometry);
         break;
+#endif
     case PROP_TOOLBAR_VISIBLE:
         g_value_set_boolean(value, webkit_window_properties_get_toolbar_visible(windowProperties));
         break;
@@ -160,10 +166,12 @@ static void webkitWindowPropertiesSetProperty(GObject* object, guint propId, con
     WebKitWindowProperties* windowProperties = WEBKIT_WINDOW_PROPERTIES(object);
 
     switch (propId) {
+#if PLATFORM(GTK)
     case PROP_GEOMETRY:
         if (GdkRectangle* geometry = static_cast<GdkRectangle*>(g_value_get_boxed(value)))
             windowProperties->priv->geometry = *geometry;
         break;
+#endif
     case PROP_TOOLBAR_VISIBLE:
         windowProperties->priv->toolbarVisible = g_value_get_boolean(value);
         break;
@@ -198,6 +206,7 @@ static void webkit_window_properties_class_init(WebKitWindowPropertiesClass* req
 
     GParamFlags paramFlags = static_cast<GParamFlags>(WEBKIT_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY);
 
+#if PLATFORM(GTK)
     /**
      * WebKitWebWindowProperties:geometry:
      *
@@ -210,6 +219,7 @@ static void webkit_window_properties_class_init(WebKitWindowPropertiesClass* req
                                                        _("The size and position of the window on the screen."),
                                                        GDK_TYPE_RECTANGLE,
                                                        paramFlags));
+#endif
 
     /**
      * WebKitWebWindowProperties:toolbar-visible:
@@ -307,6 +317,7 @@ WebKitWindowProperties* webkitWindowPropertiesCreate()
     return WEBKIT_WINDOW_PROPERTIES(g_object_new(WEBKIT_TYPE_WINDOW_PROPERTIES, NULL));
 }
 
+#if PLATFORM(GTK)
 void webkitWindowPropertiesSetGeometry(WebKitWindowProperties* windowProperties, GdkRectangle* geometry)
 {
     if (windowProperties->priv->geometry.x == geometry->x
@@ -317,6 +328,7 @@ void webkitWindowPropertiesSetGeometry(WebKitWindowProperties* windowProperties,
     windowProperties->priv->geometry = *geometry;
     g_object_notify(G_OBJECT(windowProperties), "geometry");
 }
+#endif
 
 void webkitWindowPropertiesSetToolbarVisible(WebKitWindowProperties* windowProperties, bool toolbarsVisible)
 {
@@ -376,6 +388,7 @@ void webkitWindowPropertiesSetFullscreen(WebKitWindowProperties* windowPropertie
 
 void webkitWindowPropertiesUpdateFromWebWindowFeatures(WebKitWindowProperties* windowProperties, const WindowFeatures& windowFeatures)
 {
+#if PLATFORM(GTK)
     GdkRectangle geometry = windowProperties->priv->geometry;
     if (windowFeatures.x)
         geometry.x = *windowFeatures.x;
@@ -386,6 +399,7 @@ void webkitWindowPropertiesUpdateFromWebWindowFeatures(WebKitWindowProperties* w
     if (windowFeatures.height)
         geometry.height = *windowFeatures.height;
     webkitWindowPropertiesSetGeometry(windowProperties, &geometry);
+#endif
 
     webkitWindowPropertiesSetMenubarVisible(windowProperties, windowFeatures.menuBarVisible);
     webkitWindowPropertiesSetStatusbarVisible(windowProperties, windowFeatures.statusBarVisible);
@@ -396,6 +410,7 @@ void webkitWindowPropertiesUpdateFromWebWindowFeatures(WebKitWindowProperties* w
     webkitWindowPropertiesSetFullscreen(windowProperties, windowFeatures.fullscreen);
 }
 
+#if PLATFORM(GTK)
 /**
  * webkit_window_properties_get_geometry:
  * @window_properties: a #WebKitWindowProperties
@@ -410,6 +425,7 @@ void webkit_window_properties_get_geometry(WebKitWindowProperties* windowPropert
 
     *geometry = windowProperties->priv->geometry;
 }
+#endif
 
 /**
  * webkit_window_properties_get_toolbar_visible:
index bbc80f8..3035a02 100644 (file)
@@ -31,7 +31,9 @@
 
 WebKitWindowProperties* webkitWindowPropertiesCreate();
 void webkitWindowPropertiesUpdateFromWebWindowFeatures(WebKitWindowProperties*, const WebCore::WindowFeatures&);
+#if PLATFORM(GTK)
 void webkitWindowPropertiesSetGeometry(WebKitWindowProperties*, GdkRectangle*);
+#endif
 void webkitWindowPropertiesSetToolbarVisible(WebKitWindowProperties*, bool toolbarsVisible);
 void webkitWindowPropertiesSetMenubarVisible(WebKitWindowProperties*, bool menuBarVisible);
 void webkitWindowPropertiesSetStatusbarVisible(WebKitWindowProperties*, bool statusBarVisible);
diff --git a/Source/WebKit2/UIProcess/API/gtk/WebKitWebViewGtk.cpp b/Source/WebKit2/UIProcess/API/gtk/WebKitWebViewGtk.cpp
new file mode 100644 (file)
index 0000000..dd06954
--- /dev/null
@@ -0,0 +1,256 @@
+/*
+ * Copyright (C) 2017 Igalia S.L.
+ *
+ * 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 "WebKitWebView.h"
+
+#include "WebKitAuthenticationDialog.h"
+#include "WebKitScriptDialogPrivate.h"
+#include "WebKitWebViewBasePrivate.h"
+#include "WebKitWebViewPrivate.h"
+#include <WebCore/GtkUtilities.h>
+#include <glib/gi18n-lib.h>
+#include <gtk/gtk.h>
+
+gboolean webkitWebViewAuthenticate(WebKitWebView* webView, WebKitAuthenticationRequest* request)
+{
+    CredentialStorageMode credentialStorageMode = webkit_authentication_request_can_save_credentials(request) ? AllowPersistentStorage : DisallowPersistentStorage;
+    webkitWebViewBaseAddAuthenticationDialog(WEBKIT_WEB_VIEW_BASE(webView), webkitAuthenticationDialogNew(request, credentialStorageMode));
+
+    return TRUE;
+}
+
+static GtkWidget* webkitWebViewCreateJavaScriptDialog(WebKitWebView* webView, GtkMessageType type, GtkButtonsType buttons, int defaultResponse, const char* primaryText, const char* secondaryText = nullptr)
+{
+    GtkWidget* parent = gtk_widget_get_toplevel(GTK_WIDGET(webView));
+    GtkWidget* dialog = gtk_message_dialog_new(WebCore::widgetIsOnscreenToplevelWindow(parent) ? GTK_WINDOW(parent) : nullptr,
+        GTK_DIALOG_DESTROY_WITH_PARENT, type, buttons, "%s", primaryText);
+    if (secondaryText)
+        gtk_message_dialog_format_secondary_text(GTK_MESSAGE_DIALOG(dialog), "%s", secondaryText);
+    GUniquePtr<char> title(g_strdup_printf("JavaScript - %s", webkitWebViewGetPage(webView).pageLoadState().url().utf8().data()));
+    gtk_window_set_title(GTK_WINDOW(dialog), title.get());
+    if (buttons != GTK_BUTTONS_NONE)
+        gtk_dialog_set_default_response(GTK_DIALOG(dialog), defaultResponse);
+
+    return dialog;
+}
+
+gboolean webkitWebViewScriptDialog(WebKitWebView* webView, WebKitScriptDialog* scriptDialog)
+{
+    GtkWidget* dialog = 0;
+
+    switch (scriptDialog->type) {
+    case WEBKIT_SCRIPT_DIALOG_ALERT:
+        dialog = webkitWebViewCreateJavaScriptDialog(webView, GTK_MESSAGE_WARNING, GTK_BUTTONS_CLOSE, GTK_RESPONSE_CLOSE, scriptDialog->message.data());
+        gtk_dialog_run(GTK_DIALOG(dialog));
+        break;
+    case WEBKIT_SCRIPT_DIALOG_CONFIRM:
+        dialog = webkitWebViewCreateJavaScriptDialog(webView, GTK_MESSAGE_QUESTION, GTK_BUTTONS_OK_CANCEL, GTK_RESPONSE_OK, scriptDialog->message.data());
+        scriptDialog->confirmed = gtk_dialog_run(GTK_DIALOG(dialog)) == GTK_RESPONSE_OK;
+        break;
+    case WEBKIT_SCRIPT_DIALOG_PROMPT: {
+        dialog = webkitWebViewCreateJavaScriptDialog(webView, GTK_MESSAGE_QUESTION, GTK_BUTTONS_OK_CANCEL, GTK_RESPONSE_OK, scriptDialog->message.data());
+        GtkWidget* entry = gtk_entry_new();
+        gtk_entry_set_text(GTK_ENTRY(entry), scriptDialog->defaultText.data());
+        gtk_container_add(GTK_CONTAINER(gtk_dialog_get_content_area(GTK_DIALOG(dialog))), entry);
+        gtk_entry_set_activates_default(GTK_ENTRY(entry), TRUE);
+        gtk_widget_show(entry);
+        if (gtk_dialog_run(GTK_DIALOG(dialog)) == GTK_RESPONSE_OK)
+            scriptDialog->text = gtk_entry_get_text(GTK_ENTRY(entry));
+        break;
+    }
+    case WEBKIT_SCRIPT_DIALOG_BEFORE_UNLOAD_CONFIRM:
+        dialog = webkitWebViewCreateJavaScriptDialog(webView, GTK_MESSAGE_QUESTION, GTK_BUTTONS_NONE, GTK_RESPONSE_OK,
+            _("Are you sure you want to leave this page?"), scriptDialog->message.data());
+        gtk_dialog_add_buttons(GTK_DIALOG(dialog), _("Stay on Page"), GTK_RESPONSE_CLOSE, _("Leave Page"), GTK_RESPONSE_OK, nullptr);
+        gtk_dialog_set_default_response(GTK_DIALOG(dialog), GTK_RESPONSE_OK);
+        scriptDialog->confirmed = gtk_dialog_run(GTK_DIALOG(dialog)) == GTK_RESPONSE_OK;
+        break;
+    }
+
+    gtk_widget_destroy(dialog);
+
+    return TRUE;
+}
+
+static void fileChooserDialogResponseCallback(GtkFileChooser* dialog, gint responseID, WebKitFileChooserRequest* request)
+{
+    GRefPtr<WebKitFileChooserRequest> adoptedRequest = adoptGRef(request);
+    if (responseID == GTK_RESPONSE_ACCEPT) {
+        GUniquePtr<GSList> filesList(gtk_file_chooser_get_filenames(dialog));
+        GRefPtr<GPtrArray> filesArray = adoptGRef(g_ptr_array_new());
+        for (GSList* file = filesList.get(); file; file = g_slist_next(file))
+            g_ptr_array_add(filesArray.get(), file->data);
+        g_ptr_array_add(filesArray.get(), 0);
+        webkit_file_chooser_request_select_files(adoptedRequest.get(), reinterpret_cast<const gchar* const*>(filesArray->pdata));
+    } else
+        webkit_file_chooser_request_cancel(adoptedRequest.get());
+
+#if GTK_CHECK_VERSION(3, 20, 0)
+    g_object_unref(dialog);
+#else
+    gtk_widget_destroy(GTK_WIDGET(dialog));
+#endif
+}
+
+gboolean webkitWebViewRunFileChooser(WebKitWebView* webView, WebKitFileChooserRequest* request)
+{
+    GtkWidget* toplevel = gtk_widget_get_toplevel(GTK_WIDGET(webView));
+    if (!WebCore::widgetIsOnscreenToplevelWindow(toplevel))
+        toplevel = 0;
+
+    gboolean allowsMultipleSelection = webkit_file_chooser_request_get_select_multiple(request);
+
+#if GTK_CHECK_VERSION(3, 20, 0)
+    GtkFileChooserNative* dialog = gtk_file_chooser_native_new(allowsMultipleSelection ? _("Select Files") : _("Select File"),
+        toplevel ? GTK_WINDOW(toplevel) : nullptr, GTK_FILE_CHOOSER_ACTION_OPEN, nullptr, nullptr);
+    if (toplevel)
+        gtk_native_dialog_set_modal(GTK_NATIVE_DIALOG(dialog), TRUE);
+#else
+    GtkWidget* dialog = gtk_file_chooser_dialog_new(allowsMultipleSelection ? _("Select Files") : _("Select File"),
+        toplevel ? GTK_WINDOW(toplevel) : nullptr,
+        GTK_FILE_CHOOSER_ACTION_OPEN,
+        GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
+        GTK_STOCK_OPEN, GTK_RESPONSE_ACCEPT,
+        nullptr);
+    if (toplevel)
+        gtk_window_set_modal(GTK_WINDOW(dialog), TRUE);
+#endif
+
+    if (GtkFileFilter* filter = webkit_file_chooser_request_get_mime_types_filter(request))
+        gtk_file_chooser_set_filter(GTK_FILE_CHOOSER(dialog), filter);
+    gtk_file_chooser_set_select_multiple(GTK_FILE_CHOOSER(dialog), allowsMultipleSelection);
+
+    if (const gchar* const* selectedFiles = webkit_file_chooser_request_get_selected_files(request))
+        gtk_file_chooser_select_filename(GTK_FILE_CHOOSER(dialog), selectedFiles[0]);
+
+    g_signal_connect(dialog, "response", G_CALLBACK(fileChooserDialogResponseCallback), g_object_ref(request));
+
+#if GTK_CHECK_VERSION(3, 20, 0)
+    gtk_native_dialog_show(GTK_NATIVE_DIALOG(dialog));
+#else
+    gtk_widget_show(dialog);
+#endif
+
+    return TRUE;
+}
+
+/**
+ * webkit_web_view_new:
+ *
+ * Creates a new #WebKitWebView with the default #WebKitWebContext and
+ * no #WebKitUserContentManager associated with it.
+ * See also webkit_web_view_new_with_context(),
+ * webkit_web_view_new_with_user_content_manager(), and
+ * webkit_web_view_new_with_settings().
+ *
+ * Returns: The newly created #WebKitWebView widget
+ */
+GtkWidget* webkit_web_view_new()
+{
+    return webkit_web_view_new_with_context(webkit_web_context_get_default());
+}
+
+/**
+ * webkit_web_view_new_with_context:
+ * @context: the #WebKitWebContext to be used by the #WebKitWebView
+ *
+ * Creates a new #WebKitWebView with the given #WebKitWebContext and
+ * no #WebKitUserContentManager associated with it.
+ * See also webkit_web_view_new_with_user_content_manager() and
+ * webkit_web_view_new_with_settings().
+ *
+ * Returns: The newly created #WebKitWebView widget
+ */
+GtkWidget* webkit_web_view_new_with_context(WebKitWebContext* context)
+{
+    g_return_val_if_fail(WEBKIT_IS_WEB_CONTEXT(context), 0);
+
+    return GTK_WIDGET(g_object_new(WEBKIT_TYPE_WEB_VIEW,
+        "is-ephemeral", webkit_web_context_is_ephemeral(context),
+        "web-context", context,
+        nullptr));
+}
+
+/**
+ * webkit_web_view_new_with_related_view:
+ * @web_view: the related #WebKitWebView
+ *
+ * Creates a new #WebKitWebView sharing the same web process with @web_view.
+ * This method doesn't have any effect when %WEBKIT_PROCESS_MODEL_SHARED_SECONDARY_PROCESS
+ * process model is used, because a single web process is shared for all the web views in the
+ * same #WebKitWebContext. When using %WEBKIT_PROCESS_MODEL_MULTIPLE_SECONDARY_PROCESSES process model,
+ * this method should always be used when creating the #WebKitWebView in the #WebKitWebView::create signal.
+ * You can also use this method to implement other process models based on %WEBKIT_PROCESS_MODEL_MULTIPLE_SECONDARY_PROCESSES,
+ * like for example, sharing the same web process for all the views in the same security domain.
+ *
+ * The newly created #WebKitWebView will also have the same #WebKitUserContentManager
+ * and #WebKitSettings as @web_view.
+ *
+ * Returns: (transfer full): The newly created #WebKitWebView widget
+ *
+ * Since: 2.4
+ */
+GtkWidget* webkit_web_view_new_with_related_view(WebKitWebView* webView)
+{
+    g_return_val_if_fail(WEBKIT_IS_WEB_VIEW(webView), nullptr);
+
+    return GTK_WIDGET(g_object_new(WEBKIT_TYPE_WEB_VIEW,
+        "user-content-manager", webkit_web_view_get_user_content_manager(webView),
+        "settings", webkit_web_view_get_settings(webView),
+        "related-view", webView,
+        nullptr));
+}
+
+/**
+ * webkit_web_view_new_with_settings:
+ * @settings: a #WebKitSettings
+ *
+ * Creates a new #WebKitWebView with the given #WebKitSettings.
+ * See also webkit_web_view_new_with_context(), and
+ * webkit_web_view_new_with_user_content_manager().
+ *
+ * Returns: The newly created #WebKitWebView widget
+ *
+ * Since: 2.6
+ */
+GtkWidget* webkit_web_view_new_with_settings(WebKitSettings* settings)
+{
+    g_return_val_if_fail(WEBKIT_IS_SETTINGS(settings), nullptr);
+    return GTK_WIDGET(g_object_new(WEBKIT_TYPE_WEB_VIEW, "settings", settings, nullptr));
+}
+
+/**
+ * webkit_web_view_new_with_user_content_manager:
+ * @user_content_manager: a #WebKitUserContentManager.
+ *
+ * Creates a new #WebKitWebView with the given #WebKitUserContentManager.
+ * The content loaded in the view may be affected by the content injected
+ * in the view by the user content manager.
+ *
+ * Returns: The newly created #WebKitWebView widget
+ *
+ * Since: 2.6
+ */
+GtkWidget* webkit_web_view_new_with_user_content_manager(WebKitUserContentManager* userContentManager)
+{
+    g_return_val_if_fail(WEBKIT_IS_USER_CONTENT_MANAGER(userContentManager), nullptr);
+
+    return GTK_WIDGET(g_object_new(WEBKIT_TYPE_WEB_VIEW, "user-content-manager", userContentManager, nullptr));
+}
index 2b3c9d8..19f20f5 100644 (file)
@@ -49,6 +49,7 @@ public:
     {
         return new View(backend, configuration);
     }
+    virtual ~View();
 
     // Client methods
     void initializeClient(const WKViewClientBase*);
@@ -65,7 +66,6 @@ public:
 
 private:
     View(struct wpe_view_backend*, const API::PageConfiguration&);
-    virtual ~View();
 
     void setSize(const WebCore::IntSize&);
 
diff --git a/Source/WebKit2/UIProcess/API/wpe/WebKitAuthenticationRequest.h b/Source/WebKit2/UIProcess/API/wpe/WebKitAuthenticationRequest.h
new file mode 100644 (file)
index 0000000..98ea6fc
--- /dev/null
@@ -0,0 +1,124 @@
+/*
+ * Copyright (C) 2013 Samsung Electronics 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.
+ */
+
+#if !defined(__WEBKIT_H_INSIDE__) && !defined(WEBKIT2_COMPILATION)
+#error "Only <wpe/webkit.h> can be included directly."
+#endif
+
+#ifndef WebKitAuthenticationRequest_h
+#define WebKitAuthenticationRequest_h
+
+#include <wpe/WebKitCredential.h>
+#include <wpe/WebKitDefines.h>
+
+G_BEGIN_DECLS
+
+#define WEBKIT_TYPE_AUTHENTICATION_REQUEST            (webkit_authentication_request_get_type())
+#define WEBKIT_AUTHENTICATION_REQUEST(obj)            (G_TYPE_CHECK_INSTANCE_CAST((obj), WEBKIT_TYPE_AUTHENTICATION_REQUEST, WebKitAuthenticationRequest))
+#define WEBKIT_AUTHENTICATION_REQUEST_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST((klass),  WEBKIT_TYPE_AUTHENTICATION_REQUEST, WebKitAuthenticationRequestClass))
+#define WEBKIT_IS_AUTHENTICATION_REQUEST(obj)         (G_TYPE_CHECK_INSTANCE_TYPE((obj), WEBKIT_TYPE_AUTHENTICATION_REQUEST))
+#define WEBKIT_IS_AUTHENTICATION_REQUEST_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass),  WEBKIT_TYPE_AUTHENTICATION_REQUEST))
+#define WEBKIT_AUTHENTICATION_REQUEST_GET_CLASS(obj)  (G_TYPE_INSTANCE_GET_CLASS((obj),  WEBKIT_TYPE_AUTHENTICATION_REQUEST, WebKitAuthenticationRequestClass))
+
+typedef struct _WebKitAuthenticationRequest        WebKitAuthenticationRequest;
+typedef struct _WebKitAuthenticationRequestClass   WebKitAuthenticationRequestClass;
+typedef struct _WebKitAuthenticationRequestPrivate WebKitAuthenticationRequestPrivate;
+
+struct _WebKitAuthenticationRequest {
+    GObject parent;
+
+    /*< private >*/
+    WebKitAuthenticationRequestPrivate *priv;
+};
+
+struct _WebKitAuthenticationRequestClass {
+    GObjectClass parent_class;
+
+    void (*_webkit_reserved0) (void);
+    void (*_webkit_reserved1) (void);
+    void (*_webkit_reserved2) (void);
+    void (*_webkit_reserved3) (void);
+};
+
+/**
+ * WebKitAuthenticationScheme:
+ * @WEBKIT_AUTHENTICATION_SCHEME_DEFAULT: The default authentication scheme of WebKit.
+ * @WEBKIT_AUTHENTICATION_SCHEME_HTTP_BASIC: Basic authentication scheme as defined in RFC 2617.
+ * @WEBKIT_AUTHENTICATION_SCHEME_HTTP_DIGEST: Digest authentication scheme as defined in RFC 2617.
+ * @WEBKIT_AUTHENTICATION_SCHEME_HTML_FORM: HTML Form authentication.
+ * @WEBKIT_AUTHENTICATION_SCHEME_NTLM: NTLM Microsoft proprietary authentication scheme.
+ * @WEBKIT_AUTHENTICATION_SCHEME_NEGOTIATE: Negotiate (or SPNEGO) authentication scheme as defined in RFC 4559.
+ * @WEBKIT_AUTHENTICATION_SCHEME_CLIENT_CERTIFICATE_REQUESTED: Client Certificate Authentication (see RFC 2246).
+ * @WEBKIT_AUTHENTICATION_SCHEME_SERVER_TRUST_EVALUATION_REQUESTED: Server Trust Authentication.
+ * @WEBKIT_AUTHENTICATION_SCHEME_UNKNOWN: Authentication scheme unknown.
+ *
+ * Enum values representing the authentication scheme.
+ *
+ * Since: 2.2
+ */
+typedef enum {
+    WEBKIT_AUTHENTICATION_SCHEME_DEFAULT = 1,
+    WEBKIT_AUTHENTICATION_SCHEME_HTTP_BASIC = 2,
+    WEBKIT_AUTHENTICATION_SCHEME_HTTP_DIGEST = 3,
+    WEBKIT_AUTHENTICATION_SCHEME_HTML_FORM = 4,
+    WEBKIT_AUTHENTICATION_SCHEME_NTLM = 5,
+    WEBKIT_AUTHENTICATION_SCHEME_NEGOTIATE = 6,
+    WEBKIT_AUTHENTICATION_SCHEME_CLIENT_CERTIFICATE_REQUESTED = 7,
+    WEBKIT_AUTHENTICATION_SCHEME_SERVER_TRUST_EVALUATION_REQUESTED = 8,
+    WEBKIT_AUTHENTICATION_SCHEME_UNKNOWN = 100,
+} WebKitAuthenticationScheme;
+
+
+WEBKIT_API GType
+webkit_authentication_request_get_type                (void);
+
+WEBKIT_API gboolean
+webkit_authentication_request_can_save_credentials    (WebKitAuthenticationRequest *request);
+
+WEBKIT_API WebKitCredential *
+webkit_authentication_request_get_proposed_credential (WebKitAuthenticationRequest *request);
+
+WEBKIT_API const gchar *
+webkit_authentication_request_get_host                (WebKitAuthenticationRequest *request);
+
+WEBKIT_API guint
+webkit_authentication_request_get_port                (WebKitAuthenticationRequest *request);
+
+WEBKIT_API const gchar *
+webkit_authentication_request_get_realm               (WebKitAuthenticationRequest *request);
+
+WEBKIT_API WebKitAuthenticationScheme
+webkit_authentication_request_get_scheme              (WebKitAuthenticationRequest *request);
+
+WEBKIT_API gboolean
+webkit_authentication_request_is_for_proxy            (WebKitAuthenticationRequest *request);
+
+WEBKIT_API gboolean
+webkit_authentication_request_is_retry                (WebKitAuthenticationRequest *request);
+
+WEBKIT_API void
+webkit_authentication_request_authenticate            (WebKitAuthenticationRequest *request,
+                                                       WebKitCredential            *credential);
+
+WEBKIT_API void
+webkit_authentication_request_cancel                  (WebKitAuthenticationRequest *request);
+
+G_END_DECLS
+
+#endif
diff --git a/Source/WebKit2/UIProcess/API/wpe/WebKitAutomationSession.h b/Source/WebKit2/UIProcess/API/wpe/WebKitAutomationSession.h
new file mode 100644 (file)
index 0000000..9e62cdf
--- /dev/null
@@ -0,0 +1,66 @@
+/*
+ * Copyright (C) 2017 Igalia S.L.
+ *
+ * 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.
+ */
+
+#if !defined(__WEBKIT_H_INSIDE__) && !defined(WEBKIT2_COMPILATION)
+#error "Only <wpe/webkit.h> can be included directly."
+#endif
+
+#ifndef WebKitAutomationSession_h
+#define WebKitAutomationSession_h
+
+#include <glib-object.h>
+#include <wpe/WebKitDefines.h>
+
+G_BEGIN_DECLS
+
+#define WEBKIT_TYPE_AUTOMATION_SESSION            (webkit_automation_session_get_type())
+#define WEBKIT_AUTOMATION_SESSION(obj)            (G_TYPE_CHECK_INSTANCE_CAST((obj), WEBKIT_TYPE_AUTOMATION_SESSION, WebKitAutomationSession))
+#define WEBKIT_IS_AUTOMATION_SESSION(obj)         (G_TYPE_CHECK_INSTANCE_TYPE((obj), WEBKIT_TYPE_AUTOMATION_SESSION))
+#define WEBKIT_AUTOMATION_SESSION_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST((klass),  WEBKIT_TYPE_AUTOMATION_SESSION, WebKitAutomationSessionClass))
+#define WEBKIT_IS_AUTOMATION_SESSION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass),  WEBKIT_TYPE_AUTOMATION_SESSION))
+#define WEBKIT_AUTOMATION_SESSION_GET_CLASS(obj)  (G_TYPE_INSTANCE_GET_CLASS((obj),  WEBKIT_TYPE_AUTOMATION_SESSION, WebKitAutomationSessionClass))
+
+typedef struct _WebKitAutomationSession        WebKitAutomationSession;
+typedef struct _WebKitAutomationSessionClass   WebKitAutomationSessionClass;
+typedef struct _WebKitAutomationSessionPrivate WebKitAutomationSessionPrivate;
+
+struct _WebKitAutomationSession {
+    GObject parent;
+
+    WebKitAutomationSessionPrivate *priv;
+};
+
+struct _WebKitAutomationSessionClass {
+    GObjectClass parent_class;
+
+    void (*_webkit_reserved0) (void);
+    void (*_webkit_reserved1) (void);
+    void (*_webkit_reserved2) (void);
+    void (*_webkit_reserved3) (void);
+};
+
+WEBKIT_API GType
+webkit_automation_session_get_type (void);
+
+WEBKIT_API const char *
+webkit_automation_session_get_id   (WebKitAutomationSession *session);
+
+G_END_DECLS
+
+#endif /* WebKitAutomationSession_h */
diff --git a/Source/WebKit2/UIProcess/API/wpe/WebKitBackForwardList.h b/Source/WebKit2/UIProcess/API/wpe/WebKitBackForwardList.h
new file mode 100644 (file)
index 0000000..cb39e8c
--- /dev/null
@@ -0,0 +1,93 @@
+/*
+ * Copyright (C) 2011 Igalia S.L.
+ *
+ * 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.
+ */
+
+#if !defined(__WEBKIT_H_INSIDE__) && !defined(WEBKIT2_COMPILATION)
+#error "Only <wpe/webkit.h> can be included directly."
+#endif
+
+#ifndef WebKitBackForwardList_h
+#define WebKitBackForwardList_h
+
+#include <glib-object.h>
+#include <wpe/WebKitBackForwardListItem.h>
+#include <wpe/WebKitDefines.h>
+
+G_BEGIN_DECLS
+
+#define WEBKIT_TYPE_BACK_FORWARD_LIST            (webkit_back_forward_list_get_type())
+#define WEBKIT_BACK_FORWARD_LIST(obj)            (G_TYPE_CHECK_INSTANCE_CAST((obj), WEBKIT_TYPE_BACK_FORWARD_LIST, WebKitBackForwardList))
+#define WEBKIT_BACK_FORWARD_LIST_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST((klass),  WEBKIT_TYPE_BACK_FORWARD_LIST, WebKitBackForwardListClass))
+#define WEBKIT_IS_BACK_FORWARD_LIST(obj)         (G_TYPE_CHECK_INSTANCE_TYPE((obj), WEBKIT_TYPE_BACK_FORWARD_LIST))
+#define WEBKIT_IS_BACK_FORWARD_LIST_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass),  WEBKIT_TYPE_BACK_FORWARD_LIST))
+#define WEBKIT_BACK_FORWARD_LIST_GET_CLASS(obj)  (G_TYPE_INSTANCE_GET_CLASS((obj),  WEBKIT_TYPE_BACK_FORWARD_LIST, WebKitBackForwardListClass))
+
+typedef struct _WebKitBackForwardList        WebKitBackForwardList;
+typedef struct _WebKitBackForwardListClass   WebKitBackForwardListClass;
+typedef struct _WebKitBackForwardListPrivate WebKitBackForwardListPrivate;
+
+struct _WebKitBackForwardList {
+    GObject parent;
+
+    WebKitBackForwardListPrivate *priv;
+};
+
+struct _WebKitBackForwardListClass {
+    GObjectClass parent_class;
+
+    void (*_webkit_reserved0) (void);
+    void (*_webkit_reserved1) (void);
+    void (*_webkit_reserved2) (void);
+    void (*_webkit_reserved3) (void);
+};
+
+WEBKIT_API GType
+webkit_back_forward_list_get_type                    (void);
+
+WEBKIT_API WebKitBackForwardListItem *
+webkit_back_forward_list_get_current_item            (WebKitBackForwardList *back_forward_list);
+
+WEBKIT_API WebKitBackForwardListItem *
+webkit_back_forward_list_get_back_item               (WebKitBackForwardList *back_forward_list);
+
+WEBKIT_API WebKitBackForwardListItem *
+webkit_back_forward_list_get_forward_item            (WebKitBackForwardList *back_forward_list);
+
+WEBKIT_API WebKitBackForwardListItem *
+webkit_back_forward_list_get_nth_item                (WebKitBackForwardList *back_forward_list,
+                                                      gint                   index);
+WEBKIT_API guint
+webkit_back_forward_list_get_length                  (WebKitBackForwardList *back_forward_list);
+
+WEBKIT_API GList *
+webkit_back_forward_list_get_back_list               (WebKitBackForwardList *back_forward_list);
+
+WEBKIT_API GList *
+webkit_back_forward_list_get_back_list_with_limit    (WebKitBackForwardList *back_forward_list,
+                                                      guint                  limit);
+
+WEBKIT_API GList *
+webkit_back_forward_list_get_forward_list            (WebKitBackForwardList *back_forward_list);
+
+WEBKIT_API GList *
+webkit_back_forward_list_get_forward_list_with_limit (WebKitBackForwardList *back_forward_list,
+                                                      guint                  limit);
+
+G_END_DECLS
+
+#endif
diff --git a/Source/WebKit2/UIProcess/API/wpe/WebKitBackForwardListItem.h b/Source/WebKit2/UIProcess/API/wpe/WebKitBackForwardListItem.h
new file mode 100644 (file)
index 0000000..c971ec0
--- /dev/null
@@ -0,0 +1,72 @@
+/*
+ * Copyright (C) 2011 Igalia S.L.
+ *
+ * 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.
+ */
+
+#if !defined(__WEBKIT_H_INSIDE__) && !defined(WEBKIT2_COMPILATION)
+#error "Only <wpe/webkit.h> can be included directly."
+#endif
+
+#ifndef WebKitBackForwardListItem_h
+#define WebKitBackForwardListItem_h
+
+#include <glib-object.h>
+#include <wpe/WebKitDefines.h>
+
+G_BEGIN_DECLS
+
+#define WEBKIT_TYPE_BACK_FORWARD_LIST_ITEM            (webkit_back_forward_list_item_get_type())
+#define WEBKIT_BACK_FORWARD_LIST_ITEM(obj)            (G_TYPE_CHECK_INSTANCE_CAST((obj), WEBKIT_TYPE_BACK_FORWARD_LIST_ITEM, WebKitBackForwardListItem))
+#define WEBKIT_BACK_FORWARD_LIST_ITEM_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST((klass),  WEBKIT_TYPE_BACK_FORWARD_LIST_ITEM, WebKitBackForwardListItemClass))
+#define WEBKIT_IS_BACK_FORWARD_LIST_ITEM(obj)         (G_TYPE_CHECK_INSTANCE_TYPE((obj), WEBKIT_TYPE_BACK_FORWARD_LIST_ITEM))
+#define WEBKIT_IS_BACK_FORWARD_LIST_ITEM_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass),  WEBKIT_TYPE_BACK_FORWARD_LIST_ITEM))
+#define WEBKIT_BACK_FORWARD_LIST_ITEM_GET_CLASS(obj)  (G_TYPE_INSTANCE_GET_CLASS((obj),  WEBKIT_TYPE_BACK_FORWARD_LIST_ITEM, WebKitBackForwardListItemClass))
+
+typedef struct _WebKitBackForwardListItem        WebKitBackForwardListItem;
+typedef struct _WebKitBackForwardListItemClass   WebKitBackForwardListItemClass;
+typedef struct _WebKitBackForwardListItemPrivate WebKitBackForwardListItemPrivate;
+
+struct _WebKitBackForwardListItem {
+    GInitiallyUnowned parent;
+
+    WebKitBackForwardListItemPrivate *priv;
+};
+
+struct _WebKitBackForwardListItemClass {
+    GInitiallyUnownedClass parent_class;
+
+    void (*_webkit_reserved0) (void);
+    void (*_webkit_reserved1) (void);
+    void (*_webkit_reserved2) (void);
+    void (*_webkit_reserved3) (void);
+};
+
+WEBKIT_API GType
+webkit_back_forward_list_item_get_type         (void);
+
+WEBKIT_API const gchar *
+webkit_back_forward_list_item_get_uri          (WebKitBackForwardListItem* list_item);
+
+WEBKIT_API const gchar *
+webkit_back_forward_list_item_get_title        (WebKitBackForwardListItem* list_item);
+
+WEBKIT_API const gchar *
+webkit_back_forward_list_item_get_original_uri (WebKitBackForwardListItem* list_item);
+
+G_END_DECLS
+
+#endif
diff --git a/Source/WebKit2/UIProcess/API/wpe/WebKitContextMenu.h b/Source/WebKit2/UIProcess/API/wpe/WebKitContextMenu.h
new file mode 100644 (file)
index 0000000..4145fb0
--- /dev/null
@@ -0,0 +1,118 @@
+/*
+ * Copyright (C) 2012 Igalia S.L.
+ *
+ * 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.
+ */
+
+#if !defined(__WEBKIT_H_INSIDE__) && !defined(WEBKIT2_COMPILATION) && !defined(__WEBKIT_WEB_EXTENSION_H_INSIDE__)
+#error "Only <wpe/webkit.h> can be included directly."
+#endif
+
+#ifndef WebKitContextMenu_h
+#define WebKitContextMenu_h
+
+#include <glib-object.h>
+#include <wpe/WebKitDefines.h>
+
+G_BEGIN_DECLS
+
+#define WEBKIT_TYPE_CONTEXT_MENU            (webkit_context_menu_get_type())
+#define WEBKIT_CONTEXT_MENU(obj)            (G_TYPE_CHECK_INSTANCE_CAST((obj), WEBKIT_TYPE_CONTEXT_MENU, WebKitContextMenu))
+#define WEBKIT_IS_CONTEXT_MENU(obj)         (G_TYPE_CHECK_INSTANCE_TYPE((obj), WEBKIT_TYPE_CONTEXT_MENU))
+#define WEBKIT_CONTEXT_MENU_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST((klass),  WEBKIT_TYPE_CONTEXT_MENU, WebKitContextMenuClass))
+#define WEBKIT_IS_CONTEXT_MENU_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass),  WEBKIT_TYPE_CONTEXT_MENU))
+#define WEBKIT_CONTEXT_MENU_GET_CLASS(obj)  (G_TYPE_INSTANCE_GET_CLASS((obj),  WEBKIT_TYPE_CONTEXT_MENU, WebKitContextMenuClass))
+
+typedef struct _WebKitContextMenu        WebKitContextMenu;
+typedef struct _WebKitContextMenuClass   WebKitContextMenuClass;
+typedef struct _WebKitContextMenuPrivate WebKitContextMenuPrivate;
+
+typedef struct _WebKitContextMenuItem WebKitContextMenuItem;
+
+struct _WebKitContextMenu {
+    GObject parent;
+
+    WebKitContextMenuPrivate *priv;
+};
+
+struct _WebKitContextMenuClass {
+    GObjectClass parent_class;
+
+    void (*_webkit_reserved0) (void);
+    void (*_webkit_reserved1) (void);
+    void (*_webkit_reserved2) (void);
+    void (*_webkit_reserved3) (void);
+};
+
+WEBKIT_API GType
+webkit_context_menu_get_type             (void);
+
+WEBKIT_API WebKitContextMenu *
+webkit_context_menu_new                  (void);
+
+WEBKIT_API WebKitContextMenu *
+webkit_context_menu_new_with_items       (GList                 *items);
+
+WEBKIT_API void
+webkit_context_menu_prepend              (WebKitContextMenu     *menu,
+                                          WebKitContextMenuItem *item);
+
+WEBKIT_API void
+webkit_context_menu_append               (WebKitContextMenu     *menu,
+                                          WebKitContextMenuItem *item);
+
+WEBKIT_API void
+webkit_context_menu_insert               (WebKitContextMenu     *menu,
+                                          WebKitContextMenuItem *item,
+                                          gint                   position);
+
+WEBKIT_API void
+webkit_context_menu_move_item            (WebKitContextMenu     *menu,
+                                          WebKitContextMenuItem *item,
+                                          gint                   position);
+WEBKIT_API GList *
+webkit_context_menu_get_items            (WebKitContextMenu     *menu);
+
+WEBKIT_API guint
+webkit_context_menu_get_n_items          (WebKitContextMenu     *menu);
+
+WEBKIT_API WebKitContextMenuItem *
+webkit_context_menu_first                (WebKitContextMenu     *menu);
+
+WEBKIT_API WebKitContextMenuItem *
+webkit_context_menu_last                 (WebKitContextMenu     *menu);
+
+WEBKIT_API WebKitContextMenuItem *
+webkit_context_menu_get_item_at_position (WebKitContextMenu     *menu,
+                                          guint                  position);
+
+WEBKIT_API void
+webkit_context_menu_remove               (WebKitContextMenu     *menu,
+                                          WebKitContextMenuItem *item);
+
+WEBKIT_API void
+webkit_context_menu_remove_all           (WebKitContextMenu     *menu);
+
+WEBKIT_API void
+webkit_context_menu_set_user_data        (WebKitContextMenu     *menu,
+                                          GVariant              *user_data);
+
+WEBKIT_API GVariant *
+webkit_context_menu_get_user_data        (WebKitContextMenu     *menu);
+
+G_END_DECLS
+
+#endif
diff --git a/Source/WebKit2/UIProcess/API/wpe/WebKitContextMenuActions.h b/Source/WebKit2/UIProcess/API/wpe/WebKitContextMenuActions.h
new file mode 100644 (file)
index 0000000..301c219
--- /dev/null
@@ -0,0 +1,124 @@
+/*
+ * Copyright (C) 2012 Igalia S.L.
+ *
+ * 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.
+ */
+
+#if !defined(__WEBKIT_H_INSIDE__) && !defined(WEBKIT2_COMPILATION) && !defined(__WEBKIT_WEB_EXTENSION_H_INSIDE__)
+#error "Only <wpe/webkit.h> can be included directly."
+#endif
+
+#include <glib.h>
+
+#ifndef WebKitContextMenuActions_h
+#define WebKitContextMenuActions_h
+
+G_BEGIN_DECLS
+
+/**
+ * WebKitContextMenuAction:
+ * @WEBKIT_CONTEXT_MENU_ACTION_NO_ACTION: No action, used by separator menu items.
+ * @WEBKIT_CONTEXT_MENU_ACTION_OPEN_LINK: Open current link.
+ * @WEBKIT_CONTEXT_MENU_ACTION_OPEN_LINK_IN_NEW_WINDOW: Open current link in a new window.
+ * @WEBKIT_CONTEXT_MENU_ACTION_DOWNLOAD_LINK_TO_DISK: Download link destination.
+ * @WEBKIT_CONTEXT_MENU_ACTION_COPY_LINK_TO_CLIPBOARD: Copy link location to the clipboard.
+ * @WEBKIT_CONTEXT_MENU_ACTION_OPEN_IMAGE_IN_NEW_WINDOW: Open current image in a new window.
+ * @WEBKIT_CONTEXT_MENU_ACTION_DOWNLOAD_IMAGE_TO_DISK: Download current image.
+ * @WEBKIT_CONTEXT_MENU_ACTION_COPY_IMAGE_TO_CLIPBOARD: Copy current image to the clipboard.
+ * @WEBKIT_CONTEXT_MENU_ACTION_OPEN_FRAME_IN_NEW_WINDOW: Open current frame in a new window.
+ * @WEBKIT_CONTEXT_MENU_ACTION_GO_BACK: Load the previous history item.
+ * @WEBKIT_CONTEXT_MENU_ACTION_GO_FORWARD: Load the next history item.
+ * @WEBKIT_CONTEXT_MENU_ACTION_STOP: Stop any ongoing loading operation.
+ * @WEBKIT_CONTEXT_MENU_ACTION_RELOAD: Reload the contents of current view.
+ * @WEBKIT_CONTEXT_MENU_ACTION_COPY: Copy current selection the clipboard.
+ * @WEBKIT_CONTEXT_MENU_ACTION_CUT: Cut current selection to the clipboard.
+ * @WEBKIT_CONTEXT_MENU_ACTION_PASTE: Paste clipboard contents.
+ * @WEBKIT_CONTEXT_MENU_ACTION_SPELLING_GUESS: A proposed replacement for a misspelled word.
+ * @WEBKIT_CONTEXT_MENU_ACTION_NO_GUESSES_FOUND: An indicator that spellchecking found no proposed replacements.
+ * @WEBKIT_CONTEXT_MENU_ACTION_IGNORE_SPELLING: Causes the spellchecker to ignore the word for this session.
+ * @WEBKIT_CONTEXT_MENU_ACTION_LEARN_SPELLING: Causes the spellchecker to add the word to the dictionary.
+ * @WEBKIT_CONTEXT_MENU_ACTION_IGNORE_GRAMMAR: Ignore grammar.
+ * @WEBKIT_CONTEXT_MENU_ACTION_FONT_MENU: Font options menu.
+ * @WEBKIT_CONTEXT_MENU_ACTION_BOLD: Bold.
+ * @WEBKIT_CONTEXT_MENU_ACTION_ITALIC: Italic.
+ * @WEBKIT_CONTEXT_MENU_ACTION_UNDERLINE: Underline.
+ * @WEBKIT_CONTEXT_MENU_ACTION_OUTLINE: Outline.
+ * @WEBKIT_CONTEXT_MENU_ACTION_INSPECT_ELEMENT: Open current element in the inspector.
+ * @WEBKIT_CONTEXT_MENU_ACTION_OPEN_VIDEO_IN_NEW_WINDOW: Open current video element in a new window.
+ * @WEBKIT_CONTEXT_MENU_ACTION_OPEN_AUDIO_IN_NEW_WINDOW: Open current audio element in a new window.
+ * @WEBKIT_CONTEXT_MENU_ACTION_COPY_VIDEO_LINK_TO_CLIPBOARD: Copy video link location in to the clipboard.
+ * @WEBKIT_CONTEXT_MENU_ACTION_COPY_AUDIO_LINK_TO_CLIPBOARD: Copy audio link location in to the clipboard.
+ * @WEBKIT_CONTEXT_MENU_ACTION_TOGGLE_MEDIA_CONTROLS: Enable or disable media controls.
+ * @WEBKIT_CONTEXT_MENU_ACTION_TOGGLE_MEDIA_LOOP: Enable or disable media loop.
+ * @WEBKIT_CONTEXT_MENU_ACTION_ENTER_VIDEO_FULLSCREEN: Show current video element in fullscreen mode.
+ * @WEBKIT_CONTEXT_MENU_ACTION_MEDIA_PLAY: Play current media element.
+ * @WEBKIT_CONTEXT_MENU_ACTION_MEDIA_PAUSE: Pause current media element.
+ * @WEBKIT_CONTEXT_MENU_ACTION_MEDIA_MUTE: Mute current media element.
+ * @WEBKIT_CONTEXT_MENU_ACTION_DOWNLOAD_VIDEO_TO_DISK: Download video to disk. Since 2.2
+ * @WEBKIT_CONTEXT_MENU_ACTION_DOWNLOAD_AUDIO_TO_DISK: Download audio to disk. Since 2.2
+ * @WEBKIT_CONTEXT_MENU_ACTION_CUSTOM: Custom action defined by applications.
+ *
+ * Enum values used to denote the stock actions for
+ * #WebKitContextMenuItem<!-- -->s
+ */
+typedef enum {
+    WEBKIT_CONTEXT_MENU_ACTION_NO_ACTION = 0,
+
+    WEBKIT_CONTEXT_MENU_ACTION_OPEN_LINK,
+    WEBKIT_CONTEXT_MENU_ACTION_OPEN_LINK_IN_NEW_WINDOW,
+    WEBKIT_CONTEXT_MENU_ACTION_DOWNLOAD_LINK_TO_DISK,
+    WEBKIT_CONTEXT_MENU_ACTION_COPY_LINK_TO_CLIPBOARD,
+    WEBKIT_CONTEXT_MENU_ACTION_OPEN_IMAGE_IN_NEW_WINDOW,
+    WEBKIT_CONTEXT_MENU_ACTION_DOWNLOAD_IMAGE_TO_DISK,
+    WEBKIT_CONTEXT_MENU_ACTION_COPY_IMAGE_TO_CLIPBOARD,
+    WEBKIT_CONTEXT_MENU_ACTION_OPEN_FRAME_IN_NEW_WINDOW,
+    WEBKIT_CONTEXT_MENU_ACTION_GO_BACK,
+    WEBKIT_CONTEXT_MENU_ACTION_GO_FORWARD,
+    WEBKIT_CONTEXT_MENU_ACTION_STOP,
+    WEBKIT_CONTEXT_MENU_ACTION_RELOAD,
+    WEBKIT_CONTEXT_MENU_ACTION_COPY,
+    WEBKIT_CONTEXT_MENU_ACTION_CUT,
+    WEBKIT_CONTEXT_MENU_ACTION_PASTE,
+    WEBKIT_CONTEXT_MENU_ACTION_SPELLING_GUESS,
+    WEBKIT_CONTEXT_MENU_ACTION_NO_GUESSES_FOUND,
+    WEBKIT_CONTEXT_MENU_ACTION_IGNORE_SPELLING,
+    WEBKIT_CONTEXT_MENU_ACTION_LEARN_SPELLING,
+    WEBKIT_CONTEXT_MENU_ACTION_IGNORE_GRAMMAR,
+    WEBKIT_CONTEXT_MENU_ACTION_FONT_MENU,
+    WEBKIT_CONTEXT_MENU_ACTION_BOLD,
+    WEBKIT_CONTEXT_MENU_ACTION_ITALIC,
+    WEBKIT_CONTEXT_MENU_ACTION_UNDERLINE,
+    WEBKIT_CONTEXT_MENU_ACTION_OUTLINE,
+    WEBKIT_CONTEXT_MENU_ACTION_INSPECT_ELEMENT,
+    WEBKIT_CONTEXT_MENU_ACTION_OPEN_VIDEO_IN_NEW_WINDOW,
+    WEBKIT_CONTEXT_MENU_ACTION_OPEN_AUDIO_IN_NEW_WINDOW,
+    WEBKIT_CONTEXT_MENU_ACTION_COPY_VIDEO_LINK_TO_CLIPBOARD,
+    WEBKIT_CONTEXT_MENU_ACTION_COPY_AUDIO_LINK_TO_CLIPBOARD,
+    WEBKIT_CONTEXT_MENU_ACTION_TOGGLE_MEDIA_CONTROLS,
+    WEBKIT_CONTEXT_MENU_ACTION_TOGGLE_MEDIA_LOOP,
+    WEBKIT_CONTEXT_MENU_ACTION_ENTER_VIDEO_FULLSCREEN,
+    WEBKIT_CONTEXT_MENU_ACTION_MEDIA_PLAY,
+    WEBKIT_CONTEXT_MENU_ACTION_MEDIA_PAUSE,
+    WEBKIT_CONTEXT_MENU_ACTION_MEDIA_MUTE,
+    WEBKIT_CONTEXT_MENU_ACTION_DOWNLOAD_VIDEO_TO_DISK,
+    WEBKIT_CONTEXT_MENU_ACTION_DOWNLOAD_AUDIO_TO_DISK,
+
+    WEBKIT_CONTEXT_MENU_ACTION_CUSTOM = 10000
+} WebKitContextMenuAction;
+
+G_END_DECLS
+
+#endif
diff --git a/Source/WebKit2/UIProcess/API/wpe/WebKitContextMenuItem.h b/Source/WebKit2/UIProcess/API/wpe/WebKitContextMenuItem.h
new file mode 100644 (file)
index 0000000..9f540aa
--- /dev/null
@@ -0,0 +1,100 @@
+/*
+ * Copyright (C) 2012 Igalia S.L.
+ *
+ * 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.
+ */
+
+#if !defined(__WEBKIT_H_INSIDE__) && !defined(WEBKIT2_COMPILATION) && !defined(__WEBKIT_WEB_EXTENSION_H_INSIDE__)
+#error "Only <wpe/webkit.h> can be included directly."
+#endif
+
+#ifndef WebKitContextMenuItem_h
+#define WebKitContextMenuItem_h
+
+#include <gio/gio.h>
+#include <wpe/WebKitDefines.h>
+#include <wpe/WebKitContextMenu.h>
+#include <wpe/WebKitContextMenuActions.h>
+
+G_BEGIN_DECLS
+
+#define WEBKIT_TYPE_CONTEXT_MENU_ITEM            (webkit_context_menu_item_get_type())
+#define WEBKIT_CONTEXT_MENU_ITEM(obj)            (G_TYPE_CHECK_INSTANCE_CAST((obj), WEBKIT_TYPE_CONTEXT_MENU_ITEM, WebKitContextMenuItem))
+#define WEBKIT_IS_CONTEXT_MENU_ITEM(obj)         (G_TYPE_CHECK_INSTANCE_TYPE((obj), WEBKIT_TYPE_CONTEXT_MENU_ITEM))
+#define WEBKIT_CONTEXT_MENU_ITEM_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST((klass),  WEBKIT_TYPE_CONTEXT_MENU_ITEM, WebKitContextMenuItemClass))
+#define WEBKIT_IS_CONTEXT_MENU_ITEM_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass),  WEBKIT_TYPE_CONTEXT_MENU_ITEM))
+#define WEBKIT_CONTEXT_MENU_ITEM_GET_CLASS(obj)  (G_TYPE_INSTANCE_GET_CLASS((obj),  WEBKIT_TYPE_CONTEXT_MENU_ITEM, WebKitContextMenuItemClass))
+
+typedef struct _WebKitContextMenuItem        WebKitContextMenuItem;
+typedef struct _WebKitContextMenuItemClass   WebKitContextMenuItemClass;
+typedef struct _WebKitContextMenuItemPrivate WebKitContextMenuItemPrivate;
+
+struct _WebKitContextMenuItem {
+    GInitiallyUnowned parent;
+
+    WebKitContextMenuItemPrivate *priv;
+};
+
+struct _WebKitContextMenuItemClass {
+    GInitiallyUnownedClass parent_class;
+
+    void (*_webkit_reserved0) (void);
+    void (*_webkit_reserved1) (void);
+    void (*_webkit_reserved2) (void);
+    void (*_webkit_reserved3) (void);
+};
+
+WEBKIT_API GType
+webkit_context_menu_item_get_type                         (void);
+
+WEBKIT_API WebKitContextMenuItem *
+webkit_context_menu_item_new_from_gaction                 (GAction                *action,
+                                                           const gchar            *label,
+                                                           GVariant               *target);
+
+WEBKIT_API WebKitContextMenuItem *
+webkit_context_menu_item_new_from_stock_action            (WebKitContextMenuAction action);
+
+WEBKIT_API WebKitContextMenuItem *
+webkit_context_menu_item_new_from_stock_action_with_label (WebKitContextMenuAction action,
+                                                           const gchar            *label);
+
+WEBKIT_API WebKitContextMenuItem *
+webkit_context_menu_item_new_with_submenu                 (const gchar            *label,
+                                                           WebKitContextMenu      *submenu);
+
+WEBKIT_API WebKitContextMenuItem *
+webkit_context_menu_item_new_separator                    (void);
+
+WEBKIT_API GAction *
+webkit_context_menu_item_get_gaction                      (WebKitContextMenuItem  *item);
+
+WEBKIT_API WebKitContextMenuAction
+webkit_context_menu_item_get_stock_action                 (WebKitContextMenuItem  *item);
+
+WEBKIT_API gboolean
+webkit_context_menu_item_is_separator                     (WebKitContextMenuItem  *item);
+
+WEBKIT_API void
+webkit_context_menu_item_set_submenu                      (WebKitContextMenuItem  *item,
+                                                           WebKitContextMenu      *submenu);
+
+WEBKIT_API WebKitContextMenu *
+webkit_context_menu_item_get_submenu                      (WebKitContextMenuItem  *item);
+
+G_END_DECLS
+
+#endif
diff --git a/Source/WebKit2/UIProcess/API/wpe/WebKitCookieManager.h b/Source/WebKit2/UIProcess/API/wpe/WebKitCookieManager.h
new file mode 100644 (file)
index 0000000..59563ad
--- /dev/null
@@ -0,0 +1,130 @@
+/*
+ * Copyright (C) 2012 Igalia S.L.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2,1 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.
+ */
+
+#if !defined(__WEBKIT_H_INSIDE__) && !defined(WEBKIT2_COMPILATION)
+#error "Only <wpe/webkit.h> can be included directly."
+#endif
+
+#ifndef WebKitCookieManager_h
+#define WebKitCookieManager_h
+
+#include <gio/gio.h>
+#include <glib-object.h>
+#include <wpe/WebKitDefines.h>
+
+G_BEGIN_DECLS
+
+#define WEBKIT_TYPE_COOKIE_MANAGER            (webkit_cookie_manager_get_type())
+#define WEBKIT_COOKIE_MANAGER(obj)            (G_TYPE_CHECK_INSTANCE_CAST((obj), WEBKIT_TYPE_COOKIE_MANAGER, WebKitCookieManager))
+#define WEBKIT_IS_COOKIE_MANAGER(obj)         (G_TYPE_CHECK_INSTANCE_TYPE((obj), WEBKIT_TYPE_COOKIE_MANAGER))
+#define WEBKIT_COOKIE_MANAGER_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST((klass),  WEBKIT_TYPE_COOKIE_MANAGER, WebKitCookieManagerClass))
+#define WEBKIT_IS_COOKIE_MANAGER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass),  WEBKIT_TYPE_COOKIE_MANAGER))
+#define WEBKIT_COOKIE_MANAGER_GET_CLASS(obj)  (G_TYPE_INSTANCE_GET_CLASS((obj),  WEBKIT_TYPE_COOKIE_MANAGER, WebKitCookieManagerClass))
+
+typedef struct _WebKitCookieManager        WebKitCookieManager;
+typedef struct _WebKitCookieManagerClass   WebKitCookieManagerClass;
+typedef struct _WebKitCookieManagerPrivate WebKitCookieManagerPrivate;
+
+/**
+ * WebKitCookiePersistentStorage:
+ * @WEBKIT_COOKIE_PERSISTENT_STORAGE_TEXT: Cookies are stored in a text
+ *  file in the Mozilla "cookies.txt" format.
+ * @WEBKIT_COOKIE_PERSISTENT_STORAGE_SQLITE: Cookies are stored in a SQLite
+ *  file in the current Mozilla format.
+ *
+ * Enum values used to denote the cookie persistent storage types.
+ */
+typedef enum {
+    WEBKIT_COOKIE_PERSISTENT_STORAGE_TEXT,
+    WEBKIT_COOKIE_PERSISTENT_STORAGE_SQLITE
+} WebKitCookiePersistentStorage;
+
+/**
+ * WebKitCookieAcceptPolicy:
+ * @WEBKIT_COOKIE_POLICY_ACCEPT_ALWAYS: Accept all cookies unconditionally.
+ * @WEBKIT_COOKIE_POLICY_ACCEPT_NEVER: Reject all cookies unconditionally.
+ * @WEBKIT_COOKIE_POLICY_ACCEPT_NO_THIRD_PARTY: Accept only cookies set by the main document loaded.
+ *
+ * Enum values used to denote the cookie acceptance policies.
+ */
+typedef enum {
+    WEBKIT_COOKIE_POLICY_ACCEPT_ALWAYS,
+    WEBKIT_COOKIE_POLICY_ACCEPT_NEVER,
+    WEBKIT_COOKIE_POLICY_ACCEPT_NO_THIRD_PARTY
+} WebKitCookieAcceptPolicy;
+
+struct _WebKitCookieManager {
+    GObject parent;
+
+    WebKitCookieManagerPrivate *priv;
+};
+
+struct _WebKitCookieManagerClass {
+    GObjectClass parent_class;
+
+    void (*_webkit_reserved0) (void);
+    void (*_webkit_reserved1) (void);
+    void (*_webkit_reserved2) (void);
+    void (*_webkit_reserved3) (void);
+};
+
+WEBKIT_API GType
+webkit_cookie_manager_get_type                        (void);
+
+WEBKIT_API void
+webkit_cookie_manager_set_persistent_storage          (WebKitCookieManager          *cookie_manager,
+                                                       const gchar                  *filename,
+                                                       WebKitCookiePersistentStorage storage);
+
+WEBKIT_API void
+webkit_cookie_manager_set_accept_policy               (WebKitCookieManager          *cookie_manager,
+                                                       WebKitCookieAcceptPolicy      policy);
+
+WEBKIT_API void
+webkit_cookie_manager_get_accept_policy               (WebKitCookieManager          *cookie_manager,
+                                                       GCancellable                 *cancellable,
+                                                       GAsyncReadyCallback           callback,
+                                                       gpointer                      user_data);
+
+WEBKIT_API WebKitCookieAcceptPolicy
+webkit_cookie_manager_get_accept_policy_finish        (WebKitCookieManager          *cookie_manager,
+                                                       GAsyncResult                 *result,
+                                                       GError                      **error);
+
+WEBKIT_DEPRECATED_FOR(webkit_website_data_manager_fetch) void
+webkit_cookie_manager_get_domains_with_cookies        (WebKitCookieManager          *cookie_manager,
+                                                       GCancellable                 *cancellable,
+                                                       GAsyncReadyCallback           callback,
+                                                       gpointer                      user_data);
+
+WEBKIT_DEPRECATED_FOR(webkit_website_data_manager_fetch_finish) gchar **
+webkit_cookie_manager_get_domains_with_cookies_finish (WebKitCookieManager          *cookie_manager,
+                                                       GAsyncResult                 *result,
+                                                       GError                      **error);
+
+WEBKIT_DEPRECATED_FOR(webkit_website_data_manager_remove) void
+webkit_cookie_manager_delete_cookies_for_domain       (WebKitCookieManager          *cookie_manager,
+                                                       const gchar                  *domain);
+
+WEBKIT_DEPRECATED_FOR(webkit_website_data_manager_clear) void
+webkit_cookie_manager_delete_all_cookies              (WebKitCookieManager          *cookie_manager);
+
+G_END_DECLS
+
+#endif
diff --git a/Source/WebKit2/UIProcess/API/wpe/WebKitCredential.h b/Source/WebKit2/UIProcess/API/wpe/WebKitCredential.h
new file mode 100644 (file)
index 0000000..babff3f
--- /dev/null
@@ -0,0 +1,80 @@
+/*
+ * Copyright (C) 2013 Samsung Electronics 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.
+ */
+
+#if !defined(__WEBKIT_H_INSIDE__) && !defined(WEBKIT2_COMPILATION)
+#error "Only <wpe/webkit.h> can be included directly."
+#endif
+
+#ifndef WebKitCredential_h
+#define WebKitCredential_h
+
+#include <glib-object.h>
+#include <wpe/WebKitDefines.h>
+
+G_BEGIN_DECLS
+
+#define WEBKIT_TYPE_CREDENTIAL (webkit_credential_get_type())
+
+typedef struct _WebKitCredential WebKitCredential;
+
+/**
+ * WebKitCredentialPersistence:
+ * @WEBKIT_CREDENTIAL_PERSISTENCE_NONE: Credential does not persist
+ * @WEBKIT_CREDENTIAL_PERSISTENCE_FOR_SESSION: Credential persists for session only
+ * @WEBKIT_CREDENTIAL_PERSISTENCE_PERMANENT: Credential persists permanently
+ *
+ * Enum values representing the duration for which a credential persists.
+ *
+ * Since: 2.2
+ */
+typedef enum {
+    WEBKIT_CREDENTIAL_PERSISTENCE_NONE,
+    WEBKIT_CREDENTIAL_PERSISTENCE_FOR_SESSION,
+    WEBKIT_CREDENTIAL_PERSISTENCE_PERMANENT
+} WebKitCredentialPersistence;
+
+WEBKIT_API GType
+webkit_credential_get_type             (void);
+
+WEBKIT_API WebKitCredential *
+webkit_credential_new                  (const gchar                 *username,
+                                        const gchar                 *password,
+                                        WebKitCredentialPersistence  persistence);
+
+WEBKIT_API WebKitCredential *
+webkit_credential_copy                 (WebKitCredential            *credential);
+
+WEBKIT_API void
+webkit_credential_free                 (WebKitCredential            *credential);
+
+WEBKIT_API const gchar *
+webkit_credential_get_username         (WebKitCredential            *credential);
+
+WEBKIT_API const gchar *
+webkit_credential_get_password         (WebKitCredential            *credential);
+
+WEBKIT_API gboolean
+webkit_credential_has_password         (WebKitCredential            *credential);
+
+WEBKIT_API WebKitCredentialPersistence
+webkit_credential_get_persistence      (WebKitCredential            *credential);
+
+G_END_DECLS
+
+#endif
diff --git a/Source/WebKit2/UIProcess/API/wpe/WebKitDefines.h b/Source/WebKit2/UIProcess/API/wpe/WebKitDefines.h
new file mode 100644 (file)
index 0000000..77c3524
--- /dev/null
@@ -0,0 +1,48 @@
+/*
+ * Copyright (C) 2011 Igalia S.L.
+ *
+ * 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.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS 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 APPLE INC. OR ITS 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.
+ */
+
+#if !defined(__WEBKIT_H_INSIDE__) && !defined(WEBKIT2_COMPILATION) && !defined(__WEBKIT_WEB_EXTENSION_H_INSIDE__)
+#error "Only <wpe/webkit.h> can be included directly."
+#endif
+
+#ifndef WebKitDefines_h
+#define WebKitDefines_h
+
+#include <glib.h>
+
+#ifdef G_OS_WIN32
+#    ifdef BUILDING_WEBKIT
+#        define WEBKIT_API __declspec(dllexport)
+#    else
+#        define WEBKIT_API __declspec(dllimport)
+#    endif
+#else
+#    define WEBKIT_API __attribute__((visibility("default")))
+#endif
+
+#define WEBKIT_DEPRECATED WEBKIT_API G_DEPRECATED
+#define WEBKIT_DEPRECATED_FOR(f) WEBKIT_API G_DEPRECATED_FOR(f)
+
+#endif // WebKitDefines_h
diff --git a/Source/WebKit2/UIProcess/API/wpe/WebKitDownload.h b/Source/WebKit2/UIProcess/API/wpe/WebKitDownload.h
new file mode 100644 (file)
index 0000000..9bff4bb
--- /dev/null
@@ -0,0 +1,105 @@
+/*
+ * Copyright (C) 2012 Igalia S.L.
+ *
+ * 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.
+ */
+
+#if !defined(__WEBKIT_H_INSIDE__) && !defined(WEBKIT2_COMPILATION)
+#error "Only <wpe/webkit.h> can be included directly."
+#endif
+
+#ifndef WebKitDownload_h
+#define WebKitDownload_h
+
+#include <glib-object.h>
+#include <wpe/WebKitDefines.h>
+#include <wpe/WebKitURIRequest.h>
+#include <wpe/WebKitURIResponse.h>
+
+G_BEGIN_DECLS
+
+#define WEBKIT_TYPE_DOWNLOAD            (webkit_download_get_type())
+#define WEBKIT_DOWNLOAD(obj)            (G_TYPE_CHECK_INSTANCE_CAST((obj), WEBKIT_TYPE_DOWNLOAD, WebKitDownload))
+#define WEBKIT_IS_DOWNLOAD(obj)         (G_TYPE_CHECK_INSTANCE_TYPE((obj), WEBKIT_TYPE_DOWNLOAD))
+#define WEBKIT_DOWNLOAD_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST((klass),  WEBKIT_TYPE_DOWNLOAD, WebKitDownloadClass))
+#define WEBKIT_IS_DOWNLOAD_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass),  WEBKIT_TYPE_DOWNLOAD))
+#define WEBKIT_DOWNLOAD_GET_CLASS(obj)  (G_TYPE_INSTANCE_GET_CLASS((obj),  WEBKIT_TYPE_DOWNLOAD, WebKitDownloadClass))
+
+typedef struct _WebKitDownload        WebKitDownload;
+typedef struct _WebKitDownloadClass   WebKitDownloadClass;
+typedef struct _WebKitDownloadPrivate WebKitDownloadPrivate;
+
+typedef struct _WebKitWebView WebKitWebView;
+
+struct _WebKitDownload {
+    GObject parent;
+
+    WebKitDownloadPrivate *priv;
+};
+
+struct _WebKitDownloadClass {
+    GObjectClass parent_class;
+
+    gboolean (* decide_destination)  (WebKitDownload *download,
+                                      const gchar    *suggested_filename);
+
+    void (*_webkit_reserved0) (void);
+    void (*_webkit_reserved1) (void);
+    void (*_webkit_reserved2) (void);
+    void (*_webkit_reserved3) (void);
+};
+
+WEBKIT_API GType
+webkit_download_get_type                 (void);
+
+WEBKIT_API WebKitURIRequest *
+webkit_download_get_request              (WebKitDownload *download);
+
+WEBKIT_API const gchar *
+webkit_download_get_destination          (WebKitDownload *download);
+
+WEBKIT_API void
+webkit_download_set_destination          (WebKitDownload *download,
+                                          const gchar    *uri);
+
+WEBKIT_API WebKitURIResponse*
+webkit_download_get_response             (WebKitDownload *download);
+
+WEBKIT_API void
+webkit_download_cancel                   (WebKitDownload *download);
+
+WEBKIT_API gdouble
+webkit_download_get_estimated_progress   (WebKitDownload *download);
+
+WEBKIT_API gdouble
+webkit_download_get_elapsed_time         (WebKitDownload *download);
+
+WEBKIT_API guint64
+webkit_download_get_received_data_length (WebKitDownload *download);
+
+WEBKIT_API WebKitWebView *
+webkit_download_get_web_view             (WebKitDownload *download);
+
+WEBKIT_API gboolean
+webkit_download_get_allow_overwrite      (WebKitDownload *download);
+
+WEBKIT_API void
+webkit_download_set_allow_overwrite      (WebKitDownload *download,
+                                          gboolean        allowed);
+
+G_END_DECLS
+
+#endif
diff --git a/Source/WebKit2/UIProcess/API/wpe/WebKitEditingCommands.h b/Source/WebKit2/UIProcess/API/wpe/WebKitEditingCommands.h
new file mode 100644 (file)
index 0000000..f676793
--- /dev/null
@@ -0,0 +1,124 @@
+/*
+ * Copyright (C) 2012 Igalia S.L.
+ *
+ * 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.
+ */
+
+#if !defined(__WEBKIT_H_INSIDE__) && !defined(WEBKIT2_COMPILATION)
+#error "Only <wpe/webkit.h> can be included directly."
+#endif
+
+#ifndef WebKitEditingCommands_h
+#define WebKitEditingCommands_h
+
+G_BEGIN_DECLS
+
+/**
+ * WEBKIT_EDITING_COMMAND_CUT:
+ *
+ * The cut clipboard command. Copies the current selection inside
+ * a #WebKitWebView to the clipboard and deletes the selected content.
+ * You can check whether it's possible to execute the command with
+ * webkit_web_view_can_execute_editing_command(). In general it's
+ * possible to cut to the clipboard when the #WebKitWebView content is
+ * editable and there is an active selection.
+ */
+#define WEBKIT_EDITING_COMMAND_CUT "Cut"
+
+/**
+ * WEBKIT_EDITING_COMMAND_COPY:
+ *
+ * The copy clipboard command. Copies the current selection inside
+ * a #WebKitWebView to the clipboard.
+ * You can check whether it's possible to execute the command with
+ * webkit_web_view_can_execute_editing_command(). In general it's
+ * possible to copy to the clipboard when there is an active selection
+ * inside the #WebKitWebView.
+ */
+#define WEBKIT_EDITING_COMMAND_COPY "Copy"
+
+/**
+ * WEBKIT_EDITING_COMMAND_PASTE:
+ *
+ * The paste clipboard command. Pastes the contents of the clipboard to
+ * a #WebKitWebView.
+ * You can check whether it's possible to execute the command with
+ * webkit_web_view_can_execute_editing_command(). In general it's possible
+ * to paste from the clipboard when the #WebKitWebView content is editable
+ * and clipboard is not empty.
+ */
+#define WEBKIT_EDITING_COMMAND_PASTE "Paste"
+
+/**
+ * WEBKIT_EDITING_COMMAND_SELECT_ALL:
+ *
+ * The select all command. Selects all the content of the current text field in
+ * a #WebKitWebView.
+ * It is always possible to select all text, no matter whether the
+ * #WebKitWebView content is editable or not. You can still check it
+ * with webkit_web_view_can_execute_editing_command().
+ */
+#define WEBKIT_EDITING_COMMAND_SELECT_ALL "SelectAll"
+
+/**
+ * WEBKIT_EDITING_COMMAND_UNDO:
+ *
+ * The undo command. Undoes the last editing command in a #WebKitWebView.
+ * You can check whether it's possible to execute the command with
+ * webkit_web_view_can_execute_editing_command(). It's only possible
+ * to undo a command after a previously executed editing operation.
+ */
+#define WEBKIT_EDITING_COMMAND_UNDO "Undo"
+
+/**
+ * WEBKIT_EDITING_COMMAND_REDO:
+ *
+ * The redo command. Redoes a previously undone editing command in
+ * a #WebKitWebView.
+ * You can check whether it's possible to execute the command with
+ * webkit_web_view_can_execute_editing_command(). It's only possible
+ * to redo a command when it has been previously undone.
+ */
+#define WEBKIT_EDITING_COMMAND_REDO "Redo"
+
+/**
+ * WEBKIT_EDITING_COMMAND_INSERT_IMAGE:
+ *
+ * The insert image command. Creates an image element that is inserted at
+ * the current cursor position. It receives an URI as argument,
+ * that is used as the image source. This command should be executed with
+ * webkit_web_view_execute_editing_command_with_argument().
+ *
+ * Since: 2.10
+ */
+#define WEBKIT_EDITING_COMMAND_INSERT_IMAGE "InsertImage"
+
+/**
+ * WEBKIT_EDITING_COMMAND_CREATE_LINK:
+ *
+ * The create link command. Creates a link element that is inserted at
+ * the current cursor position. If there's a selection, the selected text
+ * will be used as the link text, otherwise the URL itself will be used.
+ * It receives the link URL as argument. This command should be executed
+ * with webkit_web_view_execute_editing_command_with_argument()
+ *
+ * Since: 2.10
+ */
+#define WEBKIT_EDITING_COMMAND_CREATE_LINK "CreateLink"
+
+G_END_DECLS
+
+#endif
diff --git a/Source/WebKit2/UIProcess/API/wpe/WebKitEditorState.h b/Source/WebKit2/UIProcess/API/wpe/WebKitEditorState.h
new file mode 100644 (file)
index 0000000..8cf6595
--- /dev/null
@@ -0,0 +1,87 @@
+/*
+ * Copyright (C) 2015 Igalia S.L.
+ *
+ * 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.
+ */
+
+#if !defined(__WEBKIT_H_INSIDE__) && !defined(WEBKIT2_COMPILATION)
+#error "Only <wpe/webkit.h> can be included directly."
+#endif
+
+#ifndef WebKitEditorState_h
+#define WebKitEditorState_h
+
+#include <glib-object.h>
+#include <wpe/WebKitDefines.h>
+
+G_BEGIN_DECLS
+
+#define WEBKIT_TYPE_EDITOR_STATE            (webkit_editor_state_get_type())
+#define WEBKIT_EDITOR_STATE(obj)            (G_TYPE_CHECK_INSTANCE_CAST((obj), WEBKIT_TYPE_EDITOR_STATE, WebKitEditorState))
+#define WEBKIT_IS_EDITOR_STATE(obj)         (G_TYPE_CHECK_INSTANCE_TYPE((obj), WEBKIT_TYPE_EDITOR_STATE))
+#define WEBKIT_EDITOR_STATE_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST((klass),  WEBKIT_TYPE_EDITOR_STATE, WebKitEditorStateClass))
+#define WEBKIT_IS_EDITOR_STATE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass),  WEBKIT_TYPE_EDITOR_STATE))
+#define WEBKIT_EDITOR_STATE_GET_CLASS(obj)  (G_TYPE_INSTANCE_GET_CLASS((obj),  WEBKIT_TYPE_EDITOR_STATE, WebKitEditorStateClass))
+
+typedef struct _WebKitEditorState        WebKitEditorState;
+typedef struct _WebKitEditorStateClass   WebKitEditorStateClass;
+typedef struct _WebKitEditorStatePrivate WebKitEditorStatePrivate;
+
+/**
+ * WebKitEditorTypingAttributes:
+ * @WEBKIT_EDITOR_TYPING_ATTRIBUTE_NONE: No typing attributes.
+ * @WEBKIT_EDITOR_TYPING_ATTRIBUTE_BOLD: Bold typing attribute.
+ * @WEBKIT_EDITOR_TYPING_ATTRIBUTE_ITALIC: Italic typing attribute.
+ * @WEBKIT_EDITOR_TYPING_ATTRIBUTE_UNDERLINE: Underline typing attribute.
+ * @WEBKIT_EDITOR_TYPING_ATTRIBUTE_STRIKETHROUGH: Strikethrough typing attribute.
+ *
+ * Enum values with flags representing typing attributes.
+ *
+ * Since: 2.10
+ */
+typedef enum
+{
+    WEBKIT_EDITOR_TYPING_ATTRIBUTE_NONE           = 1 << 1,
+    WEBKIT_EDITOR_TYPING_ATTRIBUTE_BOLD           = 1 << 2,
+    WEBKIT_EDITOR_TYPING_ATTRIBUTE_ITALIC         = 1 << 3,
+    WEBKIT_EDITOR_TYPING_ATTRIBUTE_UNDERLINE      = 1 << 4,
+    WEBKIT_EDITOR_TYPING_ATTRIBUTE_STRIKETHROUGH  = 1 << 5
+} WebKitEditorTypingAttributes;
+
+struct _WebKitEditorState {
+    GObject parent;
+
+    WebKitEditorStatePrivate *priv;
+};
+
+struct _WebKitEditorStateClass {
+    GObjectClass parent_class;
+
+    void (*_webkit_reserved0) (void);
+    void (*_webkit_reserved1) (void);
+    void (*_webkit_reserved2) (void);
+    void (*_webkit_reserved3) (void);
+};
+
+WEBKIT_API GType
+webkit_editor_state_get_type              (void);
+
+WEBKIT_API guint
+webkit_editor_state_get_typing_attributes (WebKitEditorState *editor_state);
+
+G_END_DECLS
+
+#endif
diff --git a/Source/WebKit2/UIProcess/API/wpe/WebKitEnumTypes.cpp.template b/Source/WebKit2/UIProcess/API/wpe/WebKitEnumTypes.cpp.template
new file mode 100644 (file)
index 0000000..29a52d0
--- /dev/null
@@ -0,0 +1,62 @@
+/*** BEGIN file-header ***/
+/*
+ * Copyright (C) 2017 Igalia S.L.
+ *
+ * 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 "WebKitEnumTypes.h"
+
+#include <wpe/webkit.h>
+extern "C" {
+/*** END file-header ***/
+
+
+/*** BEGIN file-production ***/
+// Enumerations from @filename@.
+/*** END file-production ***/
+
+
+/*** BEGIN value-header ***/
+GType @enum_name@_get_type()
+{
+    static const G@Type@Value values[] = {
+/*** END value-header ***/
+
+
+/*** BEGIN value-production ***/
+        { @VALUENAME@, "@VALUENAME@", "@valuenick@" },
+/*** END value-production ***/
+
+
+/*** BEGIN value-tail ***/
+        { 0, NULL, NULL }
+    };
+
+    static GType type = 0;
+    if (G_UNLIKELY(!type))
+        type = g_@type@_register_static("@EnumName@", values);
+
+    return type;
+}
+
+/*** END value-tail ***/
+
+
+/*** BEGIN file-tail ***/
+}
+/*** END file-tail ***/
diff --git a/Source/WebKit2/UIProcess/API/wpe/WebKitEnumTypes.h.template b/Source/WebKit2/UIProcess/API/wpe/WebKitEnumTypes.h.template
new file mode 100644 (file)
index 0000000..783f2f5
--- /dev/null
@@ -0,0 +1,54 @@
+/*** BEGIN file-header ***/
+/*
+ * Copyright (C) 2017 Igalia S.L.
+ *
+ * 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.
+ */
+
+#if !defined(__WEBKIT_H_INSIDE__) && !defined(WEBKIT2_COMPILATION)
+#error "Only <wpe/webkit.h> can be included directly."
+#endif
+
+#ifndef WEBKIT_ENUM_TYPES_H
+#define WEBKIT_ENUM_TYPES_H
+
+#include <glib-object.h>
+#include <wpe/WebKitDefines.h>
+
+G_BEGIN_DECLS
+/*** END file-header ***/
+
+
+/*** BEGIN file-production ***/
+/* Enumerations from @basename@. */
+/*** END file-production ***/
+
+
+/*** BEGIN enumeration-production ***/
+#define WEBKIT_TYPE_@ENUMSHORT@ @enum_name@_get_type ()
+
+WEBKIT_API GType
+@enum_name@_get_type (void);
+
+/*** END enumeration-production ***/
+
+
+/*** BEGIN file-tail ***/
+G_END_DECLS
+
+#endif
+/*** END file-tail ***/
+
diff --git a/Source/WebKit2/UIProcess/API/wpe/WebKitError.h b/Source/WebKit2/UIProcess/API/wpe/WebKitError.h
new file mode 100644 (file)
index 0000000..4dad4ef
--- /dev/null
@@ -0,0 +1,149 @@
+/*
+ * Copyright (C) 2011 Igalia S.L.
+ * Copyright (C) 2008 Luca Bruno <lethalman88@gmail.com>
+ *
+ * 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.
+ */
+
+#if !defined(__WEBKIT_H_INSIDE__) && !defined(WEBKIT2_COMPILATION)
+#error "Only <wpe/webkit.h> can be included directly."
+#endif
+
+#ifndef WebKitError_h
+#define WebKitError_h
+
+#include <wpe/WebKitDefines.h>
+
+G_BEGIN_DECLS
+
+#define WEBKIT_NETWORK_ERROR    webkit_network_error_quark ()
+#define WEBKIT_POLICY_ERROR     webkit_policy_error_quark ()
+#define WEBKIT_PLUGIN_ERROR     webkit_plugin_error_quark ()
+#define WEBKIT_DOWNLOAD_ERROR   webkit_download_error_quark ()
+#define WEBKIT_JAVASCRIPT_ERROR webkit_javascript_error_quark ()
+#define WEBKIT_SNAPSHOT_ERROR   webkit_snapshot_error_quark ()
+
+/**
+ * WebKitNetworkError:
+ * @WEBKIT_NETWORK_ERROR_FAILED: Generic load failure
+ * @WEBKIT_NETWORK_ERROR_TRANSPORT: Load failure due to transport error
+ * @WEBKIT_NETWORK_ERROR_UNKNOWN_PROTOCOL: Load failure due to unknown protocol
+ * @WEBKIT_NETWORK_ERROR_CANCELLED: Load failure due to cancellation
+ * @WEBKIT_NETWORK_ERROR_FILE_DOES_NOT_EXIST: Load failure due to missing file
+ *
+ * Enum values used to denote the various network errors.
+ **/
+typedef enum {
+    WEBKIT_NETWORK_ERROR_FAILED = 399,
+    WEBKIT_NETWORK_ERROR_TRANSPORT = 300,
+    WEBKIT_NETWORK_ERROR_UNKNOWN_PROTOCOL = 301,
+    WEBKIT_NETWORK_ERROR_CANCELLED = 302,
+    WEBKIT_NETWORK_ERROR_FILE_DOES_NOT_EXIST = 303
+} WebKitNetworkError;
+
+/**
+ * WebKitPolicyError:
+ * @WEBKIT_POLICY_ERROR_FAILED: Generic load failure due to policy error
+ * @WEBKIT_POLICY_ERROR_CANNOT_SHOW_MIME_TYPE: Load failure due to unsupported mime type
+ * @WEBKIT_POLICY_ERROR_CANNOT_SHOW_URI: Load failure due to URI that can not be shown
+ * @WEBKIT_POLICY_ERROR_FRAME_LOAD_INTERRUPTED_BY_POLICY_CHANGE: Load failure due to frame load interruption by policy change
+ * @WEBKIT_POLICY_ERROR_CANNOT_USE_RESTRICTED_PORT: Load failure due to port restriction
+ *
+ * Enum values used to denote the various policy errors.
+ **/
+typedef enum {
+    WEBKIT_POLICY_ERROR_FAILED = 199,
+    WEBKIT_POLICY_ERROR_CANNOT_SHOW_MIME_TYPE = 100,
+    WEBKIT_POLICY_ERROR_CANNOT_SHOW_URI = 101,
+    WEBKIT_POLICY_ERROR_FRAME_LOAD_INTERRUPTED_BY_POLICY_CHANGE = 102,
+    WEBKIT_POLICY_ERROR_CANNOT_USE_RESTRICTED_PORT = 103
+} WebKitPolicyError;
+
+/**
+ * WebKitPluginError:
+ * @WEBKIT_PLUGIN_ERROR_FAILED: Generic plugin load failure
+ * @WEBKIT_PLUGIN_ERROR_CANNOT_FIND_PLUGIN: Load failure due to missing plugin
+ * @WEBKIT_PLUGIN_ERROR_CANNOT_LOAD_PLUGIN: Load failure due to inability to load plugin
+ * @WEBKIT_PLUGIN_ERROR_JAVA_UNAVAILABLE: Load failure due to missing Java support that is required to load plugin
+ * @WEBKIT_PLUGIN_ERROR_CONNECTION_CANCELLED: Load failure due to connection cancellation
+ * @WEBKIT_PLUGIN_ERROR_WILL_HANDLE_LOAD: Load failure since plugin handles the load
+ *
+ * Enum values used to denote the various plugin errors.
+ **/
+typedef enum {
+    WEBKIT_PLUGIN_ERROR_FAILED = 299,
+    WEBKIT_PLUGIN_ERROR_CANNOT_FIND_PLUGIN = 200,
+    WEBKIT_PLUGIN_ERROR_CANNOT_LOAD_PLUGIN = 201,
+    WEBKIT_PLUGIN_ERROR_JAVA_UNAVAILABLE = 202,
+    WEBKIT_PLUGIN_ERROR_CONNECTION_CANCELLED = 203,
+    WEBKIT_PLUGIN_ERROR_WILL_HANDLE_LOAD = 204,
+} WebKitPluginError;
+
+/**
+ * WebKitDownloadError:
+ * @WEBKIT_DOWNLOAD_ERROR_NETWORK: Download failure due to network error
+ * @WEBKIT_DOWNLOAD_ERROR_CANCELLED_BY_USER: Download was cancelled by user
+ * @WEBKIT_DOWNLOAD_ERROR_DESTINATION: Download failure due to destination error
+ *
+ * Enum values used to denote the various download errors.
+ */
+typedef enum {
+    WEBKIT_DOWNLOAD_ERROR_NETWORK = 499,
+    WEBKIT_DOWNLOAD_ERROR_CANCELLED_BY_USER = 400,
+    WEBKIT_DOWNLOAD_ERROR_DESTINATION = 401
+} WebKitDownloadError;
+
+/**
+ * WebKitJavascriptError:
+ * @WEBKIT_JAVASCRIPT_ERROR_SCRIPT_FAILED: An exception was raised in JavaScript execution
+ *
+ * Enum values used to denote errors happening when executing JavaScript
+ */
+typedef enum {
+    WEBKIT_JAVASCRIPT_ERROR_SCRIPT_FAILED = 699
+} WebKitJavascriptError;
+
+/**
+ * WebKitSnapshotError:
+ * @WEBKIT_SNAPSHOT_ERROR_FAILED_TO_CREATE: An error occurred when creating a webpage snapshot.
+ *
+ * Enum values used to denote errors happening when creating snapshots of #WebKitWebView
+ */
+typedef enum {
+    WEBKIT_SNAPSHOT_ERROR_FAILED_TO_CREATE = 799
+} WebKitSnapshotError;
+
+WEBKIT_API GQuark
+webkit_network_error_quark    (void);
+
+WEBKIT_API GQuark
+webkit_policy_error_quark     (void);
+
+WEBKIT_API GQuark
+webkit_plugin_error_quark     (void);
+
+WEBKIT_API GQuark
+webkit_download_error_quark   (void);
+
+WEBKIT_API GQuark
+webkit_javascript_error_quark (void);
+
+WEBKIT_API GQuark
+webkit_snapshot_error_quark   (void);
+
+G_END_DECLS
+
+#endif
diff --git a/Source/WebKit2/UIProcess/API/wpe/WebKitFaviconDatabase.h b/Source/WebKit2/UIProcess/API/wpe/WebKitFaviconDatabase.h
new file mode 100644 (file)
index 0000000..bed4018
--- /dev/null
@@ -0,0 +1,99 @@
+/*
+ * Copyright (C) 2012 Igalia S.L.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2,1 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.
+ */
+
+#if !defined(__WEBKIT_H_INSIDE__) && !defined(WEBKIT2_COMPILATION)
+#error "Only <wpe/webkit.h> can be included directly."
+#endif
+
+#ifndef WebKitFaviconDatabase_h
+#define WebKitFaviconDatabase_h
+
+#include <cairo.h>
+#include <gio/gio.h>
+#include <glib-object.h>
+#include <wpe/WebKitDefines.h>
+
+G_BEGIN_DECLS
+
+#define WEBKIT_TYPE_FAVICON_DATABASE            (webkit_favicon_database_get_type())
+#define WEBKIT_FAVICON_DATABASE(obj)            (G_TYPE_CHECK_INSTANCE_CAST((obj), WEBKIT_TYPE_FAVICON_DATABASE, WebKitFaviconDatabase))
+#define WEBKIT_IS_FAVICON_DATABASE(obj)         (G_TYPE_CHECK_INSTANCE_TYPE((obj), WEBKIT_TYPE_FAVICON_DATABASE))
+#define WEBKIT_FAVICON_DATABASE_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST((klass),  WEBKIT_TYPE_FAVICON_DATABASE, WebKitFaviconDatabaseClass))
+#define WEBKIT_IS_FAVICON_DATABASE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass),  WEBKIT_TYPE_FAVICON_DATABASE))
+#define WEBKIT_FAVICON_DATABASE_GET_CLASS(obj)  (G_TYPE_INSTANCE_GET_CLASS((obj),  WEBKIT_TYPE_FAVICON_DATABASE, WebKitFaviconDatabaseClass))
+#define WEBKIT_FAVICON_DATABASE_ERROR           (webkit_favicon_database_error_quark())
+
+typedef struct _WebKitFaviconDatabase        WebKitFaviconDatabase;
+typedef struct _WebKitFaviconDatabaseClass   WebKitFaviconDatabaseClass;
+typedef struct _WebKitFaviconDatabasePrivate WebKitFaviconDatabasePrivate;
+
+struct _WebKitFaviconDatabase {
+    GObject parent;
+
+    WebKitFaviconDatabasePrivate *priv;
+};
+
+struct _WebKitFaviconDatabaseClass {
+    GObjectClass parent_class;
+
+    void (*_webkit_reserved0) (void);
+    void (*_webkit_reserved1) (void);
+    void (*_webkit_reserved2) (void);
+    void (*_webkit_reserved3) (void);
+};
+
+/**
+ * WebKitFaviconDatabaseError:
+ * @WEBKIT_FAVICON_DATABASE_ERROR_NOT_INITIALIZED: The #WebKitFaviconDatabase has not been initialized yet
+ * @WEBKIT_FAVICON_DATABASE_ERROR_FAVICON_NOT_FOUND: There is not an icon available for the requested URL
+ * @WEBKIT_FAVICON_DATABASE_ERROR_FAVICON_UNKNOWN: There might be an icon for the requested URL, but its data is unknown at the moment
+ *
+ * Enum values used to denote the various errors related to the #WebKitFaviconDatabase.
+ **/
+typedef enum {
+    WEBKIT_FAVICON_DATABASE_ERROR_NOT_INITIALIZED,
+    WEBKIT_FAVICON_DATABASE_ERROR_FAVICON_NOT_FOUND,
+    WEBKIT_FAVICON_DATABASE_ERROR_FAVICON_UNKNOWN
+} WebKitFaviconDatabaseError;
+
+WEBKIT_API GQuark
+webkit_favicon_database_error_quark        (void);
+
+WEBKIT_API GType
+webkit_favicon_database_get_type           (void);
+
+WEBKIT_API void
+webkit_favicon_database_get_favicon        (WebKitFaviconDatabase *database,
+                                            const gchar           *page_uri,
+                                            GCancellable          *cancellable,
+                                            GAsyncReadyCallback    callback,
+                                            gpointer               user_data);
+WEBKIT_API cairo_surface_t *
+webkit_favicon_database_get_favicon_finish (WebKitFaviconDatabase *database,
+                                            GAsyncResult          *result,
+                                            GError               **error);
+WEBKIT_API gchar *
+webkit_favicon_database_get_favicon_uri    (WebKitFaviconDatabase *database,
+                                            const gchar           *page_uri);
+WEBKIT_API void
+webkit_favicon_database_clear              (WebKitFaviconDatabase *database);
+
+G_END_DECLS
+
+#endif
diff --git a/Source/WebKit2/UIProcess/API/wpe/WebKitFileChooserRequest.h b/Source/WebKit2/UIProcess/API/wpe/WebKitFileChooserRequest.h
new file mode 100644 (file)
index 0000000..d54ef2c
--- /dev/null
@@ -0,0 +1,80 @@
+/*
+ * Copyright (C) 2012 Igalia S.L.
+ *
+ * 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.
+ */
+
+#if !defined(__WEBKIT_H_INSIDE__) && !defined(WEBKIT2_COMPILATION)
+#error "Only <wpe/webkit.h> can be included directly."
+#endif
+
+#ifndef WebKitFileChooserRequest_h
+#define WebKitFileChooserRequest_h
+
+#include <glib-object.h>
+#include <wpe/WebKitDefines.h>
+
+G_BEGIN_DECLS
+
+#define WEBKIT_TYPE_FILE_CHOOSER_REQUEST            (webkit_file_chooser_request_get_type())
+#define WEBKIT_FILE_CHOOSER_REQUEST(obj)            (G_TYPE_CHECK_INSTANCE_CAST((obj), WEBKIT_TYPE_FILE_CHOOSER_REQUEST, WebKitFileChooserRequest))
+#define WEBKIT_FILE_CHOOSER_REQUEST_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST((klass),  WEBKIT_TYPE_FILE_CHOOSER_REQUEST, WebKitFileChooserRequestClass))
+#define WEBKIT_IS_FILE_CHOOSER_REQUEST(obj)         (G_TYPE_CHECK_INSTANCE_TYPE((obj), WEBKIT_TYPE_FILE_CHOOSER_REQUEST))
+#define WEBKIT_IS_FILE_CHOOSER_REQUEST_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass),  WEBKIT_TYPE_FILE_CHOOSER_REQUEST))
+#define WEBKIT_FILE_CHOOSER_REQUEST_GET_CLASS(obj)  (G_TYPE_INSTANCE_GET_CLASS((obj),  WEBKIT_TYPE_FILE_CHOOSER_REQUEST, WebKitFileChooserRequestClass))
+
+typedef struct _WebKitFileChooserRequest        WebKitFileChooserRequest;
+typedef struct _WebKitFileChooserRequestClass   WebKitFileChooserRequestClass;
+typedef struct _WebKitFileChooserRequestPrivate WebKitFileChooserRequestPrivate;
+
+struct _WebKitFileChooserRequest {
+    GObject parent;
+
+    /*< private >*/
+    WebKitFileChooserRequestPrivate *priv;
+};
+
+struct _WebKitFileChooserRequestClass {
+    GObjectClass parent_class;
+
+    void (*_webkit_reserved0) (void);
+    void (*_webkit_reserved1) (void);
+    void (*_webkit_reserved2) (void);
+    void (*_webkit_reserved3) (void);
+};
+
+WEBKIT_API GType
+webkit_file_chooser_request_get_type                  (void);
+
+WEBKIT_API const gchar * const *
+webkit_file_chooser_request_get_mime_types        (WebKitFileChooserRequest *request);
+
+WEBKIT_API gboolean
+webkit_file_chooser_request_get_select_multiple   (WebKitFileChooserRequest *request);
+
+WEBKIT_API void
+webkit_file_chooser_request_select_files          (WebKitFileChooserRequest *request,
+                                                   const gchar * const      *files);
+
+WEBKIT_API const gchar * const *
+webkit_file_chooser_request_get_selected_files    (WebKitFileChooserRequest *request);
+
+WEBKIT_API void
+webkit_file_chooser_request_cancel                (WebKitFileChooserRequest *request);
+
+G_END_DECLS
+
+#endif
diff --git a/Source/WebKit2/UIProcess/API/wpe/WebKitFindController.h b/Source/WebKit2/UIProcess/API/wpe/WebKitFindController.h
new file mode 100644 (file)
index 0000000..ad3204a
--- /dev/null
@@ -0,0 +1,124 @@
+/*
+ * Copyright (C) 2012 Igalia S.L.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2,1 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.
+ */
+
+#if !defined(__WEBKIT_H_INSIDE__) && !defined(WEBKIT2_COMPILATION)
+#error "Only <wpe/webkit.h> can be included directly."
+#endif
+
+#ifndef WebKitFindController_h
+#define WebKitFindController_h
+
+#include <glib-object.h>
+#include <wpe/WebKitDefines.h>
+
+G_BEGIN_DECLS
+
+#define WEBKIT_TYPE_FIND_CONTROLLER            (webkit_find_controller_get_type())
+#define WEBKIT_FIND_CONTROLLER(obj)            (G_TYPE_CHECK_INSTANCE_CAST((obj), WEBKIT_TYPE_FIND_CONTROLLER, WebKitFindController))
+#define WEBKIT_FIND_CONTROLLER_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST((klass),  WEBKIT_TYPE_FIND_CONTROLLER, WebKitFindControllerClass))
+#define WEBKIT_IS_FIND_CONTROLLER(obj)         (G_TYPE_CHECK_INSTANCE_TYPE((obj), WEBKIT_TYPE_FIND_CONTROLLER))
+#define WEBKIT_IS_FIND_CONTROLLER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass),  WEBKIT_TYPE_FIND_CONTROLLER))
+#define WEBKIT_FIND_CONTROLLER_GET_CLASS(obj)  (G_TYPE_INSTANCE_GET_CLASS((obj),  WEBKIT_TYPE_FIND_CONTROLLER, WebKitFindControllerClass))
+
+typedef struct _WebKitFindController        WebKitFindController;
+typedef struct _WebKitFindControllerPrivate WebKitFindControllerPrivate;
+typedef struct _WebKitFindControllerClass   WebKitFindControllerClass;
+
+typedef struct _WebKitWebView WebKitWebView;
+
+/**
+ * WebKitFindOptions:
+ * @WEBKIT_FIND_OPTIONS_NONE: no search flags, this means a case
+ *   sensitive, no wrap, forward only search.
+ * @WEBKIT_FIND_OPTIONS_CASE_INSENSITIVE: case insensitive search.
+ * @WEBKIT_FIND_OPTIONS_AT_WORD_STARTS: search text only at the
+ *   begining of the words.
+ * @WEBKIT_FIND_OPTIONS_TREAT_MEDIAL_CAPITAL_AS_WORD_START: treat
+ *   capital letters in the middle of words as word start.
+ * @WEBKIT_FIND_OPTIONS_BACKWARDS: search backwards.
+ * @WEBKIT_FIND_OPTIONS_WRAP_AROUND: if not present search will stop
+ *   at the end of the document.
+ *
+ * Enum values used to specify search options.
+ */
+typedef enum {
+  WEBKIT_FIND_OPTIONS_NONE,
+
+  WEBKIT_FIND_OPTIONS_CASE_INSENSITIVE =                   1 << 0,
+  WEBKIT_FIND_OPTIONS_AT_WORD_STARTS =                     1 << 1,
+  WEBKIT_FIND_OPTIONS_TREAT_MEDIAL_CAPITAL_AS_WORD_START = 1 << 2,
+  WEBKIT_FIND_OPTIONS_BACKWARDS =                          1 << 3,
+  WEBKIT_FIND_OPTIONS_WRAP_AROUND =                        1 << 4
+} WebKitFindOptions;
+
+struct _WebKitFindController {
+    GObject parent;
+
+  /*< private >*/
+  WebKitFindControllerPrivate *priv;
+};
+
+struct _WebKitFindControllerClass {
+    GObjectClass parent_class;
+
+    void (*_webkit_reserved0) (void);
+    void (*_webkit_reserved1) (void);
+    void (*_webkit_reserved2) (void);
+    void (*_webkit_reserved3) (void);
+};
+
+WEBKIT_API GType
+webkit_find_controller_get_type            (void);
+
+WEBKIT_API void
+webkit_find_controller_search              (WebKitFindController *find_controller,
+                                            const gchar          *search_text,
+                                            guint32               find_options,
+                                            guint                 max_match_count);
+
+WEBKIT_API void
+webkit_find_controller_search_finish       (WebKitFindController *find_controller);
+
+WEBKIT_API void
+webkit_find_controller_search_next         (WebKitFindController *find_controller);
+
+WEBKIT_API void
+webkit_find_controller_search_previous     (WebKitFindController *find_controller);
+
+WEBKIT_API void
+webkit_find_controller_count_matches       (WebKitFindController *find_controller,
+                                            const gchar          *search_text,
+                                            guint32               find_options,
+                                            guint                 max_match_count);
+
+WEBKIT_API const gchar *
+webkit_find_controller_get_search_text     (WebKitFindController *find_controller);
+
+WEBKIT_API guint32
+webkit_find_controller_get_options         (WebKitFindController *find_controller);
+
+WEBKIT_API guint
+webkit_find_controller_get_max_match_count (WebKitFindController *find_controller);
+
+WEBKIT_API WebKitWebView *
+webkit_find_controller_get_web_view        (WebKitFindController *find_controller);
+
+G_END_DECLS
+
+#endif
diff --git a/Source/WebKit2/UIProcess/API/wpe/WebKitFormSubmissionRequest.h b/Source/WebKit2/UIProcess/API/wpe/WebKitFormSubmissionRequest.h
new file mode 100644 (file)
index 0000000..688c28c
--- /dev/null
@@ -0,0 +1,70 @@
+/*
+ * Copyright (C) 2012 Igalia S.L.
+ *
+ * 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.
+ */
+
+#if !defined(__WEBKIT_H_INSIDE__) && !defined(WEBKIT2_COMPILATION)
+#error "Only <wpe/webkit.h> can be included directly."
+#endif
+
+#ifndef WebKitFormSubmissionRequest_h
+#define WebKitFormSubmissionRequest_h
+
+#include <glib-object.h>
+#include <wpe/WebKitDefines.h>
+
+G_BEGIN_DECLS
+
+#define WEBKIT_TYPE_FORM_SUBMISSION_REQUEST            (webkit_form_submission_request_get_type())
+#define WEBKIT_FORM_SUBMISSION_REQUEST(obj)            (G_TYPE_CHECK_INSTANCE_CAST((obj), WEBKIT_TYPE_FORM_SUBMISSION_REQUEST, WebKitFormSubmissionRequest))
+#define WEBKIT_IS_FORM_SUBMISSION_REQUEST(obj)         (G_TYPE_CHECK_INSTANCE_TYPE((obj), WEBKIT_TYPE_FORM_SUBMISSION_REQUEST))
+#define WEBKIT_FORM_SUBMISSION_REQUEST_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST((klass),  WEBKIT_TYPE_FORM_SUBMISSION_REQUEST, WebKitFormSubmissionRequestClass))
+#define WEBKIT_IS_FORM_SUBMISSION_REQUEST_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass),  WEBKIT_TYPE_FORM_SUBMISSION_REQUEST))
+#define WEBKIT_FORM_SUBMISSION_REQUEST_GET_CLASS(obj)  (G_TYPE_INSTANCE_GET_CLASS((obj),  WEBKIT_TYPE_FORM_SUBMISSION_REQUEST, WebKitFormSubmissionRequestClass))
+
+typedef struct _WebKitFormSubmissionRequest        WebKitFormSubmissionRequest;
+typedef struct _WebKitFormSubmissionRequestClass   WebKitFormSubmissionRequestClass;
+typedef struct _WebKitFormSubmissionRequestPrivate WebKitFormSubmissionRequestPrivate;
+
+struct _WebKitFormSubmissionRequest {
+    GObject parent;
+
+    /*< private >*/
+    WebKitFormSubmissionRequestPrivate *priv;
+};
+
+struct _WebKitFormSubmissionRequestClass {
+    GObjectClass parent_class;
+
+    void (*_webkit_reserved0) (void);
+    void (*_webkit_reserved1) (void);
+    void (*_webkit_reserved2) (void);
+    void (*_webkit_reserved3) (void);
+};
+
+WEBKIT_API GType
+webkit_form_submission_request_get_type        (void);
+
+WEBKIT_API GHashTable *
+webkit_form_submission_request_get_text_fields (WebKitFormSubmissionRequest *request);
+
+WEBKIT_API void
+webkit_form_submission_request_submit          (WebKitFormSubmissionRequest *request);
+
+G_END_DECLS
+
+#endif
diff --git a/Source/WebKit2/UIProcess/API/wpe/WebKitGeolocationPermissionRequest.h b/Source/WebKit2/UIProcess/API/wpe/WebKitGeolocationPermissionRequest.h
new file mode 100644 (file)
index 0000000..d7c8a9d
--- /dev/null
@@ -0,0 +1,64 @@
+/*
+ * Copyright (C) 2012 Igalia S.L.
+ *
+ * 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.
+ */
+
+#if !defined(__WEBKIT_H_INSIDE__) && !defined(WEBKIT2_COMPILATION)
+#error "Only <wpe/webkit.h> can be included directly."
+#endif
+
+#ifndef WebKitGeolocationPermissionRequest_h
+#define WebKitGeolocationPermissionRequest_h
+
+#include <glib-object.h>
+#include <wpe/WebKitDefines.h>
+
+G_BEGIN_DECLS
+
+#define WEBKIT_TYPE_GEOLOCATION_PERMISSION_REQUEST            (webkit_geolocation_permission_request_get_type())
+#define WEBKIT_GEOLOCATION_PERMISSION_REQUEST(obj)            (G_TYPE_CHECK_INSTANCE_CAST((obj), WEBKIT_TYPE_GEOLOCATION_PERMISSION_REQUEST, WebKitGeolocationPermissionRequest))
+#define WEBKIT_GEOLOCATION_PERMISSION_REQUEST_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST((klass),  WEBKIT_TYPE_GEOLOCATION_PERMISSION_REQUEST, WebKitGeolocationPermissionRequestClass))
+#define WEBKIT_IS_GEOLOCATION_PERMISSION_REQUEST(obj)         (G_TYPE_CHECK_INSTANCE_TYPE((obj), WEBKIT_TYPE_GEOLOCATION_PERMISSION_REQUEST))
+#define WEBKIT_IS_GEOLOCATION_PERMISSION_REQUEST_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass),  WEBKIT_TYPE_GEOLOCATION_PERMISSION_REQUEST))
+#define WEBKIT_GEOLOCATION_PERMISSION_REQUEST_GET_CLASS(obj)  (G_TYPE_INSTANCE_GET_CLASS((obj),  WEBKIT_TYPE_GEOLOCATION_PERMISSION_REQUEST, WebKitGeolocationPermissionRequestClass))
+
+typedef struct _WebKitGeolocationPermissionRequest        WebKitGeolocationPermissionRequest;
+typedef struct _WebKitGeolocationPermissionRequestClass   WebKitGeolocationPermissionRequestClass;
+typedef struct _WebKitGeolocationPermissionRequestPrivate WebKitGeolocationPermissionRequestPrivate;
+
+struct _WebKitGeolocationPermissionRequest {
+    GObject parent;
+
+    /*< private >*/
+    WebKitGeolocationPermissionRequestPrivate *priv;
+};
+
+struct _WebKitGeolocationPermissionRequestClass {
+    GObjectClass parent_class;
+
+    void (*_webkit_reserved0) (void);
+    void (*_webkit_reserved1) (void);
+    void (*_webkit_reserved2) (void);
+    void (*_webkit_reserved3) (void);
+};
+
+WEBKIT_API GType
+webkit_geolocation_permission_request_get_type (void);
+
+G_END_DECLS
+
+#endif
diff --git a/Source/WebKit2/UIProcess/API/wpe/WebKitHitTestResult.h b/Source/WebKit2/UIProcess/API/wpe/WebKitHitTestResult.h
new file mode 100644 (file)
index 0000000..679aa07
--- /dev/null
@@ -0,0 +1,122 @@
+/*
+ * Copyright (C) 2012 Igalia S.L.
+ *
+ * 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.
+ */
+
+#if !defined(__WEBKIT_H_INSIDE__) && !defined(WEBKIT2_COMPILATION) && !defined(__WEBKIT_WEB_EXTENSION_H_INSIDE__)
+#error "Only <wpe/webkit.h> can be included directly."
+#endif
+
+#ifndef WebKitHitTestResult_h
+#define WebKitHitTestResult_h
+
+#include <glib-object.h>
+#include <wpe/WebKitDefines.h>
+
+G_BEGIN_DECLS
+
+#define WEBKIT_TYPE_HIT_TEST_RESULT            (webkit_hit_test_result_get_type())
+#define WEBKIT_HIT_TEST_RESULT(obj)            (G_TYPE_CHECK_INSTANCE_CAST((obj), WEBKIT_TYPE_HIT_TEST_RESULT, WebKitHitTestResult))
+#define WEBKIT_IS_HIT_TEST_RESULT(obj)         (G_TYPE_CHECK_INSTANCE_TYPE((obj), WEBKIT_TYPE_HIT_TEST_RESULT))
+#define WEBKIT_HIT_TEST_RESULT_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST((klass),  WEBKIT_TYPE_HIT_TEST_RESULT, WebKitHitTestResultClass))
+#define WEBKIT_IS_HIT_TEST_RESULT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass),  WEBKIT_TYPE_HIT_TEST_RESULT))
+#define WEBKIT_HIT_TEST_RESULT_GET_CLASS(obj)  (G_TYPE_INSTANCE_GET_CLASS((obj),  WEBKIT_TYPE_HIT_TEST_RESULT, WebKitHitTestResultClass))
+
+typedef struct _WebKitHitTestResult        WebKitHitTestResult;
+typedef struct _WebKitHitTestResultClass   WebKitHitTestResultClass;
+typedef struct _WebKitHitTestResultPrivate WebKitHitTestResultPrivate;
+
+/**
+ * WebKitHitTestResultContext:
+ * @WEBKIT_HIT_TEST_RESULT_CONTEXT_DOCUMENT: anywhere in the document.
+ * @WEBKIT_HIT_TEST_RESULT_CONTEXT_LINK: a hyperlink element.
+ * @WEBKIT_HIT_TEST_RESULT_CONTEXT_IMAGE: an image element.
+ * @WEBKIT_HIT_TEST_RESULT_CONTEXT_MEDIA: a video or audio element.
+ * @WEBKIT_HIT_TEST_RESULT_CONTEXT_EDITABLE: an editable element
+ * @WEBKIT_HIT_TEST_RESULT_CONTEXT_SCROLLBAR: a scrollbar element.
+ * @WEBKIT_HIT_TEST_RESULT_CONTEXT_SELECTION: a selected element. Since 2.8
+ *
+ * Enum values with flags representing the context of a #WebKitHitTestResult.
+ */
+typedef enum
+{
+    WEBKIT_HIT_TEST_RESULT_CONTEXT_DOCUMENT  = 1 << 1,
+    WEBKIT_HIT_TEST_RESULT_CONTEXT_LINK      = 1 << 2,
+    WEBKIT_HIT_TEST_RESULT_CONTEXT_IMAGE     = 1 << 3,
+    WEBKIT_HIT_TEST_RESULT_CONTEXT_MEDIA     = 1 << 4,
+    WEBKIT_HIT_TEST_RESULT_CONTEXT_EDITABLE  = 1 << 5,
+    WEBKIT_HIT_TEST_RESULT_CONTEXT_SCROLLBAR = 1 << 6,
+    WEBKIT_HIT_TEST_RESULT_CONTEXT_SELECTION = 1 << 7
+} WebKitHitTestResultContext;
+
+struct _WebKitHitTestResult {
+    GObject parent;
+
+    WebKitHitTestResultPrivate *priv;
+};
+
+struct _WebKitHitTestResultClass {
+    GObjectClass parent_class;
+
+    void (*_webkit_reserved0) (void);
+    void (*_webkit_reserved1) (void);
+    void (*_webkit_reserved2) (void);
+    void (*_webkit_reserved3) (void);
+};
+
+WEBKIT_API GType
+webkit_hit_test_result_get_type             (void);
+
+WEBKIT_API guint
+webkit_hit_test_result_get_context          (WebKitHitTestResult *hit_test_result);
+
+WEBKIT_API gboolean
+webkit_hit_test_result_context_is_link      (WebKitHitTestResult *hit_test_result);
+
+WEBKIT_API gboolean
+webkit_hit_test_result_context_is_image     (WebKitHitTestResult *hit_test_result);
+
+WEBKIT_API gboolean
+webkit_hit_test_result_context_is_media     (WebKitHitTestResult *hit_test_result);
+
+WEBKIT_API gboolean
+webkit_hit_test_result_context_is_editable  (WebKitHitTestResult *hit_test_result);
+
+WEBKIT_API gboolean
+webkit_hit_test_result_context_is_selection (WebKitHitTestResult *hit_test_result);
+
+WEBKIT_API const gchar *
+webkit_hit_test_result_get_link_uri         (WebKitHitTestResult *hit_test_result);
+
+WEBKIT_API const gchar *
+webkit_hit_test_result_get_link_title       (WebKitHitTestResult *hit_test_result);
+
+WEBKIT_API const gchar *
+webkit_hit_test_result_get_link_label       (WebKitHitTestResult *hit_test_result);
+
+WEBKIT_API const gchar *
+webkit_hit_test_result_get_image_uri        (WebKitHitTestResult *hit_test_result);
+
+WEBKIT_API const gchar *
+webkit_hit_test_result_get_media_uri        (WebKitHitTestResult *hit_test_result);
+
+WEBKIT_API gboolean
+webkit_hit_test_result_context_is_scrollbar (WebKitHitTestResult *hit_test_result);
+
+G_END_DECLS
+
+#endif
diff --git a/Source/WebKit2/UIProcess/API/wpe/WebKitInstallMissingMediaPluginsPermissionRequest.h b/Source/WebKit2/UIProcess/API/wpe/WebKitInstallMissingMediaPluginsPermissionRequest.h
new file mode 100644 (file)
index 0000000..51c2813
--- /dev/null
@@ -0,0 +1,66 @@
+/*
+ * Copyright (C) 2015 Igalia S.L.
+ *
+ * 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.
+ */
+
+#if !defined(__WEBKIT_H_INSIDE__) && !defined(WEBKIT2_COMPILATION)
+#error "Only <wpe/webkit.h> can be included directly."
+#endif
+
+#ifndef WebKitInstallMissingMediaPluginsPermissionRequest_h
+#define WebKitInstallMissingMediaPluginsPermissionRequest_h
+
+#include <glib-object.h>
+#include <wpe/WebKitDefines.h>
+
+G_BEGIN_DECLS
+
+#define WEBKIT_TYPE_INSTALL_MISSING_MEDIA_PLUGINS_PERMISSION_REQUEST            (webkit_install_missing_media_plugins_permission_request_get_type())
+#define WEBKIT_INSTALL_MISSING_MEDIA_PLUGINS_PERMISSION_REQUEST(obj)            (G_TYPE_CHECK_INSTANCE_CAST((obj), WEBKIT_TYPE_INSTALL_MISSING_MEDIA_PLUGINS_PERMISSION_REQUEST, WebKitInstallMissingMediaPluginsPermissionRequest))
+#define WEBKIT_IS_INSTALL_MISSING_MEDIA_PLUGINS_PERMISSION_REQUEST(obj)         (G_TYPE_CHECK_INSTANCE_TYPE((obj), WEBKIT_TYPE_INSTALL_MISSING_MEDIA_PLUGINS_PERMISSION_REQUEST))
+#define WEBKIT_INSTALL_MISSING_MEDIA_PLUGINS_PERMISSION_REQUEST_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST((klass),  WEBKIT_TYPE_INSTALL_MISSING_MEDIA_PLUGINS_PERMISSION_REQUEST, WebKitInstallMissingMediaPluginsPermissionRequestClass))
+#define WEBKIT_IS_INSTALL_MISSING_MEDIA_PLUGINS_PERMISSION_REQUEST_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass),  WEBKIT_TYPE_INSTALL_MISSING_MEDIA_PLUGINS_PERMISSION_REQUEST))
+#define WEBKIT_INSTALL_MISSING_MEDIA_PLUGINS_PERMISSION_REQUEST_GET_CLASS(obj)  (G_TYPE_INSTANCE_GET_CLASS((obj),  WEBKIT_TYPE_INSTALL_MISSING_MEDIA_PLUGINS_PERMISSION_REQUEST, WebKitInstallMissingMediaPluginsPermissionRequestClass))
+
+typedef struct _WebKitInstallMissingMediaPluginsPermissionRequest        WebKitInstallMissingMediaPluginsPermissionRequest;
+typedef struct _WebKitInstallMissingMediaPluginsPermissionRequestClass   WebKitInstallMissingMediaPluginsPermissionRequestClass;
+typedef struct _WebKitInstallMissingMediaPluginsPermissionRequestPrivate WebKitInstallMissingMediaPluginsPermissionRequestPrivate;
+
+struct _WebKitInstallMissingMediaPluginsPermissionRequest {
+    GObject parent;
+
+    WebKitInstallMissingMediaPluginsPermissionRequestPrivate *priv;
+};
+
+struct _WebKitInstallMissingMediaPluginsPermissionRequestClass {
+    GObjectClass parent_class;
+
+    void (*_webkit_reserved0) (void);
+    void (*_webkit_reserved1) (void);
+    void (*_webkit_reserved2) (void);
+    void (*_webkit_reserved3) (void);
+};
+
+WEBKIT_API GType
+webkit_install_missing_media_plugins_permission_request_get_type        (void);
+
+WEBKIT_API const gchar *
+webkit_install_missing_media_plugins_permission_request_get_description (WebKitInstallMissingMediaPluginsPermissionRequest *request);
+
+G_END_DECLS
+
+#endif
diff --git a/Source/WebKit2/UIProcess/API/wpe/WebKitJavascriptResult.h b/Source/WebKit2/UIProcess/API/wpe/WebKitJavascriptResult.h
new file mode 100644 (file)
index 0000000..263422e
--- /dev/null
@@ -0,0 +1,55 @@
+/*
+ * Copyright (C) 2012 Igalia S.L.
+ *
+ * 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.
+ */
+
+#if !defined(__WEBKIT_H_INSIDE__) && !defined(WEBKIT2_COMPILATION)
+#error "Only <wpe/webkit.h> can be included directly."
+#endif
+
+#ifndef WebKitJavascriptResult_h
+#define WebKitJavascriptResult_h
+
+#include <JavaScriptCore/JSBase.h>
+#include <glib-object.h>
+#include <wpe/WebKitDefines.h>
+
+G_BEGIN_DECLS
+
+#define WEBKIT_TYPE_JAVASCRIPT_RESULT (webkit_javascript_result_get_type())
+
+typedef struct _WebKitJavascriptResult WebKitJavascriptResult;
+
+
+WEBKIT_API GType
+webkit_javascript_result_get_type           (void);
+
+WEBKIT_API WebKitJavascriptResult *
+webkit_javascript_result_ref                (WebKitJavascriptResult *js_result);
+
+WEBKIT_API void
+webkit_javascript_result_unref              (WebKitJavascriptResult *js_result);
+
+WEBKIT_API JSGlobalContextRef
+webkit_javascript_result_get_global_context (WebKitJavascriptResult *js_result);
+
+WEBKIT_API JSValueRef
+webkit_javascript_result_get_value          (WebKitJavascriptResult *js_result);
+
+G_END_DECLS
+
+#endif
diff --git a/Source/WebKit2/UIProcess/API/wpe/WebKitMimeInfo.h b/Source/WebKit2/UIProcess/API/wpe/WebKitMimeInfo.h
new file mode 100644 (file)
index 0000000..2fc3926
--- /dev/null
@@ -0,0 +1,57 @@
+/*
+ * Copyright (C) 2012 Igalia S.L.
+ *
+ * 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.
+ */
+
+#if !defined(__WEBKIT_H_INSIDE__) && !defined(WEBKIT2_COMPILATION)
+#error "Only <wpe/webkit.h> can be included directly."
+#endif
+
+#ifndef WebKitMimeInfo_h
+#define WebKitMimeInfo_h
+
+#include <glib-object.h>
+#include <wpe/WebKitDefines.h>
+
+G_BEGIN_DECLS
+
+#define WEBKIT_TYPE_MIME_INFO (webkit_mime_info_get_type())
+
+typedef struct _WebKitMimeInfo WebKitMimeInfo;
+
+
+WEBKIT_API GType
+webkit_mime_info_get_type        (void);
+
+WEBKIT_API WebKitMimeInfo *
+webkit_mime_info_ref             (WebKitMimeInfo *info);
+
+WEBKIT_API void
+webkit_mime_info_unref           (WebKitMimeInfo *info);
+
+WEBKIT_API const gchar *
+webkit_mime_info_get_mime_type   (WebKitMimeInfo *info);
+
+WEBKIT_API const gchar *
+webkit_mime_info_get_description (WebKitMimeInfo *info);
+
+WEBKIT_API const gchar * const *
+webkit_mime_info_get_extensions  (WebKitMimeInfo *info);
+
+G_END_DECLS
+
+#endif
diff --git a/Source/WebKit2/UIProcess/API/wpe/WebKitNavigationAction.h b/Source/WebKit2/UIProcess/API/wpe/WebKitNavigationAction.h
new file mode 100644 (file)
index 0000000..1a4ff13
--- /dev/null
@@ -0,0 +1,84 @@
+/*
+ * Copyright (C) 2014 Igalia S.L.
+ *
+ * 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.
+ */
+
+#if !defined(__WEBKIT_H_INSIDE__) && !defined(WEBKIT2_COMPILATION)
+#error "Only <wpe/webkit.h> can be included directly."
+#endif
+
+#ifndef WebKitNavigationAction_h
+#define WebKitNavigationAction_h
+
+#include <glib-object.h>
+#include <wpe/WebKitDefines.h>
+#include <wpe/WebKitURIRequest.h>
+
+G_BEGIN_DECLS
+
+#define WEBKIT_TYPE_NAVIGATION_ACTION (webkit_navigation_action_get_type())
+
+/**
+ * WebKitNavigationType:
+ * @WEBKIT_NAVIGATION_TYPE_LINK_CLICKED: The navigation was triggered by clicking a link.
+ * @WEBKIT_NAVIGATION_TYPE_FORM_SUBMITTED: The navigation was triggered by submitting a form.
+ * @WEBKIT_NAVIGATION_TYPE_BACK_FORWARD: The navigation was triggered by navigating forward or backward.
+ * @WEBKIT_NAVIGATION_TYPE_RELOAD: The navigation was triggered by reloading.
+ * @WEBKIT_NAVIGATION_TYPE_FORM_RESUBMITTED: The navigation was triggered by resubmitting a form.
+ * @WEBKIT_NAVIGATION_TYPE_OTHER: The navigation was triggered by some other action.
+ *
+ * Enum values used to denote the various navigation types.
+ */
+typedef enum {
+    WEBKIT_NAVIGATION_TYPE_LINK_CLICKED,
+    WEBKIT_NAVIGATION_TYPE_FORM_SUBMITTED,
+    WEBKIT_NAVIGATION_TYPE_BACK_FORWARD,
+    WEBKIT_NAVIGATION_TYPE_RELOAD,
+    WEBKIT_NAVIGATION_TYPE_FORM_RESUBMITTED,
+    WEBKIT_NAVIGATION_TYPE_OTHER
+} WebKitNavigationType;
+
+typedef struct _WebKitNavigationAction WebKitNavigationAction;
+
+
+WEBKIT_API GType
+webkit_navigation_action_get_type            (void);
+
+WEBKIT_API WebKitNavigationAction *
+webkit_navigation_action_copy                (WebKitNavigationAction *navigation);
+
+WEBKIT_API void
+webkit_navigation_action_free                (WebKitNavigationAction *navigation);
+
+WEBKIT_API WebKitNavigationType
+webkit_navigation_action_get_navigation_type (WebKitNavigationAction *navigation);
+
+WEBKIT_API guint
+webkit_navigation_action_get_mouse_button    (WebKitNavigationAction *navigation);
+
+WEBKIT_API guint
+webkit_navigation_action_get_modifiers       (WebKitNavigationAction *navigation);
+
+WEBKIT_API WebKitURIRequest *
+webkit_navigation_action_get_request         (WebKitNavigationAction *navigation);
+
+WEBKIT_API gboolean
+webkit_navigation_action_is_user_gesture     (WebKitNavigationAction *navigation);
+
+G_END_DECLS
+
+#endif
diff --git a/Source/WebKit2/UIProcess/API/wpe/WebKitNavigationPolicyDecision.h b/Source/WebKit2/UIProcess/API/wpe/WebKitNavigationPolicyDecision.h
new file mode 100644 (file)
index 0000000..bdac5b9
--- /dev/null
@@ -0,0 +1,85 @@
+/*
+ * Copyright (C) 2012 Igalia S.L.
+ *
+ * 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.
+ */
+
+#if !defined(__WEBKIT_H_INSIDE__) && !defined(WEBKIT2_COMPILATION)
+#error "Only <wpe/webkit.h> can be included directly."
+#endif
+
+#ifndef WebKitNavigationPolicyDecision_h
+#define WebKitNavigationPolicyDecision_h
+
+#include <glib-object.h>
+#include <wpe/WebKitDefines.h>
+#include <wpe/WebKitNavigationAction.h>
+#include <wpe/WebKitPolicyDecision.h>
+#include <wpe/WebKitURIRequest.h>
+
+G_BEGIN_DECLS
+
+#define WEBKIT_TYPE_NAVIGATION_POLICY_DECISION            (webkit_navigation_policy_decision_get_type())
+#define WEBKIT_NAVIGATION_POLICY_DECISION(obj)            (G_TYPE_CHECK_INSTANCE_CAST((obj), WEBKIT_TYPE_NAVIGATION_POLICY_DECISION, WebKitNavigationPolicyDecision))
+#define WEBKIT_NAVIGATION_POLICY_DECISION_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST((klass),  WEBKIT_TYPE_NAVIGATION_POLICY_DECISION, WebKitNavigationPolicyDecisionClass))
+#define WEBKIT_IS_NAVIGATION_POLICY_DECISION(obj)         (G_TYPE_CHECK_INSTANCE_TYPE((obj), WEBKIT_TYPE_NAVIGATION_POLICY_DECISION))
+#define WEBKIT_IS_NAVIGATION_POLICY_DECISION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass),  WEBKIT_TYPE_NAVIGATION_POLICY_DECISION))
+#define WEBKIT_NAVIGATION_POLICY_DECISION_GET_CLASS(obj)  (G_TYPE_INSTANCE_GET_CLASS((obj),  WEBKIT_TYPE_NAVIGATION_POLICY_DECISION, WebKitNavigationPolicyDecisionClass))
+
+typedef struct _WebKitNavigationPolicyDecision        WebKitNavigationPolicyDecision;
+typedef struct _WebKitNavigationPolicyDecisionClass   WebKitNavigationPolicyDecisionClass;
+typedef struct _WebKitNavigationPolicyDecisionPrivate WebKitNavigationPolicyDecisionPrivate;
+
+struct _WebKitNavigationPolicyDecision {
+    WebKitPolicyDecision parent;
+
+    /*< private >*/
+    WebKitNavigationPolicyDecisionPrivate *priv;
+};
+
+struct _WebKitNavigationPolicyDecisionClass {
+    WebKitPolicyDecisionClass parent_class;
+
+    void (*_webkit_reserved0) (void);
+    void (*_webkit_reserved1) (void);
+    void (*_webkit_reserved2) (void);
+    void (*_webkit_reserved3) (void);
+};
+
+WEBKIT_API GType
+webkit_navigation_policy_decision_get_type            (void);
+
+WEBKIT_API WebKitNavigationAction *
+webkit_navigation_policy_decision_get_navigation_action (WebKitNavigationPolicyDecision *decision);
+
+WEBKIT_DEPRECATED_FOR(webkit_navigation_policy_decision_get_navigation_action) WebKitNavigationType
+webkit_navigation_policy_decision_get_navigation_type   (WebKitNavigationPolicyDecision *decision);
+
+WEBKIT_DEPRECATED_FOR(webkit_navigation_policy_decision_get_navigation_action) guint
+webkit_navigation_policy_decision_get_mouse_button      (WebKitNavigationPolicyDecision *decision);
+
+WEBKIT_DEPRECATED_FOR(webkit_navigation_policy_decision_get_navigation_action) guint
+webkit_navigation_policy_decision_get_modifiers         (WebKitNavigationPolicyDecision *decision);
+
+WEBKIT_DEPRECATED_FOR(webkit_navigation_policy_decision_get_navigation_action) WebKitURIRequest *
+webkit_navigation_policy_decision_get_request           (WebKitNavigationPolicyDecision *decision);
+
+WEBKIT_API const gchar *
+webkit_navigation_policy_decision_get_frame_name        (WebKitNavigationPolicyDecision *decision);
+
+G_END_DECLS
+
+#endif
diff --git a/Source/WebKit2/UIProcess/API/wpe/WebKitNetworkProxySettings.h b/Source/WebKit2/UIProcess/API/wpe/WebKitNetworkProxySettings.h
new file mode 100644 (file)
index 0000000..cb5657c
--- /dev/null
@@ -0,0 +1,56 @@
+/*
+ * Copyright (C) 2017 Igalia S.L.
+ *
+ * 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.
+ */
+
+#if !defined(__WEBKIT_H_INSIDE__) && !defined(WEBKIT2_COMPILATION)
+#error "Only <wpe/webkit.h> can be included directly."
+#endif
+
+#ifndef WebKitNetworkProxySettings_h
+#define WebKitNetworkProxySettings_h
+
+#include <glib-object.h>
+#include <wpe/WebKitDefines.h>
+
+G_BEGIN_DECLS
+
+#define WEBKIT_TYPE_NETWORK_NETWORK_PROXY_SETTINGS (webkit_network_proxy_settings_get_type())
+
+typedef struct _WebKitNetworkProxySettings WebKitNetworkProxySettings;
+
+WEBKIT_API GType
+webkit_network_proxy_settings_get_type             (void);
+
+WEBKIT_API WebKitNetworkProxySettings *
+webkit_network_proxy_settings_new                  (const gchar                *default_proxy_uri,
+                                                    const gchar* const         *ignore_hosts);
+
+WEBKIT_API WebKitNetworkProxySettings *
+webkit_network_proxy_settings_copy                 (WebKitNetworkProxySettings *proxy_settings);
+
+WEBKIT_API void
+webkit_network_proxy_settings_free                 (WebKitNetworkProxySettings *proxy_settings);
+
+WEBKIT_API void
+webkit_network_proxy_settings_add_proxy_for_scheme (WebKitNetworkProxySettings *proxy_settings,
+                                                    const gchar                *scheme,
+                                                    const gchar                *proxy_uri);
+
+G_END_DECLS
+
+#endif /* WebKitNetworkProxySettings_h */
diff --git a/Source/WebKit2/UIProcess/API/wpe/WebKitNotification.h b/Source/WebKit2/UIProcess/API/wpe/WebKitNotification.h
new file mode 100644 (file)
index 0000000..bab986d
--- /dev/null
@@ -0,0 +1,83 @@
+/*
+ * Copyright (C) 2014 Collabora Ltd.
+ *
+ * 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.
+ */
+
+#if !defined(__WEBKIT_H_INSIDE__) && !defined(WEBKIT2_COMPILATION)
+#error "Only <wpe/webkit.h> can be included directly."
+#endif
+
+#ifndef WebKitNotification_h
+#define WebKitNotification_h
+
+#include <glib-object.h>
+#include <wpe/WebKitDefines.h>
+
+G_BEGIN_DECLS
+
+#define WEBKIT_TYPE_NOTIFICATION            (webkit_notification_get_type())
+#define WEBKIT_NOTIFICATION(obj)            (G_TYPE_CHECK_INSTANCE_CAST((obj), WEBKIT_TYPE_NOTIFICATION, WebKitNotification))
+#define WEBKIT_IS_NOTIFICATION(obj)         (G_TYPE_CHECK_INSTANCE_TYPE((obj), WEBKIT_TYPE_NOTIFICATION))
+#define WEBKIT_NOTIFICATION_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST((klass),  WEBKIT_TYPE_NOTIFICATION, WebKitNotificationClass))
+#define WEBKIT_IS_NOTIFICATION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass),  WEBKIT_TYPE_NOTIFICATION))
+#define WEBKIT_NOTIFICATION_GET_CLASS(obj)  (G_TYPE_INSTANCE_GET_CLASS((obj),  WEBKIT_TYPE_NOTIFICATION, WebKitNotificationClass))
+
+typedef struct _WebKitNotification        WebKitNotification;
+typedef struct _WebKitNotificationClass   WebKitNotificationClass;
+typedef struct _WebKitNotificationPrivate WebKitNotificationPrivate;
+
+struct _WebKitNotification {
+    GObject parent;
+
+    WebKitNotificationPrivate *priv;
+};
+
+struct _WebKitNotificationClass {
+    GObjectClass parent_class;
+
+    void (*_webkit_reserved0) (void);
+    void (*_webkit_reserved1) (void);
+    void (*_webkit_reserved2) (void);
+    void (*_webkit_reserved3) (void);
+    void (*_webkit_reserved4) (void);
+    void (*_webkit_reserved5) (void);
+};
+
+WEBKIT_API GType
+webkit_notification_get_type                 (void);
+
+WEBKIT_API guint64
+webkit_notification_get_id                   (WebKitNotification *notification);
+
+WEBKIT_API const gchar *
+webkit_notification_get_title                (WebKitNotification *notification);
+
+WEBKIT_API const gchar *
+webkit_notification_get_body                 (WebKitNotification *notification);
+
+WEBKIT_API const gchar *
+webkit_notification_get_tag                  (WebKitNotification *notification);
+
+WEBKIT_API void
+webkit_notification_close                    (WebKitNotification *notification);
+
+WEBKIT_API void
+webkit_notification_clicked                  (WebKitNotification *notification);
+
+G_END_DECLS
+
+#endif
diff --git a/Source/WebKit2/UIProcess/API/wpe/WebKitNotificationPermissionRequest.h b/Source/WebKit2/UIProcess/API/wpe/WebKitNotificationPermissionRequest.h
new file mode 100644 (file)
index 0000000..6f6debb
--- /dev/null
@@ -0,0 +1,59 @@
+/*
+ * Copyright (C) 2013 Igalia S.L.
+ *
+ * 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.
+ */
+
+#if !defined(__WEBKIT_H_INSIDE__) && !defined(WEBKIT2_COMPILATION)
+#error "Only <wpe/webkit.h> can be included directly."
+#endif
+
+#ifndef WebKitNotificationPermissionRequest_h
+#define WebKitNotificationPermissionRequest_h
+
+#include <glib-object.h>
+#include <wpe/WebKitDefines.h>
+
+G_BEGIN_DECLS
+
+#define WEBKIT_TYPE_NOTIFICATION_PERMISSION_REQUEST            (webkit_notification_permission_request_get_type())
+#define WEBKIT_NOTIFICATION_PERMISSION_REQUEST(obj)            (G_TYPE_CHECK_INSTANCE_CAST((obj), WEBKIT_TYPE_NOTIFICATION_PERMISSION_REQUEST, WebKitNotificationPermissionRequest))
+#define WEBKIT_NOTIFICATION_PERMISSION_REQUEST_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST((klass),  WEBKIT_TYPE_NOTIFICATION_PERMISSION_REQUEST, WebKitNotificationPermissionRequestClass))
+#define WEBKIT_IS_NOTIFICATION_PERMISSION_REQUEST(obj)         (G_TYPE_CHECK_INSTANCE_TYPE((obj), WEBKIT_TYPE_NOTIFICATION_PERMISSION_REQUEST))
+#define WEBKIT_IS_NOTIFICATION_PERMISSION_REQUEST_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass),  WEBKIT_TYPE_NOTIFICATION_PERMISSION_REQUEST))
+#define WEBKIT_NOTIFICATION_PERMISSION_REQUEST_GET_CLASS(obj)  (G_TYPE_INSTANCE_GET_CLASS((obj),  WEBKIT_TYPE_NOTIFICATION_PERMISSION_REQUEST, WebKitNotificationPermissionRequestClass))
+
+typedef struct _WebKitNotificationPermissionRequest        WebKitNotificationPermissionRequest;
+typedef struct _WebKitNotificationPermissionRequestClass   WebKitNotificationPermissionRequestClass;
+typedef struct _WebKitNotificationPermissionRequestPrivate WebKitNotificationPermissionRequestPrivate;
+
+struct _WebKitNotificationPermissionRequest {
+    GObject parent;
+
+    /*< private >*/
+    WebKitNotificationPermissionRequestPrivate *priv;
+};
+
+struct _WebKitNotificationPermissionRequestClass {
+    GObjectClass parent_class;
+};
+
+WEBKIT_API GType
+webkit_notification_permission_request_get_type (void);
+
+G_END_DECLS
+
+#endif
diff --git a/Source/WebKit2/UIProcess/API/wpe/WebKitPermissionRequest.h b/Source/WebKit2/UIProcess/API/wpe/WebKitPermissionRequest.h
new file mode 100644 (file)
index 0000000..8ae7598
--- /dev/null
@@ -0,0 +1,58 @@
+/*
+ * Copyright (C) 2012 Igalia S.L.
+ *
+ * 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.
+ */
+
+#if !defined(__WEBKIT_H_INSIDE__) && !defined(WEBKIT2_COMPILATION)
+#error "Only <wpe/webkit.h> can be included directly."
+#endif
+
+#ifndef WebKitPermissionRequest_h
+#define WebKitPermissionRequest_h
+
+#include <glib-object.h>
+#include <wpe/WebKitDefines.h>
+
+G_BEGIN_DECLS
+
+#define WEBKIT_TYPE_PERMISSION_REQUEST           (webkit_permission_request_get_type())
+#define WEBKIT_PERMISSION_REQUEST(obj)           (G_TYPE_CHECK_INSTANCE_CAST((obj), WEBKIT_TYPE_PERMISSION_REQUEST, WebKitPermissionRequest))
+#define WEBKIT_IS_PERMISSION_REQUEST(obj)        (G_TYPE_CHECK_INSTANCE_TYPE((obj), WEBKIT_TYPE_PERMISSION_REQUEST))
+#define WEBKIT_PERMISSION_REQUEST_GET_IFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE((obj), WEBKIT_TYPE_PERMISSION_REQUEST, WebKitPermissionRequestIface))
+
+typedef struct _WebKitPermissionRequest WebKitPermissionRequest;
+typedef struct _WebKitPermissionRequestIface WebKitPermissionRequestIface;
+
+struct _WebKitPermissionRequestIface {
+    GTypeInterface parent_interface;
+
+    void (* allow) (WebKitPermissionRequest *request);
+    void (* deny)  (WebKitPermissionRequest *request);
+};
+
+WEBKIT_API GType
+webkit_permission_request_get_type (void);
+
+WEBKIT_API void
+webkit_permission_request_allow    (WebKitPermissionRequest *request);
+
+WEBKIT_API void
+webkit_permission_request_deny     (WebKitPermissionRequest *request);
+
+G_END_DECLS
+
+#endif
diff --git a/Source/WebKit2/UIProcess/API/wpe/WebKitPlugin.h b/Source/WebKit2/UIProcess/API/wpe/WebKitPlugin.h
new file mode 100644 (file)
index 0000000..15b6800
--- /dev/null
@@ -0,0 +1,75 @@
+/*
+ * Copyright (C) 2012 Igalia S.L.
+ *
+ * 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.
+ */
+
+#if !defined(__WEBKIT_H_INSIDE__) && !defined(WEBKIT2_COMPILATION)
+#error "Only <wpe/webkit.h> can be included directly."
+#endif
+
+#ifndef WebKitPlugin_h
+#define WebKitPlugin_h
+
+#include <glib-object.h>
+#include <wpe/WebKitDefines.h>
+
+G_BEGIN_DECLS
+
+#define WEBKIT_TYPE_PLUGIN            (webkit_plugin_get_type())
+#define WEBKIT_PLUGIN(obj)            (G_TYPE_CHECK_INSTANCE_CAST((obj), WEBKIT_TYPE_PLUGIN, WebKitPlugin))
+#define WEBKIT_IS_PLUGIN(obj)         (G_TYPE_CHECK_INSTANCE_TYPE((obj), WEBKIT_TYPE_PLUGIN))
+#define WEBKIT_PLUGIN_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST((klass),  WEBKIT_TYPE_PLUGIN, WebKitPluginClass))
+#define WEBKIT_IS_PLUGIN_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass),  WEBKIT_TYPE_PLUGIN))
+#define WEBKIT_PLUGIN_GET_CLASS(obj)  (G_TYPE_INSTANCE_GET_CLASS((obj),  WEBKIT_TYPE_PLUGIN, WebKitPluginClass))
+
+typedef struct _WebKitPlugin        WebKitPlugin;
+typedef struct _WebKitPluginClass   WebKitPluginClass;
+typedef struct _WebKitPluginPrivate WebKitPluginPrivate;
+
+struct _WebKitPlugin {
+    GObject parent;
+
+    WebKitPluginPrivate *priv;
+};
+
+struct _WebKitPluginClass {
+    GObjectClass parent_class;
+
+    void (*_webkit_reserved0) (void);
+    void (*_webkit_reserved1) (void);
+    void (*_webkit_reserved2) (void);
+    void (*_webkit_reserved3) (void);
+};
+
+WEBKIT_API GType
+webkit_plugin_get_type           (void);
+
+WEBKIT_API const gchar *
+webkit_plugin_get_name           (WebKitPlugin *plugin);
+
+WEBKIT_API const gchar *
+webkit_plugin_get_description    (WebKitPlugin *plugin);
+
+WEBKIT_API const gchar *
+webkit_plugin_get_path           (WebKitPlugin *plugin);
+
+WEBKIT_API GList *
+webkit_plugin_get_mime_info_list (WebKitPlugin *plugin);
+
+G_END_DECLS
+
+#endif
diff --git a/Source/WebKit2/UIProcess/API/wpe/WebKitPolicyDecision.h b/Source/WebKit2/UIProcess/API/wpe/WebKitPolicyDecision.h
new file mode 100644 (file)
index 0000000..bfffed1
--- /dev/null
@@ -0,0 +1,73 @@
+/*
+ * Copyright (C) 2012 Igalia S.L.
+ *
+ * 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.
+ */
+
+#if !defined(__WEBKIT_H_INSIDE__) && !defined(WEBKIT2_COMPILATION)
+#error "Only <wpe/webkit.h> can be included directly."
+#endif
+
+#ifndef WebKitPolicyDecision_h
+#define WebKitPolicyDecision_h
+
+#include <glib-object.h>
+#include <wpe/WebKitDefines.h>
+
+G_BEGIN_DECLS
+
+#define WEBKIT_TYPE_POLICY_DECISION            (webkit_policy_decision_get_type())
+#define WEBKIT_POLICY_DECISION(obj)            (G_TYPE_CHECK_INSTANCE_CAST((obj), WEBKIT_TYPE_POLICY_DECISION, WebKitPolicyDecision))
+#define WEBKIT_POLICY_DECISION_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST((klass),  WEBKIT_TYPE_POLICY_DECISION, WebKitPolicyDecisionClass))
+#define WEBKIT_IS_POLICY_DECISION(obj)         (G_TYPE_CHECK_INSTANCE_TYPE((obj), WEBKIT_TYPE_POLICY_DECISION))
+#define WEBKIT_IS_POLICY_DECISION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass),  WEBKIT_TYPE_POLICY_DECISION))
+#define WEBKIT_POLICY_DECISION_GET_CLASS(obj)  (G_TYPE_INSTANCE_GET_CLASS((obj),  WEBKIT_TYPE_POLICY_DECISION, WebKitPolicyDecisionClass))
+
+typedef struct _WebKitPolicyDecision        WebKitPolicyDecision;
+typedef struct _WebKitPolicyDecisionClass   WebKitPolicyDecisionClass;
+typedef struct _WebKitPolicyDecisionPrivate WebKitPolicyDecisionPrivate;
+
+struct _WebKitPolicyDecision {
+    GObject parent;
+
+    /*< private >*/
+    WebKitPolicyDecisionPrivate *priv;
+};
+
+struct _WebKitPolicyDecisionClass {
+    GObjectClass parent_class;
+
+    void (*_webkit_reserved0) (void);
+    void (*_webkit_reserved1) (void);
+    void (*_webkit_reserved2) (void);
+    void (*_webkit_reserved3) (void);
+};
+
+WEBKIT_API GType
+webkit_policy_decision_get_type (void);
+
+WEBKIT_API void
+webkit_policy_decision_use      (WebKitPolicyDecision *decision);
+
+WEBKIT_API void
+webkit_policy_decision_ignore   (WebKitPolicyDecision *decision);
+
+WEBKIT_API void
+webkit_policy_decision_download (WebKitPolicyDecision *decision);
+
+G_END_DECLS
+
+#endif
diff --git a/Source/WebKit2/UIProcess/API/wpe/WebKitResponsePolicyDecision.h b/Source/WebKit2/UIProcess/API/wpe/WebKitResponsePolicyDecision.h
new file mode 100644 (file)
index 0000000..defd002
--- /dev/null
@@ -0,0 +1,76 @@
+/*
+ * Copyright (C) 2012 Igalia S.L.
+ *
+ * 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.
+ */
+
+#if !defined(__WEBKIT_H_INSIDE__) && !defined(WEBKIT2_COMPILATION)
+#error "Only <wpe/webkit.h> can be included directly."
+#endif
+
+#ifndef WebKitResponsePolicyDecision_h
+#define WebKitResponsePolicyDecision_h
+
+#include <glib-object.h>
+#include <wpe/WebKitDefines.h>
+#include <wpe/WebKitPolicyDecision.h>
+#include <wpe/WebKitURIResponse.h>
+#include <wpe/WebKitURIRequest.h>
+
+G_BEGIN_DECLS
+
+#define WEBKIT_TYPE_RESPONSE_POLICY_DECISION            (webkit_response_policy_decision_get_type())
+#define WEBKIT_RESPONSE_POLICY_DECISION(obj)            (G_TYPE_CHECK_INSTANCE_CAST((obj), WEBKIT_TYPE_RESPONSE_POLICY_DECISION, WebKitResponsePolicyDecision))
+#define WEBKIT_RESPONSE_POLICY_DECISION_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST((klass),  WEBKIT_TYPE_RESPONSE_POLICY_DECISION, WebKitResponsePolicyDecisionClass))
+#define WEBKIT_IS_RESPONSE_POLICY_DECISION(obj)         (G_TYPE_CHECK_INSTANCE_TYPE((obj), WEBKIT_TYPE_RESPONSE_POLICY_DECISION))
+#define WEBKIT_IS_RESPONSE_POLICY_DECISION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass),  WEBKIT_TYPE_RESPONSE_POLICY_DECISION))
+#define WEBKIT_RESPONSE_POLICY_DECISION_GET_CLASS(obj)  (G_TYPE_INSTANCE_GET_CLASS((obj),  WEBKIT_TYPE_RESPONSE_POLICY_DECISION, WebKitResponsePolicyDecisionClass))
+
+typedef struct _WebKitResponsePolicyDecision        WebKitResponsePolicyDecision;
+typedef struct _WebKitResponsePolicyDecisionClass   WebKitResponsePolicyDecisionClass;
+typedef struct _WebKitResponsePolicyDecisionPrivate WebKitResponsePolicyDecisionPrivate;
+
+struct _WebKitResponsePolicyDecision {
+    WebKitPolicyDecision parent;
+
+    /*< private >*/
+    WebKitResponsePolicyDecisionPrivate *priv;
+};
+
+struct _WebKitResponsePolicyDecisionClass {
+    WebKitPolicyDecisionClass parent_class;
+
+    void (*_webkit_reserved0) (void);
+    void (*_webkit_reserved1) (void);
+    void (*_webkit_reserved2) (void);
+    void (*_webkit_reserved3) (void);
+};
+
+WEBKIT_API GType
+webkit_response_policy_decision_get_type               (void);
+
+WEBKIT_API WebKitURIRequest *
+webkit_response_policy_decision_get_request            (WebKitResponsePolicyDecision *decision);
+
+WEBKIT_API WebKitURIResponse *
+webkit_response_policy_decision_get_response           (WebKitResponsePolicyDecision *decision);
+
+WEBKIT_API gboolean
+webkit_response_policy_decision_is_mime_type_supported (WebKitResponsePolicyDecision *decision);
+
+G_END_DECLS
+
+#endif
diff --git a/Source/WebKit2/UIProcess/API/wpe/WebKitScriptDialog.h b/Source/WebKit2/UIProcess/API/wpe/WebKitScriptDialog.h
new file mode 100644 (file)
index 0000000..f50dabe
--- /dev/null
@@ -0,0 +1,78 @@
+/*
+ * Copyright (C) 2012 Igalia S.L.
+ *
+ * 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.
+ */
+
+#if !defined(__WEBKIT_H_INSIDE__) && !defined(WEBKIT2_COMPILATION)
+#error "Only <wpe/webkit.h> can be included directly."
+#endif
+
+#ifndef WebKitScriptDialog_h
+#define WebKitScriptDialog_h
+
+#include <glib-object.h>
+#include <wpe/WebKitDefines.h>
+
+G_BEGIN_DECLS
+
+#define WEBKIT_TYPE_SCRIPT_DIALOG (webkit_script_dialog_get_type())
+
+typedef struct _WebKitScriptDialog WebKitScriptDialog;
+
+/**
+ * WebKitScriptDialogType:
+ * @WEBKIT_SCRIPT_DIALOG_ALERT: Alert script dialog, used to show a
+ * message to the user.
+ * @WEBKIT_SCRIPT_DIALOG_CONFIRM: Confirm script dialog, used to ask
+ * confirmation to the user.
+ * @WEBKIT_SCRIPT_DIALOG_PROMPT: Prompt script dialog, used to ask
+ * information to the user.
+ * @WEBKIT_SCRIPT_DIALOG_BEFORE_UNLOAD_CONFIRM: Before unload confirm dialog,
+ * used to ask confirmation to leave the current page to the user. Since 2.12
+ *
+ * Enum values used for determining the type of #WebKitScriptDialog
+ */
+typedef enum {
+    WEBKIT_SCRIPT_DIALOG_ALERT,
+    WEBKIT_SCRIPT_DIALOG_CONFIRM,
+    WEBKIT_SCRIPT_DIALOG_PROMPT,
+    WEBKIT_SCRIPT_DIALOG_BEFORE_UNLOAD_CONFIRM
+} WebKitScriptDialogType;
+
+WEBKIT_API GType
+webkit_script_dialog_get_type                (void);
+
+WEBKIT_API WebKitScriptDialogType
+webkit_script_dialog_get_dialog_type         (WebKitScriptDialog *dialog);
+
+WEBKIT_API const gchar *
+webkit_script_dialog_get_message             (WebKitScriptDialog *dialog);
+
+WEBKIT_API void
+webkit_script_dialog_confirm_set_confirmed   (WebKitScriptDialog *dialog,
+                                              gboolean            confirmed);
+
+WEBKIT_API const gchar *
+webkit_script_dialog_prompt_get_default_text (WebKitScriptDialog *dialog);
+
+WEBKIT_API void
+webkit_script_dialog_prompt_set_text         (WebKitScriptDialog *dialog,
+                                              const gchar        *text);
+
+G_END_DECLS
+
+#endif
diff --git a/Source/WebKit2/UIProcess/API/wpe/WebKitSecurityManager.h b/Source/WebKit2/UIProcess/API/wpe/WebKitSecurityManager.h
new file mode 100644 (file)
index 0000000..982284d
--- /dev/null
@@ -0,0 +1,111 @@
+/*
+ * Copyright (C) 2012 Igalia S.L.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2,1 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.
+ */
+
+#if !defined(__WEBKIT_H_INSIDE__) && !defined(WEBKIT2_COMPILATION)
+#error "Only <wpe/webkit.h> can be included directly."
+#endif
+
+#ifndef WebKitSecurityManager_h
+#define WebKitSecurityManager_h
+
+#include <glib-object.h>
+#include <wpe/WebKitDefines.h>
+
+G_BEGIN_DECLS
+
+#define WEBKIT_TYPE_SECURITY_MANAGER            (webkit_security_manager_get_type())
+#define WEBKIT_SECURITY_MANAGER(obj)            (G_TYPE_CHECK_INSTANCE_CAST((obj), WEBKIT_TYPE_SECURITY_MANAGER, WebKitSecurityManager))
+#define WEBKIT_IS_SECURITY_MANAGER(obj)         (G_TYPE_CHECK_INSTANCE_TYPE((obj), WEBKIT_TYPE_SECURITY_MANAGER))
+#define WEBKIT_SECURITY_MANAGER_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST((klass),  WEBKIT_TYPE_SECURITY_MANAGER, WebKitSecurityManagerClass))
+#define WEBKIT_IS_SECURITY_MANAGER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass),  WEBKIT_TYPE_SECURITY_MANAGER))
+#define WEBKIT_SECURITY_MANAGER_GET_CLASS(obj)  (G_TYPE_INSTANCE_GET_CLASS((obj),  WEBKIT_TYPE_SECURITY_MANAGER, WebKitSecurityManagerClass))
+
+typedef struct _WebKitSecurityManager        WebKitSecurityManager;
+typedef struct _WebKitSecurityManagerClass   WebKitSecurityManagerClass;
+typedef struct _WebKitSecurityManagerPrivate WebKitSecurityManagerPrivate;
+
+struct _WebKitSecurityManager {
+    GObject parent;
+
+    WebKitSecurityManagerPrivate *priv;
+};
+
+struct _WebKitSecurityManagerClass {
+    GObjectClass parent_class;
+
+    void (*_webkit_reserved0) (void);
+    void (*_webkit_reserved1) (void);
+    void (*_webkit_reserved2) (void);
+    void (*_webkit_reserved3) (void);
+};
+
+WEBKIT_API GType
+webkit_security_manager_get_type                                (void);
+
+WEBKIT_API void
+webkit_security_manager_register_uri_scheme_as_local            (WebKitSecurityManager *security_manager,
+                                                                 const gchar           *scheme);
+
+WEBKIT_API gboolean
+webkit_security_manager_uri_scheme_is_local                     (WebKitSecurityManager *security_manager,
+                                                                 const gchar           *scheme);
+
+WEBKIT_API void
+webkit_security_manager_register_uri_scheme_as_no_access        (WebKitSecurityManager *security_manager,
+                                                                 const gchar           *scheme);
+
+WEBKIT_API gboolean
+webkit_security_manager_uri_scheme_is_no_access                 (WebKitSecurityManager *security_manager,
+                                                                 const gchar           *scheme);
+
+WEBKIT_API void
+webkit_security_manager_register_uri_scheme_as_display_isolated (WebKitSecurityManager *security_manager,
+                                                                 const gchar           *scheme);
+
+WEBKIT_API gboolean
+webkit_security_manager_uri_scheme_is_display_isolated          (WebKitSecurityManager *security_manager,
+                                                                 const gchar           *scheme);
+
+WEBKIT_API void
+webkit_security_manager_register_uri_scheme_as_secure           (WebKitSecurityManager *security_manager,
+                                                                 const gchar           *scheme);
+
+WEBKIT_API gboolean
+webkit_security_manager_uri_scheme_is_secure                    (WebKitSecurityManager *security_manager,
+                                                                 const gchar           *scheme);
+
+WEBKIT_API void
+webkit_security_manager_register_uri_scheme_as_cors_enabled     (WebKitSecurityManager *security_manager,
+                                                                 const gchar           *scheme);
+
+WEBKIT_API gboolean
+webkit_security_manager_uri_scheme_is_cors_enabled              (WebKitSecurityManager *security_manager,
+                                                                 const gchar           *scheme);
+
+WEBKIT_API void
+webkit_security_manager_register_uri_scheme_as_empty_document   (WebKitSecurityManager *security_manager,
+                                                                 const gchar           *scheme);
+
+WEBKIT_API gboolean
+webkit_security_manager_uri_scheme_is_empty_document            (WebKitSecurityManager *security_manager,
+                                                                 const gchar           *scheme);
+
+G_END_DECLS
+
+#endif
diff --git a/Source/WebKit2/UIProcess/API/wpe/WebKitSecurityOrigin.h b/Source/WebKit2/UIProcess/API/wpe/WebKitSecurityOrigin.h
new file mode 100644 (file)
index 0000000..80e0452
--- /dev/null
@@ -0,0 +1,70 @@
+/*
+ * Copyright (C) 2017 Igalia S.L.
+ *
+ * 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.
+ */
+
+#if !defined(__WEBKIT_H_INSIDE__) && !defined(WEBKIT2_COMPILATION)
+#error "Only <wpe/webkit.h> can be included directly."
+#endif
+
+#ifndef WebKitSecurityOrigin_h
+#define WebKitSecurityOrigin_h
+
+#include <glib-object.h>
+#include <wpe/WebKitDefines.h>
+
+G_BEGIN_DECLS
+
+#define WEBKIT_TYPE_SECURITY_ORIGIN (webkit_security_origin_get_type())
+
+typedef struct _WebKitSecurityOrigin WebKitSecurityOrigin;
+
+WEBKIT_API GType
+webkit_security_origin_get_type     (void);
+
+WEBKIT_API WebKitSecurityOrigin *
+webkit_security_origin_new          (const gchar          *protocol,
+                                     const gchar          *host,
+                                     guint16               port);
+
+WEBKIT_API WebKitSecurityOrigin *
+webkit_security_origin_new_for_uri  (const gchar          *uri);
+
+WEBKIT_API WebKitSecurityOrigin *
+webkit_security_origin_ref          (WebKitSecurityOrigin *origin);
+
+WEBKIT_API void
+webkit_security_origin_unref        (WebKitSecurityOrigin *origin);
+
+WEBKIT_API const gchar *
+webkit_security_origin_get_protocol (WebKitSecurityOrigin *origin);
+
+WEBKIT_API const gchar *
+webkit_security_origin_get_host     (WebKitSecurityOrigin *origin);
+
+WEBKIT_API guint16
+webkit_security_origin_get_port     (WebKitSecurityOrigin *origin);
+
+WEBKIT_API gboolean
+webkit_security_origin_is_opaque    (WebKitSecurityOrigin *origin);
+
+WEBKIT_API gchar *
+webkit_security_origin_to_string    (WebKitSecurityOrigin *origin);
+
+G_END_DECLS
+
+#endif /* WebKitSecurityOrigin_h */
diff --git a/Source/WebKit2/UIProcess/API/wpe/WebKitSettings.h b/Source/WebKit2/UIProcess/API/wpe/WebKitSettings.h
new file mode 100644 (file)
index 0000000..7bd4612
--- /dev/null
@@ -0,0 +1,433 @@
+/*
+ * Copyright (c) 2011 Motorola Mobility, 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 Motorola Mobility, 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 HOLDER 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.
+ */
+
+#if !defined(__WEBKIT_H_INSIDE__) && !defined(WEBKIT2_COMPILATION)
+#error "Only <wpe/webkit.h> can be included directly."
+#endif
+
+#ifndef WebKitSettings_h
+#define WebKitSettings_h
+
+#include <glib-object.h>
+#include <wpe/WebKitDefines.h>
+
+G_BEGIN_DECLS
+
+#define WEBKIT_TYPE_SETTINGS            (webkit_settings_get_type())
+#define WEBKIT_SETTINGS(obj)            (G_TYPE_CHECK_INSTANCE_CAST((obj), WEBKIT_TYPE_SETTINGS, WebKitSettings))
+#define WEBKIT_SETTINGS_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST((klass),  WEBKIT_TYPE_SETTINGS, WebKitSettingsClass))
+#define WEBKIT_IS_SETTINGS(obj)         (G_TYPE_CHECK_INSTANCE_TYPE((obj), WEBKIT_TYPE_SETTINGS))
+#define WEBKIT_IS_SETTINGS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass),  WEBKIT_TYPE_SETTINGS))
+#define WEBKIT_SETTINGS_GET_CLASS(obj)  (G_TYPE_INSTANCE_GET_CLASS((obj),  WEBKIT_TYPE_SETTINGS, WebKitSettingsClass))
+
+typedef struct _WebKitSettings WebKitSettings;
+typedef struct _WebKitSettingsClass WebKitSettingsClass;
+typedef struct _WebKitSettingsPrivate WebKitSettingsPrivate;
+
+struct _WebKitSettings {
+    GObject parent_instance;
+
+    WebKitSettingsPrivate *priv;
+};
+
+struct _WebKitSettingsClass {
+    GObjectClass parent_class;
+
+    void (*_webkit_reserved0) (void);
+    void (*_webkit_reserved1) (void);
+    void (*_webkit_reserved2) (void);
+    void (*_webkit_reserved3) (void);
+};
+
+WEBKIT_API GType
+webkit_settings_get_type(void);
+
+WEBKIT_API WebKitSettings *
+webkit_settings_new                                            (void);
+
+WEBKIT_API WebKitSettings *
+webkit_settings_new_with_settings                              (const gchar    *first_setting_name,
+                                                                ...);
+
+WEBKIT_API gboolean
+webkit_settings_get_enable_javascript                          (WebKitSettings *settings);
+
+WEBKIT_API void
+webkit_settings_set_enable_javascript                          (WebKitSettings *settings,
+                                                                gboolean        enabled);
+
+WEBKIT_API gboolean
+webkit_settings_get_auto_load_images                           (WebKitSettings *settings);
+
+WEBKIT_API void
+webkit_settings_set_auto_load_images                           (WebKitSettings *settings,
+                                                                gboolean        enabled);
+
+WEBKIT_API gboolean
+webkit_settings_get_load_icons_ignoring_image_load_setting     (WebKitSettings *settings);
+
+WEBKIT_API void
+webkit_settings_set_load_icons_ignoring_image_load_setting     (WebKitSettings *settings,
+                                                                gboolean        enabled);
+
+WEBKIT_API gboolean
+webkit_settings_get_enable_offline_web_application_cache       (WebKitSettings *settings);
+
+WEBKIT_API void
+webkit_settings_set_enable_offline_web_application_cache       (WebKitSettings *settings,
+                                                                gboolean        enabled);
+
+WEBKIT_API gboolean
+webkit_settings_get_enable_html5_local_storage                 (WebKitSettings *settings);
+
+WEBKIT_API void
+webkit_settings_set_enable_html5_local_storage                 (WebKitSettings *settings,
+                                                                gboolean        enabled);
+
+WEBKIT_API gboolean
+webkit_settings_get_enable_html5_database                      (WebKitSettings *settings);
+
+WEBKIT_API void
+webkit_settings_set_enable_html5_database                      (WebKitSettings *settings,
+                                                                gboolean        enabled);
+WEBKIT_API gboolean
+webkit_settings_get_enable_xss_auditor                         (WebKitSettings *settings);
+
+WEBKIT_API void
+webkit_settings_set_enable_xss_auditor                         (WebKitSettings *settings,
+                                                                gboolean        enabled);
+
+WEBKIT_API gboolean
+webkit_settings_get_enable_frame_flattening                    (WebKitSettings *settings);
+
+WEBKIT_API void
+webkit_settings_set_enable_frame_flattening                    (WebKitSettings *settings,
+                                                                gboolean        enabled);
+
+WEBKIT_API gboolean
+webkit_settings_get_enable_plugins                             (WebKitSettings *settings);
+
+WEBKIT_API void
+webkit_settings_set_enable_plugins                             (WebKitSettings *settings,
+                                                                gboolean        enabled);
+
+WEBKIT_API gboolean
+webkit_settings_get_enable_java                                (WebKitSettings *settings);
+
+WEBKIT_API void
+webkit_settings_set_enable_java                                (WebKitSettings *settings,
+                                                                gboolean        enabled);
+
+WEBKIT_API gboolean
+webkit_settings_get_javascript_can_open_windows_automatically  (WebKitSettings *settings);
+
+WEBKIT_API void
+webkit_settings_set_javascript_can_open_windows_automatically  (WebKitSettings *settings,
+                                                                gboolean        enabled);
+
+WEBKIT_API gboolean
+webkit_settings_get_enable_hyperlink_auditing                  (WebKitSettings *settings);
+
+WEBKIT_API void
+webkit_settings_set_enable_hyperlink_auditing                  (WebKitSettings *settings,
+                                                                gboolean        enabled);
+
+WEBKIT_API const gchar *
+webkit_settings_get_default_font_family                        (WebKitSettings *settings);
+
+WEBKIT_API void
+webkit_settings_set_default_font_family                        (WebKitSettings *settings,
+                                                                const gchar    *default_font_family);
+
+WEBKIT_API const gchar *
+webkit_settings_get_monospace_font_family                      (WebKitSettings *settings);
+
+WEBKIT_API void
+webkit_settings_set_monospace_font_family                      (WebKitSettings *settings,
+                                                                const gchar    *monospace_font_family);
+
+WEBKIT_API const gchar *
+webkit_settings_get_serif_font_family                          (WebKitSettings *settings);
+
+WEBKIT_API void
+webkit_settings_set_serif_font_family                          (WebKitSettings *settings,
+                                                                const gchar    *serif_font_family);
+
+WEBKIT_API const gchar *
+webkit_settings_get_sans_serif_font_family                     (WebKitSettings *settings);
+
+WEBKIT_API void
+webkit_settings_set_sans_serif_font_family                     (WebKitSettings *settings,
+                                                                const gchar    *sans_serif_font_family);
+
+WEBKIT_API const gchar *
+webkit_settings_get_cursive_font_family                        (WebKitSettings *settings);
+
+WEBKIT_API void
+webkit_settings_set_cursive_font_family                        (WebKitSettings *settings,
+                                                                const gchar    *cursive_font_family);
+
+WEBKIT_API const gchar *
+webkit_settings_get_fantasy_font_family                        (WebKitSettings *settings);
+
+WEBKIT_API void
+webkit_settings_set_fantasy_font_family                        (WebKitSettings *settings,
+                                                                const gchar    *fantasy_font_family);
+
+WEBKIT_API const gchar *
+webkit_settings_get_pictograph_font_family                     (WebKitSettings *settings);
+
+WEBKIT_API void
+webkit_settings_set_pictograph_font_family                     (WebKitSettings *settings,
+                                                                const gchar    *pictograph_font_family);
+
+WEBKIT_API guint32
+webkit_settings_get_default_font_size                          (WebKitSettings *settings);
+
+WEBKIT_API void
+webkit_settings_set_default_font_size                          (WebKitSettings *settings,
+                                                                guint32         font_size);
+
+WEBKIT_API guint32
+webkit_settings_get_default_monospace_font_size                (WebKitSettings *settings);
+
+WEBKIT_API void
+webkit_settings_set_default_monospace_font_size                (WebKitSettings *settings,
+                                                                guint32         font_size);
+
+WEBKIT_API guint32
+webkit_settings_get_minimum_font_size                          (WebKitSettings *settings);
+
+WEBKIT_API void
+webkit_settings_set_minimum_font_size                          (WebKitSettings *settings,
+                                                                guint32         font_size);
+
+WEBKIT_API const gchar *
+webkit_settings_get_default_charset                            (WebKitSettings *settings);
+
+WEBKIT_API void
+webkit_settings_set_default_charset                            (WebKitSettings *settings,
+                                                                const gchar    *default_charset);
+
+WEBKIT_DEPRECATED gboolean
+webkit_settings_get_enable_private_browsing                    (WebKitSettings *settings);
+
+WEBKIT_DEPRECATED void
+webkit_settings_set_enable_private_browsing                    (WebKitSettings *settings,
+                                                                gboolean        enabled);
+
+WEBKIT_API gboolean
+webkit_settings_get_enable_developer_extras                    (WebKitSettings *settings);
+
+WEBKIT_API void
+webkit_settings_set_enable_developer_extras                    (WebKitSettings *settings,
+                                                                gboolean        enabled);
+
+WEBKIT_API gboolean
+webkit_settings_get_enable_resizable_text_areas                (WebKitSettings *settings);
+
+WEBKIT_API void
+webkit_settings_set_enable_resizable_text_areas                (WebKitSettings *settings,
+                                                                gboolean        enabled);
+
+WEBKIT_API gboolean
+webkit_settings_get_enable_tabs_to_links                       (WebKitSettings *settings);
+
+WEBKIT_API void
+webkit_settings_set_enable_tabs_to_links                       (WebKitSettings *settings,
+                                                                gboolean        enabled);
+
+WEBKIT_API gboolean
+webkit_settings_get_enable_dns_prefetching                     (WebKitSettings *settings);
+
+WEBKIT_API void
+webkit_settings_set_enable_dns_prefetching                     (WebKitSettings *settings,
+                                                                gboolean        enabled);
+
+WEBKIT_API gboolean
+webkit_settings_get_enable_caret_browsing                      (WebKitSettings *settings);
+
+WEBKIT_API void
+webkit_settings_set_enable_caret_browsing                      (WebKitSettings *settings,
+                                                                gboolean        enabled);
+
+WEBKIT_API gboolean
+webkit_settings_get_enable_fullscreen                          (WebKitSettings *settings);
+
+WEBKIT_API void
+webkit_settings_set_enable_fullscreen                          (WebKitSettings *settings,
+                                                                gboolean        enabled);
+
+WEBKIT_API gboolean
+webkit_settings_get_print_backgrounds                          (WebKitSettings *settings);
+
+WEBKIT_API void
+webkit_settings_set_print_backgrounds                          (WebKitSettings *settings,
+                                                                gboolean        print_backgrounds);
+
+WEBKIT_API gboolean
+webkit_settings_get_enable_webaudio                            (WebKitSettings *settings);
+
+WEBKIT_API void
+webkit_settings_set_enable_webaudio                            (WebKitSettings *settings,
+                                                                gboolean        enabled);
+
+WEBKIT_API gboolean
+webkit_settings_get_enable_webgl                               (WebKitSettings *settings);
+
+WEBKIT_API void
+webkit_settings_set_enable_webgl                               (WebKitSettings *settings,
+                                                                gboolean        enabled);
+
+WEBKIT_API void
+webkit_settings_set_allow_modal_dialogs                        (WebKitSettings *settings,
+                                                                gboolean        allowed);
+
+WEBKIT_API gboolean
+webkit_settings_get_allow_modal_dialogs                        (WebKitSettings *settings);
+
+WEBKIT_API void
+webkit_settings_set_zoom_text_only                             (WebKitSettings *settings,
+                                                                gboolean        zoom_text_only);
+
+WEBKIT_API gboolean
+webkit_settings_get_zoom_text_only                             (WebKitSettings *settings);
+
+WEBKIT_API gboolean
+webkit_settings_get_javascript_can_access_clipboard            (WebKitSettings *settings);
+
+WEBKIT_API void
+webkit_settings_set_javascript_can_access_clipboard            (WebKitSettings *settings,
+                                                                gboolean        enabled);
+
+WEBKIT_API gboolean
+webkit_settings_get_media_playback_requires_user_gesture       (WebKitSettings *settings);
+
+WEBKIT_API void
+webkit_settings_set_media_playback_requires_user_gesture       (WebKitSettings *settings,
+                                                                gboolean        enabled);
+
+WEBKIT_API gboolean
+webkit_settings_get_media_playback_allows_inline               (WebKitSettings *settings);
+
+WEBKIT_API void
+webkit_settings_set_media_playback_allows_inline               (WebKitSettings *settings,
+                                                                gboolean        enabled);
+WEBKIT_API gboolean
+webkit_settings_get_draw_compositing_indicators                (WebKitSettings *settings);
+
+WEBKIT_API void
+webkit_settings_set_draw_compositing_indicators                (WebKitSettings *settings,
+                                                                gboolean        enabled);
+
+WEBKIT_API gboolean
+webkit_settings_get_enable_site_specific_quirks                (WebKitSettings *settings);
+
+WEBKIT_API void
+webkit_settings_set_enable_site_specific_quirks                (WebKitSettings *settings,
+                                                                gboolean        enabled);
+
+WEBKIT_API gboolean
+webkit_settings_get_enable_page_cache                          (WebKitSettings *settings);
+
+WEBKIT_API void
+webkit_settings_set_enable_page_cache                          (WebKitSettings *settings,
+                                                                gboolean        enabled);
+
+WEBKIT_API const gchar *
+webkit_settings_get_user_agent                                 (WebKitSettings *settings);
+
+WEBKIT_API void
+webkit_settings_set_user_agent                                 (WebKitSettings *settings,
+                                                                const gchar    *user_agent);
+WEBKIT_API void
+webkit_settings_set_user_agent_with_application_details        (WebKitSettings *settings,
+                                                                const gchar    *application_name,
+                                                                const gchar    *application_version);
+
+WEBKIT_API gboolean
+webkit_settings_get_enable_smooth_scrolling                    (WebKitSettings *settings);
+
+WEBKIT_API void
+webkit_settings_set_enable_smooth_scrolling                    (WebKitSettings *settings,
+                                                                gboolean        enabled);
+
+WEBKIT_API gboolean
+webkit_settings_get_enable_accelerated_2d_canvas               (WebKitSettings *settings);
+
+WEBKIT_API void
+webkit_settings_set_enable_accelerated_2d_canvas               (WebKitSettings *settings,
+                                                                gboolean        enabled);
+
+WEBKIT_API gboolean
+webkit_settings_get_enable_write_console_messages_to_stdout    (WebKitSettings *settings);
+
+WEBKIT_API void
+webkit_settings_set_enable_write_console_messages_to_stdout    (WebKitSettings *settings,
+                                                                gboolean        enabled);
+
+WEBKIT_API gboolean
+webkit_settings_get_enable_media_stream                        (WebKitSettings *settings);
+
+WEBKIT_API void
+webkit_settings_set_enable_media_stream                        (WebKitSettings *settings,
+                                                                gboolean        enabled);
+
+WEBKIT_API gboolean
+webkit_settings_get_enable_spatial_navigation                  (WebKitSettings *settings);
+
+WEBKIT_API void
+webkit_settings_set_enable_spatial_navigation                  (WebKitSettings *settings,
+                                                                gboolean        enabled);
+
+WEBKIT_API gboolean
+webkit_settings_get_enable_mediasource                         (WebKitSettings *settings);
+
+WEBKIT_API void
+webkit_settings_set_enable_mediasource                         (WebKitSettings *settings,
+                                                                gboolean        enabled);
+
+WEBKIT_API gboolean
+webkit_settings_get_allow_file_access_from_file_urls           (WebKitSettings *settings);
+
+WEBKIT_API void
+webkit_settings_set_allow_file_access_from_file_urls           (WebKitSettings *settings,
+                                                                gboolean        allowed);
+
+WEBKIT_API gboolean
+webkit_settings_get_allow_universal_access_from_file_urls      (WebKitSettings *settings);
+
+WEBKIT_API void
+webkit_settings_set_allow_universal_access_from_file_urls      (WebKitSettings *settings,
+                                                                gboolean        allowed);
+
+G_END_DECLS
+
+#endif /* WebKitSettings_h */
diff --git a/Source/WebKit2/UIProcess/API/wpe/WebKitURIRequest.h b/Source/WebKit2/UIProcess/API/wpe/WebKitURIRequest.h
new file mode 100644 (file)
index 0000000..af9e319
--- /dev/null
@@ -0,0 +1,81 @@
+/*
+ * Copyright (C) 2011 Igalia S.L.
+ *
+ * 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.
+ */
+
+#if !defined(__WEBKIT_H_INSIDE__) && !defined(WEBKIT2_COMPILATION) && !defined(__WEBKIT_WEB_EXTENSION_H_INSIDE__)
+#error "Only <wpe/webkit.h> can be included directly."
+#endif
+
+#ifndef WebKitURIRequest_h
+#define WebKitURIRequest_h
+
+#include <glib-object.h>
+#include <libsoup/soup.h>
+#include <wpe/WebKitDefines.h>
+
+G_BEGIN_DECLS
+
+#define WEBKIT_TYPE_URI_REQUEST            (webkit_uri_request_get_type())
+#define WEBKIT_URI_REQUEST(obj)            (G_TYPE_CHECK_INSTANCE_CAST((obj), WEBKIT_TYPE_URI_REQUEST, WebKitURIRequest))
+#define WEBKIT_IS_URI_REQUEST(obj)         (G_TYPE_CHECK_INSTANCE_TYPE((obj), WEBKIT_TYPE_URI_REQUEST))
+#define WEBKIT_URI_REQUEST_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST((klass),  WEBKIT_TYPE_URI_REQUEST, WebKitURIRequestClass))
+#define WEBKIT_IS_URI_REQUEST_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass),  WEBKIT_TYPE_URI_REQUEST))
+#define WEBKIT_URI_REQUEST_GET_CLASS(obj)  (G_TYPE_INSTANCE_GET_CLASS((obj),  WEBKIT_TYPE_URI_REQUEST, WebKitURIRequestClass))
+
+typedef struct _WebKitURIRequest WebKitURIRequest;
+typedef struct _WebKitURIRequestClass WebKitURIRequestClass;
+typedef struct _WebKitURIRequestPrivate WebKitURIRequestPrivate;
+
+struct _WebKitURIRequest {
+    GObject parent;
+
+    /*< private >*/
+    WebKitURIRequestPrivate *priv;
+};
+
+struct _WebKitURIRequestClass {
+    GObjectClass parent_class;
+
+    void (*_webkit_reserved0) (void);
+    void (*_webkit_reserved1) (void);
+    void (*_webkit_reserved2) (void);
+    void (*_webkit_reserved3) (void);
+};
+
+WEBKIT_API GType
+webkit_uri_request_get_type         (void);
+
+WEBKIT_API WebKitURIRequest *
+webkit_uri_request_new              (const gchar      *uri);
+
+WEBKIT_API const gchar *
+webkit_uri_request_get_uri          (WebKitURIRequest *request);
+
+WEBKIT_API void
+webkit_uri_request_set_uri          (WebKitURIRequest *request,
+                                     const gchar      *uri);
+
+WEBKIT_API const gchar *
+webkit_uri_request_get_http_method  (WebKitURIRequest *request);
+
+WEBKIT_API SoupMessageHeaders *
+webkit_uri_request_get_http_headers (WebKitURIRequest *request);
+
+G_END_DECLS
+
+#endif
diff --git a/Source/WebKit2/UIProcess/API/wpe/WebKitURIResponse.h b/Source/WebKit2/UIProcess/API/wpe/WebKitURIResponse.h
new file mode 100644 (file)
index 0000000..79b09ce
--- /dev/null
@@ -0,0 +1,83 @@
+/*
+ * Copyright (C) 2011 Igalia S.L.
+ *
+ * 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.
+ */
+
+#if !defined(__WEBKIT_H_INSIDE__) && !defined(WEBKIT2_COMPILATION) && !defined(__WEBKIT_WEB_EXTENSION_H_INSIDE__)
+#error "Only <wpe/webkit.h> can be included directly."
+#endif
+
+#ifndef WebKitURIResponse_h
+#define WebKitURIResponse_h
+
+#include <gio/gio.h>
+#include <libsoup/soup.h>
+#include <wpe/WebKitDefines.h>
+
+G_BEGIN_DECLS
+
+#define WEBKIT_TYPE_URI_RESPONSE            (webkit_uri_response_get_type())
+#define WEBKIT_URI_RESPONSE(obj)            (G_TYPE_CHECK_INSTANCE_CAST((obj), WEBKIT_TYPE_URI_RESPONSE, WebKitURIResponse))
+#define WEBKIT_IS_URI_RESPONSE(obj)         (G_TYPE_CHECK_INSTANCE_TYPE((obj), WEBKIT_TYPE_URI_RESPONSE))
+#define WEBKIT_URI_RESPONSE_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST((klass),  WEBKIT_TYPE_URI_RESPONSE, WebKitURIResponseClass))
+#define WEBKIT_IS_URI_RESPONSE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass),  WEBKIT_TYPE_URI_RESPONSE))
+#define WEBKIT_URI_RESPONSE_GET_CLASS(obj)  (G_TYPE_INSTANCE_GET_CLASS((obj),  WEBKIT_TYPE_URI_RESPONSE, WebKitURIResponseClass))
+
+typedef struct _WebKitURIResponse WebKitURIResponse;
+typedef struct _WebKitURIResponseClass WebKitURIResponseClass;
+typedef struct _WebKitURIResponsePrivate WebKitURIResponsePrivate;
+
+struct _WebKitURIResponse {
+    GObject parent;
+
+    /*< private >*/
+    WebKitURIResponsePrivate *priv;
+};
+
+struct _WebKitURIResponseClass {
+    GObjectClass parent_class;
+
+    void (*_webkit_reserved0) (void);
+    void (*_webkit_reserved1) (void);
+    void (*_webkit_reserved2) (void);
+    void (*_webkit_reserved3) (void);
+};
+
+WEBKIT_API GType
+webkit_uri_response_get_type               (void);
+
+WEBKIT_API const gchar *
+webkit_uri_response_get_uri                (WebKitURIResponse    *response);
+
+WEBKIT_API guint
+webkit_uri_response_get_status_code        (WebKitURIResponse    *response);
+
+WEBKIT_API guint64
+webkit_uri_response_get_content_length     (WebKitURIResponse    *response);
+
+WEBKIT_API const gchar *
+webkit_uri_response_get_mime_type          (WebKitURIResponse    *response);
+
+WEBKIT_API const gchar *
+webkit_uri_response_get_suggested_filename (WebKitURIResponse    *response);
+
+WEBKIT_API SoupMessageHeaders *
+webkit_uri_response_get_http_headers       (WebKitURIResponse    *response);
+
+G_END_DECLS
+
+#endif
diff --git a/Source/WebKit2/UIProcess/API/wpe/WebKitURISchemeRequest.h b/Source/WebKit2/UIProcess/API/wpe/WebKitURISchemeRequest.h
new file mode 100644 (file)
index 0000000..682ff64
--- /dev/null
@@ -0,0 +1,87 @@
+/*
+ * Copyright (C) 2012 Igalia S.L.
+ *
+ * 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.
+ */
+
+#if !defined(__WEBKIT_H_INSIDE__) && !defined(WEBKIT2_COMPILATION)
+#error "Only <wpe/webkit.h> can be included directly."
+#endif
+
+#ifndef WebKitURISchemeRequest_h
+#define WebKitURISchemeRequest_h
+
+#include <glib-object.h>
+#include <wpe/WebKitDefines.h>
+
+G_BEGIN_DECLS
+
+#define WEBKIT_TYPE_URI_SCHEME_REQUEST            (webkit_uri_scheme_request_get_type())
+#define WEBKIT_URI_SCHEME_REQUEST(obj)            (G_TYPE_CHECK_INSTANCE_CAST((obj), WEBKIT_TYPE_URI_SCHEME_REQUEST, WebKitURISchemeRequest))
+#define WEBKIT_IS_URI_SCHEME_REQUEST(obj)         (G_TYPE_CHECK_INSTANCE_TYPE((obj), WEBKIT_TYPE_URI_SCHEME_REQUEST))
+#define WEBKIT_URI_SCHEME_REQUEST_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST((klass),  WEBKIT_TYPE_URI_SCHEME_REQUEST, WebKitURISchemeRequestClass))
+#define WEBKIT_IS_URI_SCHEME_REQUEST_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass),  WEBKIT_TYPE_URI_SCHEME_REQUEST))
+#define WEBKIT_URI_SCHEME_REQUEST_GET_CLASS(obj)  (G_TYPE_INSTANCE_GET_CLASS((obj),  WEBKIT_TYPE_URI_SCHEME_REQUEST, WebKitURISchemeRequestClass))
+
+typedef struct _WebKitURISchemeRequest        WebKitURISchemeRequest;
+typedef struct _WebKitURISchemeRequestClass   WebKitURISchemeRequestClass;
+typedef struct _WebKitURISchemeRequestPrivate WebKitURISchemeRequestPrivate;
+
+typedef struct _WebKitWebView WebKitWebView;
+
+struct _WebKitURISchemeRequest {
+    GObject parent;
+
+    WebKitURISchemeRequestPrivate *priv;
+};
+
+struct _WebKitURISchemeRequestClass {
+    GObjectClass parent_class;
+
+    void (*_webkit_reserved0) (void);
+    void (*_webkit_reserved1) (void);
+    void (*_webkit_reserved2) (void);
+    void (*_webkit_reserved3) (void);
+};
+
+WEBKIT_API GType
+webkit_uri_scheme_request_get_type     (void);
+
+WEBKIT_API const gchar *
+webkit_uri_scheme_request_get_scheme   (WebKitURISchemeRequest *request);
+
+WEBKIT_API const gchar *
+webkit_uri_scheme_request_get_uri      (WebKitURISchemeRequest *request);
+
+WEBKIT_API const gchar *
+webkit_uri_scheme_request_get_path     (WebKitURISchemeRequest *request);
+
+WEBKIT_API WebKitWebView *
+webkit_uri_scheme_request_get_web_view (WebKitURISchemeRequest *request);
+
+WEBKIT_API void
+webkit_uri_scheme_request_finish       (WebKitURISchemeRequest *request,
+                                        GInputStream           *stream,
+                                        gint64                  stream_length,
+                                        const gchar            *mime_type);
+
+WEBKIT_API void
+webkit_uri_scheme_request_finish_error (WebKitURISchemeRequest *request,
+                                        GError                 *error);
+
+G_END_DECLS
+
+#endif
diff --git a/Source/WebKit2/UIProcess/API/wpe/WebKitUserContent.h b/Source/WebKit2/UIProcess/API/wpe/WebKitUserContent.h
new file mode 100644 (file)
index 0000000..e7b5aee
--- /dev/null
@@ -0,0 +1,125 @@
+/*
+ * Copyright (C) 2014 Igalia S.L.
+ *
+ * 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.
+ */
+
+#if !defined(__WEBKIT_H_INSIDE__) && !defined(WEBKIT2_COMPILATION)
+#error "Only <wpe/webkit.h> can be included directly."
+#endif
+
+#ifndef WebKitUserContent_h
+#define WebKitUserContent_h
+
+#include <glib-object.h>
+#include <wpe/WebKitDefines.h>
+
+G_BEGIN_DECLS
+
+/**
+ * WebKitUserContentInjectedFrames:
+ * @WEBKIT_USER_CONTENT_INJECT_ALL_FRAMES: Insert the user style
+ *   sheet in all the frames loaded by the web view, including
+ *   nested frames. This is the default.
+ * @WEBKIT_USER_CONTENT_INJECT_TOP_FRAME: Insert the user style
+ *   sheet *only* in the top-level frame loaded by the web view,
+ *   and *not* in the nested frames.
+ *
+ * Specifies in which frames user style sheets are to be inserted in.
+ *
+ * Since: 2.6
+ */
+typedef enum {
+    WEBKIT_USER_CONTENT_INJECT_ALL_FRAMES,
+    WEBKIT_USER_CONTENT_INJECT_TOP_FRAME,
+} WebKitUserContentInjectedFrames;
+
+/**
+ * WebKitUserStyleLevel:
+ * @WEBKIT_USER_STYLE_LEVEL_USER: The style sheet is an user style sheet,
+ *   its contents always override other style sheets. This is the default.
+ * @WEBKIT_USER_STYLE_LEVEL_AUTHOR: The style sheet will be treated as if
+ *   it was provided by the loaded documents. That means other user style
+ *   sheets may still override it.
+ *
+ * Specifies how to treat an user style sheet.
+ *
+ * Since: 2.6
+ */
+typedef enum {
+    WEBKIT_USER_STYLE_LEVEL_USER,
+    WEBKIT_USER_STYLE_LEVEL_AUTHOR,
+} WebKitUserStyleLevel;
+
+#define WEBKIT_TYPE_USER_STYLE_SHEET (webkit_user_style_sheet_get_type())
+
+typedef struct _WebKitUserStyleSheet WebKitUserStyleSheet;
+
+WEBKIT_API GType
+webkit_user_style_sheet_get_type (void);
+
+WEBKIT_API WebKitUserStyleSheet *
+webkit_user_style_sheet_ref      (WebKitUserStyleSheet           *user_style_sheet);
+
+WEBKIT_API void
+webkit_user_style_sheet_unref    (WebKitUserStyleSheet           *user_style_sheet);
+
+WEBKIT_API WebKitUserStyleSheet *
+webkit_user_style_sheet_new      (const gchar                    *source,
+                                  WebKitUserContentInjectedFrames injected_frames,
+                                  WebKitUserStyleLevel            level,
+                                  const gchar* const             *whitelist,
+                                  const gchar* const             *blacklist);
+
+/**
+ * WebKitUserScriptInjectionTime:
+ * @WEBKIT_USER_SCRIPT_INJECT_AT_DOCUMENT_START: Insert the code of the user
+ *   script at the beginning of loaded documents. This is the default.
+ * @WEBKIT_USER_SCRIPT_INJECT_AT_DOCUMENT_END: Insert the code of the user
+ *   script at the end of the loaded documents.
+ *
+ * Specifies at which place of documents an user script will be inserted.
+ *
+ * Since: 2.6
+ */
+typedef enum {
+    WEBKIT_USER_SCRIPT_INJECT_AT_DOCUMENT_START,
+    WEBKIT_USER_SCRIPT_INJECT_AT_DOCUMENT_END,
+} WebKitUserScriptInjectionTime;
+
+#define WEBKIT_TYPE_USER_SCRIPT (webkit_user_script_get_type())
+
+typedef struct _WebKitUserScript WebKitUserScript;
+
+WEBKIT_API GType
+webkit_user_script_get_type      (void);
+
+WEBKIT_API WebKitUserScript *
+webkit_user_script_ref           (WebKitUserScript               *user_script);
+
+WEBKIT_API void
+webkit_user_script_unref         (WebKitUserScript               *user_script);
+
+WEBKIT_API WebKitUserScript *
+webkit_user_script_new           (const gchar                    *source,
+                                  WebKitUserContentInjectedFrames injected_frames,
+                                  WebKitUserScriptInjectionTime   injection_time,
+                                  const gchar* const             *whitelist,
+                                  const gchar* const             *blacklist);
+
+G_END_DECLS
+
+#endif
diff --git a/Source/WebKit2/UIProcess/API/wpe/WebKitUserContentManager.h b/Source/WebKit2/UIProcess/API/wpe/WebKitUserContentManager.h
new file mode 100644 (file)
index 0000000..27a27c8
--- /dev/null
@@ -0,0 +1,90 @@
+/*
+ * Copyright (C) 2014 Igalia S.L.
+ *
+ * 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.
+ */
+
+#if !defined(__WEBKIT_H_INSIDE__) && !defined(WEBKIT2_COMPILATION)
+#error "Only <wpe/webkit.h> can be included directly."
+#endif
+
+#ifndef WebKitUserContentManager_h
+#define WebKitUserContentManager_h
+
+#include <glib-object.h>
+#include <wpe/WebKitDefines.h>
+#include <wpe/WebKitUserContent.h>
+
+G_BEGIN_DECLS
+
+#define WEBKIT_TYPE_USER_CONTENT_MANAGER            (webkit_user_content_manager_get_type())
+#define WEBKIT_USER_CONTENT_MANAGER(obj)            (G_TYPE_CHECK_INSTANCE_CAST((obj), WEBKIT_TYPE_USER_CONTENT_MANAGER, WebKitUserContentManager))
+#define WEBKIT_IS_USER_CONTENT_MANAGER(obj)         (G_TYPE_CHECK_INSTANCE_TYPE((obj), WEBKIT_TYPE_USER_CONTENT_MANAGER))
+#define WEBKIT_USER_CONTENT_MANAGER_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST((klass),  WEBKIT_TYPE_USER_CONTENT_MANAGER, WebKitUserContentManagerClass))
+#define WEBKIT_IS_USER_CONTENT_MANAGER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass),  WEBKIT_TYPE_USER_CONTENT_MANAGER))
+#define WEBKIT_USER_CONTENT_MANAGER_GET_CLASS(obj)  (G_TYPE_INSTANCE_GET_CLASS((obj),  WEBKIT_TYPE_USER_CONTENT_MANAGER, WebKitUserContentManagerClass))
+
+typedef struct _WebKitUserContentManager        WebKitUserContentManager;
+typedef struct _WebKitUserContentManagerClass   WebKitUserContentManagerClass;
+typedef struct _WebKitUserContentManagerPrivate WebKitUserContentManagerPrivate;
+
+
+struct _WebKitUserContentManager {
+    GObject parent;
+
+    /*< private >*/
+    WebKitUserContentManagerPrivate *priv;
+};
+
+struct _WebKitUserContentManagerClass {
+    GObjectClass parent_class;
+
+    void (*_webkit_reserved0) (void);
+    void (*_webkit_reserved1) (void);
+    void (*_webkit_reserved2) (void);
+    void (*_webkit_reserved3) (void);
+};
+
+
+WEBKIT_API GType
+webkit_user_content_manager_get_type                          (void);
+
+WEBKIT_API WebKitUserContentManager *
+webkit_user_content_manager_new                               (void);
+
+WEBKIT_API void
+webkit_user_content_manager_add_style_sheet                   (WebKitUserContentManager *manager,
+                                                               WebKitUserStyleSheet     *stylesheet);
+WEBKIT_API void
+webkit_user_content_manager_remove_all_style_sheets           (WebKitUserContentManager *manager);
+
+WEBKIT_API gboolean
+webkit_user_content_manager_register_script_message_handler   (WebKitUserContentManager *manager,
+                                                               const gchar              *name);
+WEBKIT_API void
+webkit_user_content_manager_unregister_script_message_handler (WebKitUserContentManager *manager,
+                                                               const gchar              *name);
+
+WEBKIT_API void
+webkit_user_content_manager_add_script              (WebKitUserContentManager *manager,
+                                                     WebKitUserScript         *script);
+
+WEBKIT_API void
+webkit_user_content_manager_remove_all_scripts      (WebKitUserContentManager *manager);
+
+G_END_DECLS
+
+#endif
diff --git a/Source/WebKit2/UIProcess/API/wpe/WebKitUserMediaPermissionRequest.h b/Source/WebKit2/UIProcess/API/wpe/WebKitUserMediaPermissionRequest.h
new file mode 100644 (file)
index 0000000..be14d36
--- /dev/null
@@ -0,0 +1,69 @@
+/*
+ * Copyright (C) 2014 Igalia S.L
+ *
+ *  This library is free software; you can redistribute it and/or
+ *  modify it under the terms of the GNU Lesser 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
+ *  Lesser General Public License for more details.
+ *
+ *  You should have received a copy of the GNU Lesser General Public
+ *  License along with this library; if not, write to the Free Software
+ *  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+ */
+
+#if !defined(__WEBKIT_H_INSIDE__) && !defined(WEBKIT2_COMPILATION)
+#error "Only <wpe/webkit.h> can be included directly."
+#endif
+
+#ifndef WebKitUserMediaPermissionRequest_h
+#define WebKitUserMediaPermissionRequest_h
+
+#include <glib-object.h>
+#include <wpe/WebKitDefines.h>
+
+G_BEGIN_DECLS
+
+#define WEBKIT_TYPE_USER_MEDIA_PERMISSION_REQUEST            (webkit_user_media_permission_request_get_type())
+#define WEBKIT_USER_MEDIA_PERMISSION_REQUEST(obj)            (G_TYPE_CHECK_INSTANCE_CAST((obj), WEBKIT_TYPE_USER_MEDIA_PERMISSION_REQUEST, WebKitUserMediaPermissionRequest))
+#define WEBKIT_USER_MEDIA_PERMISSION_REQUEST_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST((klass),  WEBKIT_TYPE_USER_MEDIA_PERMISSION_REQUEST, WebKitUserMediaPermissionRequestClass))
+#define WEBKIT_IS_USER_MEDIA_PERMISSION_REQUEST(obj)         (G_TYPE_CHECK_INSTANCE_TYPE((obj), WEBKIT_TYPE_USER_MEDIA_PERMISSION_REQUEST))
+#define WEBKIT_IS_USER_MEDIA_PERMISSION_REQUEST_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass),  WEBKIT_TYPE_USER_MEDIA_PERMISSION_REQUEST))
+#define WEBKIT_USER_MEDIA_PERMISSION_REQUEST_GET_CLASS(obj)  (G_TYPE_INSTANCE_GET_CLASS((obj),  WEBKIT_TYPE_USER_MEDIA_PERMISSION_REQUEST, WebKitUserMediaPermissionRequestClass))
+
+typedef struct _WebKitUserMediaPermissionRequest        WebKitUserMediaPermissionRequest;
+typedef struct _WebKitUserMediaPermissionRequestClass   WebKitUserMediaPermissionRequestClass;
+typedef struct _WebKitUserMediaPermissionRequestPrivate WebKitUserMediaPermissionRequestPrivate;
+
+struct _WebKitUserMediaPermissionRequest {
+    GObject parent;
+
+    /*< private >*/
+    WebKitUserMediaPermissionRequestPrivate *priv;
+};
+
+struct _WebKitUserMediaPermissionRequestClass {
+    GObjectClass parent_class;
+
+    void (*_webkit_reserved0) (void);
+    void (*_webkit_reserved1) (void);
+    void (*_webkit_reserved2) (void);
+    void (*_webkit_reserved3) (void);
+};
+
+WEBKIT_API GType
+webkit_user_media_permission_request_get_type    (void);
+
+WEBKIT_API gboolean
+webkit_user_media_permission_is_for_audio_device (WebKitUserMediaPermissionRequest *request);
+
+WEBKIT_API gboolean
+webkit_user_media_permission_is_for_video_device (WebKitUserMediaPermissionRequest *request);
+
+G_END_DECLS
+
+#endif
diff --git a/Source/WebKit2/UIProcess/API/wpe/WebKitWebContext.h b/Source/WebKit2/UIProcess/API/wpe/WebKitWebContext.h
new file mode 100644 (file)
index 0000000..1c26c2d
--- /dev/null
@@ -0,0 +1,311 @@
+/*
+ * Copyright (C) 2011 Igalia S.L.
+ *
+ * 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.
+ */
+
+#if !defined(__WEBKIT_H_INSIDE__) && !defined(WEBKIT2_COMPILATION)
+#error "Only <wpe/webkit.h> can be included directly."
+#endif
+
+#ifndef WebKitWebContext_h
+#define WebKitWebContext_h
+
+#include <glib-object.h>
+#include <wpe/WebKitAutomationSession.h>
+#include <wpe/WebKitCookieManager.h>
+#include <wpe/WebKitDefines.h>
+#include <wpe/WebKitDownload.h>
+#include <wpe/WebKitFaviconDatabase.h>
+#include <wpe/WebKitNetworkProxySettings.h>
+#include <wpe/WebKitSecurityManager.h>
+#include <wpe/WebKitURISchemeRequest.h>
+#include <wpe/WebKitWebsiteDataManager.h>
+
+G_BEGIN_DECLS
+
+#define WEBKIT_TYPE_WEB_CONTEXT            (webkit_web_context_get_type())
+#define WEBKIT_WEB_CONTEXT(obj)            (G_TYPE_CHECK_INSTANCE_CAST((obj), WEBKIT_TYPE_WEB_CONTEXT, WebKitWebContext))
+#define WEBKIT_WEB_CONTEXT_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST((klass),  WEBKIT_TYPE_WEB_CONTEXT, WebKitWebContextClass))
+#define WEBKIT_IS_WEB_CONTEXT(obj)         (G_TYPE_CHECK_INSTANCE_TYPE((obj), WEBKIT_TYPE_WEB_CONTEXT))
+#define WEBKIT_IS_WEB_CONTEXT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass),  WEBKIT_TYPE_WEB_CONTEXT))
+#define WEBKIT_WEB_CONTEXT_GET_CLASS(obj)  (G_TYPE_INSTANCE_GET_CLASS((obj),  WEBKIT_TYPE_WEB_CONTEXT, WebKitWebContextClass))
+
+/**
+ * WebKitCacheModel:
+ * @WEBKIT_CACHE_MODEL_DOCUMENT_VIEWER: Disable the cache completely, which
+ *   substantially reduces memory usage. Useful for applications that only
+ *   access a single local file, with no navigation to other pages. No remote
+ *   resources will be cached.
+ * @WEBKIT_CACHE_MODEL_DOCUMENT_BROWSER: A cache model optimized for viewing
+ *   a series of local files -- for example, a documentation viewer or a website
+ *   designer. WebKit will cache a moderate number of resources.
+ * @WEBKIT_CACHE_MODEL_WEB_BROWSER: Improve document load speed substantially
+ *   by caching a very large number of resources and previously viewed content.
+ *
+ * Enum values used for determining the #WebKitWebContext cache model.
+ */
+typedef enum {
+    WEBKIT_CACHE_MODEL_DOCUMENT_VIEWER,
+    WEBKIT_CACHE_MODEL_WEB_BROWSER,
+    WEBKIT_CACHE_MODEL_DOCUMENT_BROWSER
+} WebKitCacheModel;
+
+/**
+ * WebKitProcessModel:
+ * @WEBKIT_PROCESS_MODEL_SHARED_SECONDARY_PROCESS: Use a single process to
+ *   perform content rendering. The process is shared among all the
+ *   #WebKitWebView instances created by the application: if the process
+ *   hangs or crashes all the web views in the application will be affected.
+ *   This is the default process model, and it should suffice for most cases.
+ * @WEBKIT_PROCESS_MODEL_MULTIPLE_SECONDARY_PROCESSES: Use one process
+ *   for each #WebKitWebView, while still allowing for some of them to
+ *   share a process in certain situations. The main advantage
+ *   of this process model is that the rendering process for a web view
+ *   can crash while the rest of the views keep working normally. This
+ *   process model is indicated for applications which may use a number
+ *   of web views and the content of in each must not interfere with the
+ *   rest — for example a full-fledged web browser with support for
+ *   multiple tabs.
+ *
+ * Enum values used for determining the #WebKitWebContext process model.
+ *
+ * Since: 2.4
+ */
+typedef enum {
+    WEBKIT_PROCESS_MODEL_SHARED_SECONDARY_PROCESS,
+    WEBKIT_PROCESS_MODEL_MULTIPLE_SECONDARY_PROCESSES,
+} WebKitProcessModel;
+
+/**
+ * WebKitTLSErrorsPolicy:
+ * @WEBKIT_TLS_ERRORS_POLICY_IGNORE: Ignore TLS errors.
+ * @WEBKIT_TLS_ERRORS_POLICY_FAIL: TLS errors will emit
+ *   #WebKitWebView::load-failed-with-tls-errors and, if the signal is handled,
+ *   finish the load. In case the signal is not handled,
+ *   #WebKitWebView::load-failed is emitted before the load finishes.
+ *
+ * Enum values used to denote the TLS errors policy.
+ */
+typedef enum {
+    WEBKIT_TLS_ERRORS_POLICY_IGNORE,
+    WEBKIT_TLS_ERRORS_POLICY_FAIL
+} WebKitTLSErrorsPolicy;
+
+/**
+ * WebKitNetworkProxyMode:
+ * @WEBKIT_NETWORK_PROXY_MODE_DEFAULT: Use the default proxy of the system.
+ * @WEBKIT_NETWORK_PROXY_MODE_NO_PROXY: Do not use any proxy.
+ * @WEBKIT_NETWORK_PROXY_MODE_CUSTOM: Use custom proxy settings.
+ *
+ * Enum values used to set the network proxy mode.
+ *
+ * Since: 2.16
+ */
+typedef enum {
+    WEBKIT_NETWORK_PROXY_MODE_DEFAULT,
+    WEBKIT_NETWORK_PROXY_MODE_NO_PROXY,
+    WEBKIT_NETWORK_PROXY_MODE_CUSTOM
+} WebKitNetworkProxyMode;
+
+/**
+ * WebKitURISchemeRequestCallback:
+ * @request: the #WebKitURISchemeRequest
+ * @user_data: user data passed to the callback
+ *
+ * Type definition for a function that will be called back when an URI request is
+ * made for a user registered URI scheme.
+ */
+typedef void (* WebKitURISchemeRequestCallback) (WebKitURISchemeRequest *request,
+                                                 gpointer                user_data);
+
+typedef struct _WebKitWebContext        WebKitWebContext;
+typedef struct _WebKitWebContextClass   WebKitWebContextClass;
+typedef struct _WebKitWebContextPrivate WebKitWebContextPrivate;
+
+struct _WebKitWebContext {
+    GObject parent;
+
+    /*< private >*/
+    WebKitWebContextPrivate *priv;
+};
+
+struct _WebKitWebContextClass {
+    GObjectClass parent;
+
+    void (* download_started)                    (WebKitWebContext        *context,
+                                                  WebKitDownload          *download);
+    void (* initialize_web_extensions)           (WebKitWebContext        *context);
+    void (* initialize_notification_permissions) (WebKitWebContext        *context);
+    void (* automation_started)                  (WebKitWebContext        *context,
+                                                  WebKitAutomationSession *session);
+
+    void (*_webkit_reserved0) (void);
+    void (*_webkit_reserved1) (void);
+    void (*_webkit_reserved2) (void);
+    void (*_webkit_reserved3) (void);
+};
+
+WEBKIT_API GType
+webkit_web_context_get_type                         (void);
+
+WEBKIT_API WebKitWebContext *
+webkit_web_context_get_default                      (void);
+
+WEBKIT_API WebKitWebContext *
+webkit_web_context_new                              (void);
+
+WEBKIT_API WebKitWebContext *
+webkit_web_context_new_ephemeral                    (void);
+
+WEBKIT_API WebKitWebContext *
+webkit_web_context_new_with_website_data_manager    (WebKitWebsiteDataManager      *manager);
+
+WEBKIT_API WebKitWebsiteDataManager *
+webkit_web_context_get_website_data_manager         (WebKitWebContext              *context);
+
+WEBKIT_API gboolean
+webkit_web_context_is_ephemeral                     (WebKitWebContext              *context);
+
+WEBKIT_API gboolean
+webkit_web_context_is_automation_allowed            (WebKitWebContext              *context);
+
+WEBKIT_API void
+webkit_web_context_set_automation_allowed           (WebKitWebContext              *context,
+                                                     gboolean                       allowed);
+WEBKIT_API void
+webkit_web_context_set_cache_model                  (WebKitWebContext              *context,
+                                                     WebKitCacheModel               cache_model);
+WEBKIT_API WebKitCacheModel
+webkit_web_context_get_cache_model                  (WebKitWebContext              *context);
+
+WEBKIT_API void
+webkit_web_context_set_web_process_count_limit      (WebKitWebContext              *context,
+                                                     guint                          limit);
+
+WEBKIT_API guint
+webkit_web_context_get_web_process_count_limit      (WebKitWebContext              *context);
+
+WEBKIT_API void
+webkit_web_context_clear_cache                      (WebKitWebContext              *context);
+
+WEBKIT_API void
+webkit_web_context_set_network_proxy_settings       (WebKitWebContext              *context,
+                                                     WebKitNetworkProxyMode         proxy_mode,
+                                                     WebKitNetworkProxySettings    *proxy_settings);
+
+WEBKIT_API WebKitDownload *
+webkit_web_context_download_uri                     (WebKitWebContext              *context,
+                                                     const gchar                   *uri);
+
+WEBKIT_API WebKitCookieManager *
+webkit_web_context_get_cookie_manager               (WebKitWebContext              *context);
+
+WEBKIT_API WebKitFaviconDatabase *
+webkit_web_context_get_favicon_database             (WebKitWebContext              *context);
+
+WEBKIT_API void
+webkit_web_context_set_favicon_database_directory   (WebKitWebContext              *context,
+                                                     const gchar                   *path);
+WEBKIT_API const gchar *
+webkit_web_context_get_favicon_database_directory   (WebKitWebContext              *context);
+
+WEBKIT_API WebKitSecurityManager *
+webkit_web_context_get_security_manager             (WebKitWebContext              *context);
+
+WEBKIT_API void
+webkit_web_context_set_additional_plugins_directory (WebKitWebContext              *context,
+                                                     const gchar                   *directory);
+
+WEBKIT_API void
+webkit_web_context_get_plugins                      (WebKitWebContext              *context,
+                                                     GCancellable                  *cancellable,
+                                                     GAsyncReadyCallback            callback,
+                                                     gpointer                       user_data);
+
+WEBKIT_API GList *
+webkit_web_context_get_plugins_finish               (WebKitWebContext              *context,
+                                                     GAsyncResult                  *result,
+                                                     GError                       **error);
+WEBKIT_API void
+webkit_web_context_register_uri_scheme              (WebKitWebContext              *context,
+                                                     const gchar                   *scheme,
+                                                     WebKitURISchemeRequestCallback callback,
+                                                     gpointer                       user_data,
+                                                     GDestroyNotify                 user_data_destroy_func);
+
+WEBKIT_API gboolean
+webkit_web_context_get_spell_checking_enabled       (WebKitWebContext              *context);
+
+WEBKIT_API void
+webkit_web_context_set_spell_checking_enabled       (WebKitWebContext              *context,
+                                                     gboolean                       enabled);
+WEBKIT_API const gchar * const *
+webkit_web_context_get_spell_checking_languages     (WebKitWebContext              *context);
+
+WEBKIT_API void
+webkit_web_context_set_spell_checking_languages     (WebKitWebContext              *context,
+                                                     const gchar * const           *languages);
+
+WEBKIT_API void
+webkit_web_context_set_preferred_languages          (WebKitWebContext              *context,
+                                                     const gchar * const           *languages);
+
+WEBKIT_API void
+webkit_web_context_set_tls_errors_policy            (WebKitWebContext              *context,
+                                                     WebKitTLSErrorsPolicy          policy);
+
+WEBKIT_API WebKitTLSErrorsPolicy
+webkit_web_context_get_tls_errors_policy            (WebKitWebContext              *context);
+
+WEBKIT_API void
+webkit_web_context_set_web_extensions_directory     (WebKitWebContext              *context,
+                                                     const gchar                   *directory);
+
+WEBKIT_API void
+webkit_web_context_set_web_extensions_initialization_user_data
+                                                    (WebKitWebContext              *context,
+                                                     GVariant                      *user_data);
+
+WEBKIT_API void
+webkit_web_context_prefetch_dns                     (WebKitWebContext              *context,
+                                                     const gchar                   *hostname);
+
+WEBKIT_DEPRECATED_FOR(webkit_web_context_new_with_website_data_manager) void
+webkit_web_context_set_disk_cache_directory         (WebKitWebContext              *context,
+                                                     const gchar                   *directory);
+
+WEBKIT_API void
+webkit_web_context_allow_tls_certificate_for_host   (WebKitWebContext              *context,
+                                                     GTlsCertificate               *certificate,
+                                                     const gchar                   *host);
+
+WEBKIT_API void
+webkit_web_context_set_process_model                (WebKitWebContext              *context,
+                                                     WebKitProcessModel             process_model);
+
+WEBKIT_API WebKitProcessModel
+webkit_web_context_get_process_model                (WebKitWebContext              *context);
+
+WEBKIT_API void
+webkit_web_context_initialize_notification_permissions
+                                                    (WebKitWebContext              *context,
+                                                     GList                         *allowed_origins,
+                                                     GList                         *disallowed_origins);
+
+G_END_DECLS
+
+#endif
diff --git a/Source/WebKit2/UIProcess/API/wpe/WebKitWebResource.h b/Source/WebKit2/UIProcess/API/wpe/WebKitWebResource.h
new file mode 100644 (file)
index 0000000..320ac3a
--- /dev/null
@@ -0,0 +1,83 @@
+/*
+ * Copyright (C) 2012 Igalia S.L.
+ *
+ * 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.
+ */
+
+#if !defined(__WEBKIT_H_INSIDE__) && !defined(WEBKIT2_COMPILATION)
+#error "Only <wpe/webkit.h> can be included directly."
+#endif
+
+#ifndef WebKitWebResource_h
+#define WebKitWebResource_h
+
+#include <glib-object.h>
+#include <gio/gio.h>
+#include <wpe/WebKitDefines.h>
+#include <wpe/WebKitURIResponse.h>
+
+G_BEGIN_DECLS
+
+#define WEBKIT_TYPE_WEB_RESOURCE            (webkit_web_resource_get_type())
+#define WEBKIT_WEB_RESOURCE(obj)            (G_TYPE_CHECK_INSTANCE_CAST((obj), WEBKIT_TYPE_WEB_RESOURCE, WebKitWebResource))
+#define WEBKIT_IS_WEB_RESOURCE(obj)         (G_TYPE_CHECK_INSTANCE_TYPE((obj), WEBKIT_TYPE_WEB_RESOURCE))
+#define WEBKIT_WEB_RESOURCE_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST((klass),  WEBKIT_TYPE_WEB_RESOURCE, WebKitWebResourceClass))
+#define WEBKIT_IS_WEB_RESOURCE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass),  WEBKIT_TYPE_WEB_RESOURCE))
+#define WEBKIT_WEB_RESOURCE_GET_CLASS(obj)  (G_TYPE_INSTANCE_GET_CLASS((obj),  WEBKIT_TYPE_WEB_RESOURCE, WebKitWebResourceClass))
+
+typedef struct _WebKitWebResource        WebKitWebResource;
+typedef struct _WebKitWebResourceClass   WebKitWebResourceClass;
+typedef struct _WebKitWebResourcePrivate WebKitWebResourcePrivate;
+
+struct _WebKitWebResource {
+    GObject parent;
+
+    WebKitWebResourcePrivate *priv;
+};
+
+struct _WebKitWebResourceClass {
+    GObjectClass parent_class;
+
+    void (*_webkit_reserved0) (void);
+    void (*_webkit_reserved1) (void);
+    void (*_webkit_reserved2) (void);
+    void (*_webkit_reserved3) (void);
+};
+
+WEBKIT_API GType
+webkit_web_resource_get_type        (void);
+
+WEBKIT_API const gchar *
+webkit_web_resource_get_uri         (WebKitWebResource  *resource);
+
+WEBKIT_API WebKitURIResponse *
+webkit_web_resource_get_response    (WebKitWebResource  *resource);
+
+WEBKIT_API void
+webkit_web_resource_get_data        (WebKitWebResource  *resource,
+                                     GCancellable       *cancellable,
+                                     GAsyncReadyCallback callback,
+                                     gpointer            user_data);
+
+WEBKIT_API guchar *
+webkit_web_resource_get_data_finish (WebKitWebResource  *resource,
+                                     GAsyncResult       *result,
+                                     gsize              *length,
+                                     GError            **error);
+
+G_END_DECLS
+
+#endif
diff --git a/Source/WebKit2/UIProcess/API/wpe/WebKitWebView.h b/Source/WebKit2/UIProcess/API/wpe/WebKitWebView.h
new file mode 100644 (file)
index 0000000..403ac00
--- /dev/null
@@ -0,0 +1,515 @@
+/*
+ * Copyright (C) 2007 Holger Hans Peter Freyther
+ * Copyright (C) 2007, 2008 Alp Toker <alp@atoker.com>
+ * Copyright (C) 2008 Collabora Ltd.
+ * Copyright (C) 2011 Igalia S.L.
+ * Portions Copyright (c) 2011 Motorola Mobility, 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.
+ */
+
+#if !defined(__WEBKIT_H_INSIDE__) && !defined(WEBKIT2_COMPILATION)
+#error "Only <wpe/webkit.h> can be included directly."
+#endif
+
+#ifndef WebKitWebView_h
+#define WebKitWebView_h
+
+#include <JavaScriptCore/JSBase.h>
+#include <wpe/WebKitAuthenticationRequest.h>
+#include <wpe/WebKitBackForwardList.h>
+#include <wpe/WebKitContextMenu.h>
+#include <wpe/WebKitDefines.h>
+#include <wpe/WebKitEditorState.h>
+#include <wpe/WebKitFileChooserRequest.h>
+#include <wpe/WebKitFindController.h>
+#include <wpe/WebKitFormSubmissionRequest.h>
+#include <wpe/WebKitHitTestResult.h>
+#include <wpe/WebKitJavascriptResult.h>
+#include <wpe/WebKitNavigationAction.h>
+#include <wpe/WebKitNotification.h>
+#include <wpe/WebKitPermissionRequest.h>
+#include <wpe/WebKitPolicyDecision.h>
+#include <wpe/WebKitScriptDialog.h>
+#include <wpe/WebKitSettings.h>
+#include <wpe/WebKitURIRequest.h>
+#include <wpe/WebKitUserContentManager.h>
+#include <wpe/WebKitWebContext.h>
+#include <wpe/WebKitWebResource.h>
+#include <wpe/WebKitWebViewSessionState.h>
+#include <wpe/WebKitWindowProperties.h>
+
+G_BEGIN_DECLS
+
+#define WEBKIT_TYPE_WEB_VIEW            (webkit_web_view_get_type())
+#define WEBKIT_WEB_VIEW(obj)            (G_TYPE_CHECK_INSTANCE_CAST((obj), WEBKIT_TYPE_WEB_VIEW, WebKitWebView))
+#define WEBKIT_IS_WEB_VIEW(obj)         (G_TYPE_CHECK_INSTANCE_TYPE((obj), WEBKIT_TYPE_WEB_VIEW))
+#define WEBKIT_WEB_VIEW_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST((klass),  WEBKIT_TYPE_WEB_VIEW, WebKitWebViewClass))
+#define WEBKIT_IS_WEB_VIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass),  WEBKIT_TYPE_WEB_VIEW))
+#define WEBKIT_WEB_VIEW_GET_CLASS(obj)  (G_TYPE_INSTANCE_GET_CLASS((obj),  WEBKIT_TYPE_WEB_VIEW, WebKitWebViewClass))
+
+typedef struct _WebKitWebView        WebKitWebView;
+typedef struct _WebKitWebViewClass   WebKitWebViewClass;
+typedef struct _WebKitWebViewPrivate WebKitWebViewPrivate;
+
+/**
+ * WebKitPolicyDecisionType:
+ * @WEBKIT_POLICY_DECISION_TYPE_NAVIGATION_ACTION: This type of policy decision
+ *   is requested when WebKit is about to navigate to a new page in either the
+ *   main frame or a subframe. Acceptable policy decisions are either
+ *   webkit_policy_decision_use() or webkit_policy_decision_ignore(). This
+ *   type of policy decision is always a #WebKitNavigationPolicyDecision.
+ * @WEBKIT_POLICY_DECISION_TYPE_NEW_WINDOW_ACTION: This type of policy decision
+ *   is requested when WebKit is about to create a new window. Acceptable policy
+ *   decisions are either webkit_policy_decision_use() or
+ *   webkit_policy_decision_ignore(). This type of policy decision is always
+ *   a #WebKitNavigationPolicyDecision. These decisions are useful for implementing
+ *   special actions for new windows, such as forcing the new window to open
+ *   in a tab when a keyboard modifier is active or handling a special
+ *   target attribute on &lt;a&gt; elements.
+ * @WEBKIT_POLICY_DECISION_TYPE_RESPONSE: This type of decision is used when WebKit has
+ *   received a response for a network resource and is about to start the load.
+ *   Note that these resources include all subresources of a page such as images
+ *   and stylesheets as well as main documents. Appropriate policy responses to
+ *   this decision are webkit_policy_decision_use(), webkit_policy_decision_ignore(),
+ *   or webkit_policy_decision_download(). This type of policy decision is always
+ *   a #WebKitResponsePolicyDecision. This decision is useful for forcing
+ *   some types of resources to be downloaded rather than rendered in the WebView
+ *   or to block the transfer of resources entirely.
+ *
+ * Enum values used for determining the type of a policy decision during
+ * #WebKitWebView::decide-policy.
+ */
+typedef enum {
+    WEBKIT_POLICY_DECISION_TYPE_NAVIGATION_ACTION,
+    WEBKIT_POLICY_DECISION_TYPE_NEW_WINDOW_ACTION,
+    WEBKIT_POLICY_DECISION_TYPE_RESPONSE,
+} WebKitPolicyDecisionType;
+
+/**
+ * WebKitLoadEvent:
+ * @WEBKIT_LOAD_STARTED: A new load request has been made.
+ * No data has been received yet, empty structures have
+ * been allocated to perform the load; the load may still
+ * fail due to transport issues such as not being able to
+ * resolve a name, or connect to a port.
+ * @WEBKIT_LOAD_REDIRECTED: A provisional data source received
+ * a server redirect.
+ * @WEBKIT_LOAD_COMMITTED: The content started arriving for a page load.
+ * The necessary transport requirements are established, and the
+ * load is being performed.
+ * @WEBKIT_LOAD_FINISHED: Load completed. All resources are done loading
+ * or there was an error during the load operation.
+ *
+ * Enum values used to denote the different events that happen during a
+ * #WebKitWebView load operation.
+ */
+typedef enum {
+    WEBKIT_LOAD_STARTED,
+    WEBKIT_LOAD_REDIRECTED,
+    WEBKIT_LOAD_COMMITTED,
+    WEBKIT_LOAD_FINISHED
+} WebKitLoadEvent;
+
+/**
+ * WebKitSaveMode:
+ * @WEBKIT_SAVE_MODE_MHTML: Save the current page using the MHTML format.
+ *
+ * Enum values to specify the different ways in which a #WebKitWebView
+ * can save its current web page into a self-contained file.
+ */
+typedef enum {
+    WEBKIT_SAVE_MODE_MHTML
+} WebKitSaveMode;
+
+/**
+ * WebKitInsecureContentEvent:
+ * @WEBKIT_INSECURE_CONTENT_RUN: Insecure content has been detected by
+ * trying to execute any kind of logic (e.g. a script) from an
+ * untrusted source.
+ * @WEBKIT_INSECURE_CONTENT_DISPLAYED: Insecure content has been
+ * detected by trying to display any kind of resource (e.g. an image)
+ * from an untrusted source.
+ *
+ * Enum values used to denote the different events which can trigger
+ * the detection of insecure content.
+ */
+typedef enum {
+    WEBKIT_INSECURE_CONTENT_RUN,
+    WEBKIT_INSECURE_CONTENT_DISPLAYED
+} WebKitInsecureContentEvent;
+
+/**
+ * WebKitSnapshotOptions:
+ * @WEBKIT_SNAPSHOT_OPTIONS_NONE: Do not include any special options.
+ * @WEBKIT_SNAPSHOT_OPTIONS_INCLUDE_SELECTION_HIGHLIGHTING: Whether to include in the
+ * snapshot the highlight of the selected content.
+ * @WEBKIT_SNAPSHOT_OPTIONS_TRANSPARENT_BACKGROUND: Do not fill the background with white before
+ * rendering the snapshot. Since 2.8
+ *
+ * Enum values used to specify options when taking a snapshot
+ * from a #WebKitWebView.
+ */
+typedef enum {
+  WEBKIT_SNAPSHOT_OPTIONS_NONE = 0,
+  WEBKIT_SNAPSHOT_OPTIONS_INCLUDE_SELECTION_HIGHLIGHTING = 1 << 0,
+  WEBKIT_SNAPSHOT_OPTIONS_TRANSPARENT_BACKGROUND = 1 << 1,
+} WebKitSnapshotOptions;
+
+/**
+ * WebKitSnapshotRegion:
+ * @WEBKIT_SNAPSHOT_REGION_VISIBLE: Specifies a snapshot only for the area that is
+ * visible in the webview
+ * @WEBKIT_SNAPSHOT_REGION_FULL_DOCUMENT: A snapshot of the entire document.
+ *
+ * Enum values used to specify the region from which to get a #WebKitWebView
+ * snapshot
+ */
+typedef enum {
+  WEBKIT_SNAPSHOT_REGION_VISIBLE = 0,
+  WEBKIT_SNAPSHOT_REGION_FULL_DOCUMENT,
+} WebKitSnapshotRegion;
+
+struct _WebKitWebView {
+    GObject parent;
+
+    /*< private >*/
+    WebKitWebViewPrivate *priv;
+};
+
+struct _WebKitWebViewClass {
+    GObjectClass parent;
+
+    void           (* load_changed)                (WebKitWebView               *web_view,
+                                                    WebKitLoadEvent              load_event);
+    gboolean       (* load_failed)                 (WebKitWebView               *web_view,
+                                                    WebKitLoadEvent              load_event,
+                                                    const gchar                 *failing_uri,
+                                                    GError                      *error);
+
+    WebKitWebView *(* create)                      (WebKitWebView               *web_view,
+                                                    WebKitNavigationAction      *navigation_action);
+    void           (* ready_to_show)               (WebKitWebView               *web_view);
+    void           (* run_as_modal)                (WebKitWebView               *web_view);
+    void           (* close)                       (WebKitWebView               *web_view);
+
+    gboolean       (* script_dialog)               (WebKitWebView               *web_view,
+                                                    WebKitScriptDialog          *dialog);
+
+    gboolean       (* decide_policy)               (WebKitWebView               *web_view,
+                                                    WebKitPolicyDecision        *decision,
+                                                    WebKitPolicyDecisionType     type);
+    gboolean       (* permission_request)          (WebKitWebView               *web_view,
+                                                    WebKitPermissionRequest     *permission_request);
+    void           (* mouse_target_changed)        (WebKitWebView               *web_view,
+                                                    WebKitHitTestResult         *hit_test_result,
+                                                    guint                        modifiers);
+    void           (* resource_load_started)       (WebKitWebView               *web_view,
+                                                    WebKitWebResource           *resource,
+                                                    WebKitURIRequest            *request);
+    gboolean       (* enter_fullscreen)            (WebKitWebView               *web_view);
+    gboolean       (* leave_fullscreen)            (WebKitWebView               *web_view);
+    gboolean       (* run_file_chooser)            (WebKitWebView               *web_view,
+                                                    WebKitFileChooserRequest    *request);
+    gboolean       (* context_menu)                (WebKitWebView               *web_view,
+                                                    WebKitContextMenu           *context_menu,
+                                                    void                        *event, /* FIXME: Use a wpe thing here. I'm not sure we want to expose libwpe in the API. */
+                                                    WebKitHitTestResult         *hit_test_result);
+    void           (* context_menu_dismissed)      (WebKitWebView               *web_view);
+    void           (* submit_form)                 (WebKitWebView               *web_view,
+                                                    WebKitFormSubmissionRequest *request);
+    void           (* insecure_content_detected)   (WebKitWebView               *web_view,
+                                                    WebKitInsecureContentEvent   event);
+    gboolean       (* web_process_crashed)         (WebKitWebView               *web_view);
+
+    gboolean       (* authenticate)                (WebKitWebView               *web_view,
+                                                    WebKitAuthenticationRequest *request);
+    gboolean       (* load_failed_with_tls_errors) (WebKitWebView               *web_view,
+                                                    const gchar                 *failing_uri,
+                                                    GTlsCertificate             *certificate,
+                                                    GTlsCertificateFlags         errors);
+    gboolean       (* show_notification)           (WebKitWebView               *web_view,
+                                                    WebKitNotification          *notification);
+
+    void (*_webkit_reserved0) (void);
+    void (*_webkit_reserved1) (void);
+    void (*_webkit_reserved2) (void);
+    void (*_webkit_reserved3) (void);
+    void (*_webkit_reserved4) (void);
+    void (*_webkit_reserved5) (void);
+    void (*_webkit_reserved6) (void);
+    void (*_webkit_reserved7) (void);
+    void (*_webkit_reserved8) (void);
+};
+
+WEBKIT_API GType
+webkit_web_view_get_type                             (void);
+
+WEBKIT_API WebKitWebView *
+webkit_web_view_new                                  (void);
+
+WEBKIT_API WebKitWebView *
+webkit_web_view_new_with_context                     (WebKitWebContext          *context);
+
+WEBKIT_API WebKitWebView *
+webkit_web_view_new_with_settings                    (WebKitSettings            *settings);
+
+WEBKIT_API WebKitWebView *
+webkit_web_view_new_with_related_view                (WebKitWebView             *web_view);
+
+WEBKIT_API WebKitWebView *
+webkit_web_view_new_with_user_content_manager        (WebKitUserContentManager  *user_content_manager);
+
+WEBKIT_API gboolean
+webkit_web_view_is_ephemeral                         (WebKitWebView             *web_view);
+
+WEBKIT_API gboolean
+webkit_web_view_is_controlled_by_automation          (WebKitWebView             *web_view);
+
+WEBKIT_API WebKitWebsiteDataManager *
+webkit_web_view_get_website_data_manager             (WebKitWebView             *web_view);
+
+WEBKIT_API WebKitWebContext *
+webkit_web_view_get_context                          (WebKitWebView             *web_view);
+
+WEBKIT_API void
+webkit_web_view_try_close                            (WebKitWebView             *web_view);
+
+WEBKIT_API void
+webkit_web_view_load_uri                             (WebKitWebView             *web_view,
+                                                      const gchar               *uri);
+
+WEBKIT_API void
+webkit_web_view_load_html                            (WebKitWebView             *web_view,
+                                                      const gchar               *content,
+                                                      const gchar               *base_uri);
+WEBKIT_API void
+webkit_web_view_load_alternate_html                  (WebKitWebView             *web_view,
+                                                      const gchar               *content,
+                                                      const gchar               *content_uri,
+                                                      const gchar               *base_uri);
+WEBKIT_API void
+webkit_web_view_load_plain_text                      (WebKitWebView             *web_view,
+                                                      const gchar               *plain_text);
+
+WEBKIT_API void
+webkit_web_view_load_bytes                           (WebKitWebView             *web_view,
+                                                      GBytes                    *bytes,
+                                                      const gchar               *mime_type,
+                                                      const gchar               *encoding,
+                                                      const gchar               *base_uri);
+
+WEBKIT_API void
+webkit_web_view_load_request                         (WebKitWebView             *web_view,
+                                                      WebKitURIRequest          *request);
+
+WEBKIT_API void
+webkit_web_view_stop_loading                         (WebKitWebView             *web_view);
+
+WEBKIT_API gboolean
+webkit_web_view_is_loading                           (WebKitWebView             *web_view);
+
+WEBKIT_API gboolean
+webkit_web_view_is_playing_audio                     (WebKitWebView             *web_view);
+
+WEBKIT_API guint64
+webkit_web_view_get_page_id                          (WebKitWebView             *web_view);
+
+WEBKIT_API const gchar *
+webkit_web_view_get_title                            (WebKitWebView             *web_view);
+
+WEBKIT_API void
+webkit_web_view_reload                               (WebKitWebView             *web_view);
+
+WEBKIT_API void
+webkit_web_view_reload_bypass_cache                  (WebKitWebView             *web_view);
+
+WEBKIT_API gdouble
+webkit_web_view_get_estimated_load_progress          (WebKitWebView             *web_view);
+
+WEBKIT_API void
+webkit_web_view_go_back                              (WebKitWebView             *web_view);
+
+WEBKIT_API gboolean
+webkit_web_view_can_go_back                          (WebKitWebView             *web_view);
+
+WEBKIT_API void
+webkit_web_view_go_forward                           (WebKitWebView             *web_view);
+
+WEBKIT_API gboolean
+webkit_web_view_can_go_forward                       (WebKitWebView             *web_view);
+
+WEBKIT_API WebKitBackForwardList *
+webkit_web_view_get_back_forward_list                (WebKitWebView             *web_view);
+
+WEBKIT_API void
+webkit_web_view_go_to_back_forward_list_item         (WebKitWebView             *web_view,
+                                                      WebKitBackForwardListItem *list_item);
+WEBKIT_API const gchar *
+webkit_web_view_get_uri                              (WebKitWebView             *web_view);
+
+WEBKIT_API cairo_surface_t *
+webkit_web_view_get_favicon                          (WebKitWebView             *web_view);
+
+WEBKIT_API const gchar *
+webkit_web_view_get_custom_charset                   (WebKitWebView             *web_view);
+
+WEBKIT_API void
+webkit_web_view_set_custom_charset                   (WebKitWebView             *web_view,
+                                                      const gchar               *charset);
+
+WEBKIT_API void
+webkit_web_view_set_settings                         (WebKitWebView             *web_view,
+                                                      WebKitSettings            *settings);
+
+WEBKIT_API WebKitSettings *
+webkit_web_view_get_settings                         (WebKitWebView             *web_view);
+
+WEBKIT_API WebKitWindowProperties *
+webkit_web_view_get_window_properties                (WebKitWebView             *web_view);
+
+WEBKIT_API void
+webkit_web_view_set_zoom_level                       (WebKitWebView             *web_view,
+                                                      gdouble                    zoom_level);
+WEBKIT_API gdouble
+webkit_web_view_get_zoom_level                       (WebKitWebView             *web_view);
+
+WEBKIT_API void
+webkit_web_view_can_execute_editing_command          (WebKitWebView             *web_view,
+                                                      const gchar               *command,
+                                                      GCancellable              *cancellable,
+                                                      GAsyncReadyCallback        callback,
+                                                      gpointer                   user_data);
+
+WEBKIT_API gboolean
+webkit_web_view_can_execute_editing_command_finish   (WebKitWebView             *web_view,
+                                                      GAsyncResult              *result,
+                                                      GError                   **error);
+
+WEBKIT_API void
+webkit_web_view_execute_editing_command              (WebKitWebView             *web_view,
+                                                      const gchar               *command);
+
+WEBKIT_API void
+webkit_web_view_execute_editing_command_with_argument(WebKitWebView             *web_view,
+                                                      const char                *command,
+                                                      const char                *argument);
+
+WEBKIT_API WebKitFindController *
+webkit_web_view_get_find_controller                  (WebKitWebView             *web_view);
+
+WEBKIT_API JSGlobalContextRef
+webkit_web_view_get_javascript_global_context        (WebKitWebView             *web_view);
+
+WEBKIT_API void
+webkit_web_view_run_javascript                       (WebKitWebView             *web_view,
+                                                      const gchar               *script,
+                                                      GCancellable              *cancellable,
+                                                      GAsyncReadyCallback        callback,
+                                                      gpointer                   user_data);
+WEBKIT_API WebKitJavascriptResult *
+webkit_web_view_run_javascript_finish                (WebKitWebView             *web_view,
+                                                      GAsyncResult              *result,
+                                                      GError                   **error);
+
+WEBKIT_API void
+webkit_web_view_run_javascript_from_gresource        (WebKitWebView             *web_view,
+                                                      const gchar               *resource,
+                                                      GCancellable              *cancellable,
+                                                      GAsyncReadyCallback        callback,
+                                                      gpointer                   user_data);
+
+WEBKIT_API WebKitJavascriptResult *
+webkit_web_view_run_javascript_from_gresource_finish (WebKitWebView             *web_view,
+                                                      GAsyncResult              *result,
+                                                      GError                   **error);
+
+WEBKIT_API WebKitWebResource *
+webkit_web_view_get_main_resource                    (WebKitWebView             *web_view);
+
+WEBKIT_API gboolean
+webkit_web_view_can_show_mime_type                   (WebKitWebView             *web_view,
+                                                      const gchar               *mime_type);
+
+WEBKIT_API void
+webkit_web_view_save                                 (WebKitWebView             *web_view,
+                                                      WebKitSaveMode             save_mode,
+                                                      GCancellable              *cancellable,
+                                                      GAsyncReadyCallback        callback,
+                                                      gpointer                   user_data);
+
+WEBKIT_API GInputStream *
+webkit_web_view_save_finish                          (WebKitWebView             *web_view,
+                                                      GAsyncResult              *result,
+                                                      GError                   **error);
+
+WEBKIT_API void
+webkit_web_view_save_to_file                         (WebKitWebView             *web_view,
+                                                      GFile                     *file,
+                                                      WebKitSaveMode             save_mode,
+                                                      GCancellable              *cancellable,
+                                                      GAsyncReadyCallback        callback,
+                                                      gpointer                   user_data);
+
+WEBKIT_API gboolean
+webkit_web_view_save_to_file_finish                  (WebKitWebView             *web_view,
+                                                      GAsyncResult              *result,
+                                                      GError                   **error);
+
+WEBKIT_API WebKitDownload *
+webkit_web_view_download_uri                         (WebKitWebView             *web_view,
+                                                      const char                *uri);
+
+WEBKIT_API gboolean
+webkit_web_view_get_tls_info                         (WebKitWebView             *web_view,
+                                                      GTlsCertificate          **certificate,
+                                                      GTlsCertificateFlags      *errors);
+WEBKIT_API void
+webkit_web_view_get_snapshot                         (WebKitWebView             *web_view,
+                                                      WebKitSnapshotRegion       region,
+                                                      WebKitSnapshotOptions      options,
+                                                      GCancellable              *cancellable,
+                                                      GAsyncReadyCallback        callback,
+                                                      gpointer                   user_data);
+
+WEBKIT_API cairo_surface_t *
+webkit_web_view_get_snapshot_finish                  (WebKitWebView             *web_view,
+                                                      GAsyncResult              *result,
+                                                      GError                   **error);
+
+WEBKIT_API WebKitUserContentManager *
+webkit_web_view_get_user_content_manager             (WebKitWebView             *web_view);
+
+WEBKIT_API gboolean
+webkit_web_view_is_editable                          (WebKitWebView             *web_view);
+
+WEBKIT_API void
+webkit_web_view_set_editable                         (WebKitWebView             *web_view,
+                                                      gboolean                  editable);
+
+WEBKIT_API WebKitEditorState *
+webkit_web_view_get_editor_state                     (WebKitWebView             *web_view);
+
+WEBKIT_API WebKitWebViewSessionState *
+webkit_web_view_get_session_state                    (WebKitWebView             *web_view);
+
+WEBKIT_API void
+webkit_web_view_restore_session_state                (WebKitWebView             *web_view,
+                                                      WebKitWebViewSessionState *state);
+
+G_END_DECLS
+
+#endif
diff --git a/Source/WebKit2/UIProcess/API/wpe/WebKitWebViewSessionState.h b/Source/WebKit2/UIProcess/API/wpe/WebKitWebViewSessionState.h
new file mode 100644 (file)
index 0000000..5355645
--- /dev/null
@@ -0,0 +1,53 @@
+/*
+ * Copyright (C) 2016 Igalia S.L.
+ *
+ * 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.
+ */
+
+#if !defined(__WEBKIT_H_INSIDE__) && !defined(WEBKIT2_COMPILATION)
+#error "Only <wpe/webkit.h> can be included directly."
+#endif
+
+#ifndef WebKitWebViewSessionState_h
+#define WebKitWebViewSessionState_h
+
+#include <glib-object.h>
+#include <wpe/WebKitDefines.h>
+
+G_BEGIN_DECLS
+
+#define WEBKIT_TYPE_WEB_VIEW_SESSION_STATE (webkit_web_view_session_state_get_type())
+
+typedef struct _WebKitWebViewSessionState WebKitWebViewSessionState;
+
+WEBKIT_API GType
+webkit_web_view_session_state_get_type  (void);
+
+WEBKIT_API WebKitWebViewSessionState *
+webkit_web_view_session_state_new       (GBytes *data);
+
+WEBKIT_API WebKitWebViewSessionState *
+webkit_web_view_session_state_ref       (WebKitWebViewSessionState *state);
+
+WEBKIT_API void
+webkit_web_view_session_state_unref     (WebKitWebViewSessionState *state);
+
+WEBKIT_API GBytes *
+webkit_web_view_session_state_serialize (WebKitWebViewSessionState *state);
+
+G_END_DECLS
+
+#endif
diff --git a/Source/WebKit2/UIProcess/API/wpe/WebKitWebViewWPE.cpp b/Source/WebKit2/UIProcess/API/wpe/WebKitWebViewWPE.cpp
new file mode 100644 (file)
index 0000000..2fa0683
--- /dev/null
@@ -0,0 +1,142 @@
+/*
+ * Copyright (C) 2017 Igalia S.L.
+ *
+ * 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 "WebKitWebView.h"
+
+#include "WebKitWebViewPrivate.h"
+
+gboolean webkitWebViewAuthenticate(WebKitWebView*, WebKitAuthenticationRequest*)
+{
+    return FALSE;
+}
+
+gboolean webkitWebViewScriptDialog(WebKitWebView*, WebKitScriptDialog*)
+{
+    return FALSE;
+}
+
+gboolean webkitWebViewRunFileChooser(WebKitWebView*, WebKitFileChooserRequest*)
+{
+    return FALSE;
+}
+
+/**
+ * webkit_web_view_new:
+ *
+ * Creates a new #WebKitWebView with the default #WebKitWebContext and
+ * no #WebKitUserContentManager associated with it.
+ * See also webkit_web_view_new_with_context(),
+ * webkit_web_view_new_with_user_content_manager(), and
+ * webkit_web_view_new_with_settings().
+ *
+ * Returns: The newly created #WebKitWebView
+ */
+WebKitWebView* webkit_web_view_new()
+{
+    return webkit_web_view_new_with_context(webkit_web_context_get_default());
+}
+
+/**
+ * webkit_web_view_new_with_context:
+ * @context: the #WebKitWebContext to be used by the #WebKitWebView
+ *
+ * Creates a new #WebKitWebView with the given #WebKitWebContext and
+ * no #WebKitUserContentManager associated with it.
+ * See also webkit_web_view_new_with_user_content_manager() and
+ * webkit_web_view_new_with_settings().
+ *
+ * Returns: The newly created #WebKitWebView
+ */
+WebKitWebView* webkit_web_view_new_with_context(WebKitWebContext* context)
+{
+    g_return_val_if_fail(WEBKIT_IS_WEB_CONTEXT(context), nullptr);
+
+    return WEBKIT_WEB_VIEW(g_object_new(WEBKIT_TYPE_WEB_VIEW,
+        "is-ephemeral", webkit_web_context_is_ephemeral(context),
+        "web-context", context,
+        nullptr));
+}
+
+/**
+ * webkit_web_view_new_with_related_view:
+ * @web_view: the related #WebKitWebView
+ *
+ * Creates a new #WebKitWebView sharing the same web process with @web_view.
+ * This method doesn't have any effect when %WEBKIT_PROCESS_MODEL_SHARED_SECONDARY_PROCESS
+ * process model is used, because a single web process is shared for all the web views in the
+ * same #WebKitWebContext. When using %WEBKIT_PROCESS_MODEL_MULTIPLE_SECONDARY_PROCESSES process model,
+ * this method should always be used when creating the #WebKitWebView in the #WebKitWebView::create signal.
+ * You can also use this method to implement other process models based on %WEBKIT_PROCESS_MODEL_MULTIPLE_SECONDARY_PROCESSES,
+ * like for example, sharing the same web process for all the views in the same security domain.
+ *
+ * The newly created #WebKitWebView will also have the same #WebKitUserContentManager
+ * and #WebKitSettings as @web_view.
+ *
+ * Returns: (transfer full): The newly created #WebKitWebView
+ *
+ * Since: 2.4
+ */
+WebKitWebView* webkit_web_view_new_with_related_view(WebKitWebView* webView)
+{
+    g_return_val_if_fail(WEBKIT_IS_WEB_VIEW(webView), nullptr);
+
+    return WEBKIT_WEB_VIEW(g_object_new(WEBKIT_TYPE_WEB_VIEW,
+        "user-content-manager", webkit_web_view_get_user_content_manager(webView),
+        "settings", webkit_web_view_get_settings(webView),
+        "related-view", webView,
+        nullptr));
+}
+
+/**
+ * webkit_web_view_new_with_settings:
+ * @settings: a #WebKitSettings
+ *
+ * Creates a new #WebKitWebView with the given #WebKitSettings.
+ * See also webkit_web_view_new_with_context(), and
+ * webkit_web_view_new_with_user_content_manager().
+ *
+ * Returns: The newly created #WebKitWebView
+ *
+ * Since: 2.6
+ */
+WebKitWebView* webkit_web_view_new_with_settings(WebKitSettings* settings)
+{
+    g_return_val_if_fail(WEBKIT_IS_SETTINGS(settings), nullptr);
+    return WEBKIT_WEB_VIEW(g_object_new(WEBKIT_TYPE_WEB_VIEW, "settings", settings, nullptr));
+}
+
+/**
+ * webkit_web_view_new_with_user_content_manager:
+ * @user_content_manager: a #WebKitUserContentManager.
+ *
+ * Creates a new #WebKitWebView with the given #WebKitUserContentManager.
+ * The content loaded in the view may be affected by the content injected
+ * in the view by the user content manager.
+ *
+ * Returns: The newly created #WebKitWebView
+ *
+ * Since: 2.6
+ */
+WebKitWebView* webkit_web_view_new_with_user_content_manager(WebKitUserContentManager* userContentManager)
+{
+    g_return_val_if_fail(WEBKIT_IS_USER_CONTENT_MANAGER(userContentManager), nullptr);
+
+    return WEBKIT_WEB_VIEW(g_object_new(WEBKIT_TYPE_WEB_VIEW, "user-content-manager", userContentManager, nullptr));
+}
diff --git a/Source/WebKit2/UIProcess/API/wpe/WebKitWebsiteData.h b/Source/WebKit2/UIProcess/API/wpe/WebKitWebsiteData.h
new file mode 100644 (file)
index 0000000..3a462aa
--- /dev/null
@@ -0,0 +1,87 @@
+/*
+ * Copyright (C) 2017 Igalia S.L.
+ *
+ * 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.
+ */
+
+#if !defined(__WEBKIT_H_INSIDE__) && !defined(WEBKIT2_COMPILATION)
+#error "Only <wpe/webkit.h> can be included directly."
+#endif
+
+#ifndef WebKitWebsiteData_h
+#define WebKitWebsiteData_h
+
+#include <glib-object.h>
+#include <wpe/WebKitDefines.h>
+
+G_BEGIN_DECLS
+
+#define WEBKIT_TYPE_WEBSITE_DATA (webkit_website_data_get_type())
+
+typedef struct _WebKitWebsiteData WebKitWebsiteData;
+
+/**
+ * WebKitWebsiteDataTypes:
+ * @WEBKIT_WEBSITE_DATA_MEMORY_CACHE: Memory cache.
+ * @WEBKIT_WEBSITE_DATA_DISK_CACHE: HTTP disk cache.
+ * @WEBKIT_WEBSITE_DATA_OFFLINE_APPLICATION_CACHE: Offline web application cache.
+ * @WEBKIT_WEBSITE_DATA_SESSION_STORAGE: Session storage data.
+ * @WEBKIT_WEBSITE_DATA_LOCAL_STORAGE: Local storage data.
+ * @WEBKIT_WEBSITE_DATA_WEBSQL_DATABASES: WebSQL databases.
+ * @WEBKIT_WEBSITE_DATA_INDEXEDDB_DATABASES: IndexedDB databases.
+ * @WEBKIT_WEBSITE_DATA_PLUGIN_DATA: Plugins data.
+ * @WEBKIT_WEBSITE_DATA_COOKIES: Cookies.
+ * @WEBKIT_WEBSITE_DATA_ALL: All types.
+ *
+ * Enum values with flags representing types of Website data.
+ *
+ * Since: 2.16
+ */
+typedef enum {
+    WEBKIT_WEBSITE_DATA_MEMORY_CACHE              = 1 << 0,
+    WEBKIT_WEBSITE_DATA_DISK_CACHE                = 1 << 1,
+    WEBKIT_WEBSITE_DATA_OFFLINE_APPLICATION_CACHE = 1 << 2,
+    WEBKIT_WEBSITE_DATA_SESSION_STORAGE           = 1 << 3,
+    WEBKIT_WEBSITE_DATA_LOCAL_STORAGE             = 1 << 4,
+    WEBKIT_WEBSITE_DATA_WEBSQL_DATABASES          = 1 << 5,
+    WEBKIT_WEBSITE_DATA_INDEXEDDB_DATABASES       = 1 << 6,
+    WEBKIT_WEBSITE_DATA_PLUGIN_DATA               = 1 << 7,
+    WEBKIT_WEBSITE_DATA_COOKIES                   = 1 << 8,
+    WEBKIT_WEBSITE_DATA_ALL                       = (1 << 9) - 1
+} WebKitWebsiteDataTypes;
+
+WEBKIT_API GType
+webkit_website_data_get_type      (void);
+
+WEBKIT_API WebKitWebsiteData *
+webkit_website_data_ref           (WebKitWebsiteData     *website_data);
+
+WEBKIT_API void
+webkit_website_data_unref         (WebKitWebsiteData     *website_data);
+
+WEBKIT_API const char *
+webkit_website_data_get_name      (WebKitWebsiteData     *website_data);
+
+WEBKIT_API WebKitWebsiteDataTypes
+webkit_website_data_get_types     (WebKitWebsiteData     *website_data);
+
+WEBKIT_API guint64
+webkit_website_data_get_size      (WebKitWebsiteData     *website_data,
+                                   WebKitWebsiteDataTypes types);
+
+G_END_DECLS
+
+#endif /* WebKitWebsiteData_h */
diff --git a/Source/WebKit2/UIProcess/API/wpe/WebKitWebsiteDataManager.h b/Source/WebKit2/UIProcess/API/wpe/WebKitWebsiteDataManager.h
new file mode 100644 (file)
index 0000000..1655d53
--- /dev/null
@@ -0,0 +1,134 @@
+/*
+ * Copyright (C) 2015 Igalia S.L.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Les