Diff
Modified: trunk/Source/WebKit2/CMakeLists.txt (120300 => 120301)
--- trunk/Source/WebKit2/CMakeLists.txt 2012-06-14 09:32:37 UTC (rev 120300)
+++ trunk/Source/WebKit2/CMakeLists.txt 2012-06-14 09:43:25 UTC (rev 120301)
@@ -123,6 +123,7 @@
Shared/ImmutableArray.cpp
Shared/ImmutableDictionary.cpp
Shared/IntentData.cpp
+ Shared/IntentServiceInfo.cpp
Shared/MutableArray.cpp
Shared/MutableDictionary.cpp
Shared/OriginAndDatabases.cpp
@@ -238,6 +239,7 @@
UIProcess/WebIconDatabaseClient.cpp
UIProcess/WebInspectorProxy.cpp
UIProcess/WebIntentData.cpp
+ UIProcess/WebIntentServiceInfo.cpp
UIProcess/WebKeyValueStorageManagerProxy.cpp
UIProcess/WebLayerTreeRenderer.cpp
UIProcess/WebLoaderClient.cpp
Modified: trunk/Source/WebKit2/ChangeLog (120300 => 120301)
--- trunk/Source/WebKit2/ChangeLog 2012-06-14 09:32:37 UTC (rev 120300)
+++ trunk/Source/WebKit2/ChangeLog 2012-06-14 09:43:25 UTC (rev 120301)
@@ -1,3 +1,65 @@
+2012-06-14 Christophe Dumez <christophe.du...@intel.com>
+
+ [WK2] Add implementation for registerIntentService in WebFrameLoaderClient
+ https://bugs.webkit.org/show_bug.cgi?id=88399
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ Add implementation for registerIntentService() in
+ WebFrameLoaderClient.
+
+ * CMakeLists.txt:
+ * GNUmakefile.list.am:
+ * Shared/API/c/WKBase.h:
+ * Shared/APIClientTraits.h:
+ * Shared/APIObject.h:
+ * Shared/IntentServiceInfo.cpp: Added.
+ (WebKit):
+ (WebKit::IntentServiceInfo::encode):
+ (WebKit::IntentServiceInfo::decode):
+ * Shared/IntentServiceInfo.h: Added.
+ (CoreIPC):
+ (WebKit):
+ (IntentServiceInfo):
+ * Target.pri:
+ * UIProcess/API/C/WKAPICast.h:
+ (WebKit):
+ * UIProcess/API/C/WKPage.h:
+ * UIProcess/API/gtk/WebKitLoaderClient.cpp:
+ (attachLoaderClientToView):
+ * UIProcess/WebIntentServiceInfo.cpp: Added.
+ (WebKit):
+ (WebKit::WebIntentServiceInfo::WebIntentServiceInfo):
+ * UIProcess/WebIntentServiceInfo.h: Added.
+ (WebKit):
+ (WebIntentServiceInfo):
+ (WebKit::WebIntentServiceInfo::create):
+ (WebKit::WebIntentServiceInfo::~WebIntentServiceInfo):
+ (WebKit::WebIntentServiceInfo::action):
+ (WebKit::WebIntentServiceInfo::payloadType):
+ (WebKit::WebIntentServiceInfo::href):
+ (WebKit::WebIntentServiceInfo::title):
+ (WebKit::WebIntentServiceInfo::disposition):
+ (WebKit::WebIntentServiceInfo::type):
+ * UIProcess/WebLoaderClient.cpp:
+ (WebKit):
+ (WebKit::WebLoaderClient::registerIntentServiceForFrame):
+ * UIProcess/WebLoaderClient.h:
+ (WebKit):
+ (WebLoaderClient):
+ * UIProcess/WebPageProxy.cpp:
+ (WebKit):
+ (WebKit::WebPageProxy::registerIntentServiceForFrame):
+ * UIProcess/WebPageProxy.h:
+ (WebKit):
+ (WebPageProxy):
+ * UIProcess/WebPageProxy.messages.in:
+ * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
+ (WebKit):
+ (WebKit::WebFrameLoaderClient::registerIntentService):
+ * WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
+ (WebFrameLoaderClient):
+
2012-06-14 Carlos Garcia Campos <cgar...@igalia.com>
[WK2] Add WKHitTestResultIsContentEditable()
Modified: trunk/Source/WebKit2/GNUmakefile.list.am (120300 => 120301)
--- trunk/Source/WebKit2/GNUmakefile.list.am 2012-06-14 09:32:37 UTC (rev 120300)
+++ trunk/Source/WebKit2/GNUmakefile.list.am 2012-06-14 09:43:25 UTC (rev 120301)
@@ -364,6 +364,8 @@
Source/WebKit2/Shared/ImmutableDictionary.h \
Source/WebKit2/Shared/IntentData.cpp \
Source/WebKit2/Shared/IntentData.h \
+ Source/WebKit2/Shared/IntentServiceInfo.cpp \
+ Source/WebKit2/Shared/IntentServiceInfo.h \
Source/WebKit2/Shared/LayerTreeContext.h \
Source/WebKit2/Shared/MutableArray.cpp \
Source/WebKit2/Shared/MutableArray.h \
@@ -805,6 +807,8 @@
Source/WebKit2/UIProcess/WebInspectorProxy.h \
Source/WebKit2/UIProcess/WebIntentData.cpp \
Source/WebKit2/UIProcess/WebIntentData.h \
+ Source/WebKit2/UIProcess/WebIntentServiceInfo.cpp \
+ Source/WebKit2/UIProcess/WebIntentServiceInfo.h \
Source/WebKit2/UIProcess/WebKeyValueStorageManagerProxy.cpp \
Source/WebKit2/UIProcess/WebKeyValueStorageManagerProxy.h \
Source/WebKit2/UIProcess/WebMediaCacheManagerProxy.cpp \
Modified: trunk/Source/WebKit2/Shared/API/c/WKBase.h (120300 => 120301)
--- trunk/Source/WebKit2/Shared/API/c/WKBase.h 2012-06-14 09:32:37 UTC (rev 120300)
+++ trunk/Source/WebKit2/Shared/API/c/WKBase.h 2012-06-14 09:43:25 UTC (rev 120301)
@@ -99,6 +99,7 @@
typedef const struct OpaqueWKIconDatabase* WKIconDatabaseRef;
typedef const struct OpaqueWKInspector* WKInspectorRef;
typedef const struct OpaqueWKIntentData* WKIntentDataRef;
+typedef const struct OpaqueWKIntentServiceInfo* WKIntentServiceInfoRef;
typedef const struct OpaqueWKKeyValueStorageManager* WKKeyValueStorageManagerRef;
typedef const struct OpaqueWKMediaCacheManager* WKMediaCacheManagerRef;
typedef const struct OpaqueWKNavigationData* WKNavigationDataRef;
Modified: trunk/Source/WebKit2/Shared/APIObject.h (120300 => 120301)
--- trunk/Source/WebKit2/Shared/APIObject.h 2012-06-14 09:32:37 UTC (rev 120300)
+++ trunk/Source/WebKit2/Shared/APIObject.h 2012-06-14 09:43:25 UTC (rev 120301)
@@ -89,6 +89,7 @@
TypeIconDatabase,
TypeInspector,
TypeIntentData,
+ TypeIntentServiceInfo,
TypeKeyValueStorageManager,
TypeMediaCacheManager,
TypeNavigationData,
Added: trunk/Source/WebKit2/Shared/IntentServiceInfo.cpp (0 => 120301)
--- trunk/Source/WebKit2/Shared/IntentServiceInfo.cpp (rev 0)
+++ trunk/Source/WebKit2/Shared/IntentServiceInfo.cpp 2012-06-14 09:43:25 UTC (rev 120301)
@@ -0,0 +1,65 @@
+/*
+ * Copyright (C) 2012 Intel Corporation. All rights reserved.
+ *
+ * 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.
+ */
+
+#include "config.h"
+#include "IntentServiceInfo.h"
+
+#if ENABLE(WEB_INTENTS_TAG)
+
+#include "APIObject.h"
+#include "WebCoreArgumentCoders.h"
+
+using namespace WebCore;
+
+namespace WebKit {
+
+void IntentServiceInfo::encode(CoreIPC::ArgumentEncoder* encoder) const
+{
+ encoder->encode(action);
+ encoder->encode(type);
+ encoder->encode(href);
+ encoder->encode(title);
+ encoder->encode(disposition);
+}
+
+bool IntentServiceInfo::decode(CoreIPC::ArgumentDecoder* decoder, IntentServiceInfo& intentServiceInfo)
+{
+ if (!decoder->decode(intentServiceInfo.action))
+ return false;
+ if (!decoder->decode(intentServiceInfo.type))
+ return false;
+ if (!decoder->decode(intentServiceInfo.href))
+ return false;
+ if (!decoder->decode(intentServiceInfo.title))
+ return false;
+ if (!decoder->decode(intentServiceInfo.disposition))
+ return false;
+
+ return true;
+}
+
+} // namespace WebKit
+
+#endif // ENABLE(WEB_INTENTS_TAG)
Added: trunk/Source/WebKit2/Shared/IntentServiceInfo.h (0 => 120301)
--- trunk/Source/WebKit2/Shared/IntentServiceInfo.h (rev 0)
+++ trunk/Source/WebKit2/Shared/IntentServiceInfo.h 2012-06-14 09:43:25 UTC (rev 120301)
@@ -0,0 +1,57 @@
+/*
+ * Copyright (C) 2012 Intel Corporation. All rights reserved.
+ *
+ * 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.
+ */
+
+#ifndef IntentServiceInfo_h
+#define IntentServiceInfo_h
+
+#if ENABLE(WEB_INTENTS_TAG)
+
+#include "APIObject.h"
+#include <WebCore/KURL.h>
+#include <wtf/text/WTFString.h>
+
+namespace CoreIPC {
+class ArgumentDecoder;
+class ArgumentEncoder;
+}
+
+namespace WebKit {
+
+struct IntentServiceInfo {
+ void encode(CoreIPC::ArgumentEncoder*) const;
+ static bool decode(CoreIPC::ArgumentDecoder*, IntentServiceInfo&);
+
+ String action;
+ String type;
+ WebCore::KURL href;
+ String title;
+ String disposition;
+};
+
+} // namespace WebKit
+
+#endif // ENABLE(WEB_INTENTS_TAG)
+
+#endif // IntentServiceInfo_h
Modified: trunk/Source/WebKit2/Target.pri (120300 => 120301)
--- trunk/Source/WebKit2/Target.pri 2012-06-14 09:32:37 UTC (rev 120300)
+++ trunk/Source/WebKit2/Target.pri 2012-06-14 09:43:25 UTC (rev 120301)
@@ -77,6 +77,7 @@
Shared/ImmutableArray.h \
Shared/ImmutableDictionary.h \
Shared/IntentData.h \
+ Shared/IntentServiceInfo.h \
Shared/LayerTreeContext.h \
Shared/MutableArray.h \
Shared/MutableDictionary.h \
@@ -254,6 +255,7 @@
UIProcess/WebIconDatabaseClient.h \
UIProcess/WebInspectorProxy.h \
UIProcess/WebIntentData.h \
+ UIProcess/WebIntentServiceInfo.h \
UIProcess/WebKeyValueStorageManagerProxy.h \
UIProcess/WebLayerTreeRenderer.h \
UIProcess/WebLoaderClient.h \
@@ -443,6 +445,7 @@
Shared/ImmutableArray.cpp \
Shared/ImmutableDictionary.cpp \
Shared/IntentData.cpp \
+ Shared/IntentServiceInfo.cpp \
Shared/MutableArray.cpp \
Shared/MutableDictionary.cpp \
Shared/OriginAndDatabases.cpp \
@@ -600,6 +603,7 @@
UIProcess/WebIconDatabaseClient.cpp \
UIProcess/WebInspectorProxy.cpp \
UIProcess/WebIntentData.cpp \
+ UIProcess/WebIntentServiceInfo.cpp \
UIProcess/WebKeyValueStorageManagerProxy.cpp \
UIProcess/WebLayerTreeRenderer.cpp \
UIProcess/WebLoaderClient.cpp \
Modified: trunk/Source/WebKit2/UIProcess/API/C/WKAPICast.h (120300 => 120301)
--- trunk/Source/WebKit2/UIProcess/API/C/WKAPICast.h 2012-06-14 09:32:37 UTC (rev 120300)
+++ trunk/Source/WebKit2/UIProcess/API/C/WKAPICast.h 2012-06-14 09:43:25 UTC (rev 120301)
@@ -71,6 +71,7 @@
class WebIconDatabase;
class WebInspectorProxy;
class WebIntentData;
+class WebIntentServiceInfo;
class WebKeyValueStorageManagerProxy;
class WebMediaCacheManagerProxy;
class WebNavigationData;
@@ -109,6 +110,7 @@
WK_ADD_API_MAPPING(WKHitTestResultRef, WebHitTestResult)
WK_ADD_API_MAPPING(WKIconDatabaseRef, WebIconDatabase)
WK_ADD_API_MAPPING(WKIntentDataRef, WebIntentData)
+WK_ADD_API_MAPPING(WKIntentServiceInfoRef, WebIntentServiceInfo)
WK_ADD_API_MAPPING(WKKeyValueStorageManagerRef, WebKeyValueStorageManagerProxy)
WK_ADD_API_MAPPING(WKMediaCacheManagerRef, WebMediaCacheManagerProxy)
WK_ADD_API_MAPPING(WKNavigationDataRef, WebNavigationData)
Modified: trunk/Source/WebKit2/UIProcess/API/C/WKPage.h (120300 => 120301)
--- trunk/Source/WebKit2/UIProcess/API/C/WKPage.h 2012-06-14 09:32:37 UTC (rev 120300)
+++ trunk/Source/WebKit2/UIProcess/API/C/WKPage.h 2012-06-14 09:43:25 UTC (rev 120301)
@@ -74,6 +74,7 @@
typedef void (*WKPageWillGoToBackForwardListItemCallback)(WKPageRef page, WKBackForwardListItemRef item, WKTypeRef userData, const void *clientInfo);
typedef void (*WKPagePluginDidFailCallback)(WKPageRef page, WKErrorCode errorCode, WKStringRef mimeType, WKStringRef pluginIdentifier, WKStringRef pluginVersion, const void* clientInfo);
typedef void (*WKPageDidReceiveIntentForFrameCallback)(WKPageRef page, WKFrameRef frame, WKIntentDataRef intent, const void *clientInfo);
+typedef void (*WKPageRegisterIntentServiceForFrameCallback)(WKPageRef page, WKFrameRef frame, WKIntentServiceInfoRef serviceInfo, const void *clientInfo);
// Deprecated
typedef void (*WKPageDidFailToInitializePluginCallback_deprecatedForUseWithV0)(WKPageRef page, WKStringRef mimeType, const void* clientInfo);
@@ -124,6 +125,7 @@
// Version 2
WKPageDidReceiveIntentForFrameCallback didReceiveIntentForFrame;
+ WKPageRegisterIntentServiceForFrameCallback registerIntentServiceForFrame;
};
typedef struct WKPageLoaderClient WKPageLoaderClient;
Modified: trunk/Source/WebKit2/UIProcess/API/gtk/WebKitLoaderClient.cpp (120300 => 120301)
--- trunk/Source/WebKit2/UIProcess/API/gtk/WebKitLoaderClient.cpp 2012-06-14 09:32:37 UTC (rev 120300)
+++ trunk/Source/WebKit2/UIProcess/API/gtk/WebKitLoaderClient.cpp 2012-06-14 09:43:25 UTC (rev 120301)
@@ -150,6 +150,7 @@
0, // interactionOccurredWhileProcessUnresponsive
0, // pluginDidFail
0, // didReceiveIntentForFrame
+ 0, // registerIntentServiceForFrame
};
WKPageRef wkPage = toAPI(webkitWebViewBaseGetPage(WEBKIT_WEB_VIEW_BASE(webView)));
WKPageSetPageLoaderClient(wkPage, &wkLoaderClient);
Added: trunk/Source/WebKit2/UIProcess/WebIntentServiceInfo.cpp (0 => 120301)
--- trunk/Source/WebKit2/UIProcess/WebIntentServiceInfo.cpp (rev 0)
+++ trunk/Source/WebKit2/UIProcess/WebIntentServiceInfo.cpp 2012-06-14 09:43:25 UTC (rev 120301)
@@ -0,0 +1,40 @@
+/*
+ * Copyright (C) 2012 Intel Corporation. All rights reserved.
+ *
+ * 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.
+ */
+
+#include "config.h"
+#include "WebIntentServiceInfo.h"
+
+#if ENABLE(WEB_INTENTS_TAG)
+
+namespace WebKit {
+
+WebIntentServiceInfo::WebIntentServiceInfo(const IntentServiceInfo& store)
+ : m_store(store)
+{
+}
+
+} // namespace WebKit
+
+#endif // ENABLE(WEB_INTENTS_TAG)
Added: trunk/Source/WebKit2/UIProcess/WebIntentServiceInfo.h (0 => 120301)
--- trunk/Source/WebKit2/UIProcess/WebIntentServiceInfo.h (rev 0)
+++ trunk/Source/WebKit2/UIProcess/WebIntentServiceInfo.h 2012-06-14 09:43:25 UTC (rev 120301)
@@ -0,0 +1,66 @@
+/*
+ * Copyright (C) 2012 Intel Corporation. All rights reserved.
+ *
+ * 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.
+ */
+
+#ifndef WebIntentServiceInfo_h
+#define WebIntentServiceInfo_h
+
+#if ENABLE(WEB_INTENTS_TAG)
+
+#include "APIObject.h"
+#include "IntentServiceInfo.h"
+#include <wtf/PassRefPtr.h>
+
+namespace WebKit {
+
+class WebIntentServiceInfo : public APIObject {
+public:
+ static const Type APIType = TypeIntentServiceInfo;
+
+ static PassRefPtr<WebIntentServiceInfo> create(const IntentServiceInfo& store)
+ {
+ return adoptRef(new WebIntentServiceInfo(store));
+ }
+
+ virtual ~WebIntentServiceInfo() { }
+
+ const String& action() const { return m_store.action; }
+ const String& payloadType() const { return m_store.type; }
+ const WebCore::KURL& href() const { return m_store.href; }
+ const String& title() const { return m_store.title; }
+ const String& disposition() const { return m_store.disposition; }
+
+private:
+ WebIntentServiceInfo(const IntentServiceInfo&);
+
+ virtual Type type() const { return APIType; }
+
+ IntentServiceInfo m_store;
+};
+
+} // namespace WebKit
+
+#endif // ENABLE(WEB_INTENTS_TAG)
+
+#endif // WebIntentServiceInfo_h
Modified: trunk/Source/WebKit2/UIProcess/WebLoaderClient.cpp (120300 => 120301)
--- trunk/Source/WebKit2/UIProcess/WebLoaderClient.cpp 2012-06-14 09:32:37 UTC (rev 120300)
+++ trunk/Source/WebKit2/UIProcess/WebLoaderClient.cpp 2012-06-14 09:43:25 UTC (rev 120301)
@@ -33,6 +33,7 @@
#if ENABLE(WEB_INTENTS)
#include "WebIntentData.h"
+#include "WebIntentServiceInfo.h"
#endif
using namespace WebCore;
@@ -177,6 +178,16 @@
}
#endif
+#if ENABLE(WEB_INTENTS_TAG)
+void WebLoaderClient::registerIntentServiceForFrame(WebPageProxy* page, WebFrameProxy* frame, WebIntentServiceInfo* serviceInfo)
+{
+ if (!m_client.registerIntentServiceForFrame)
+ return;
+
+ m_client.registerIntentServiceForFrame(toAPI(page), toAPI(frame), toAPI(serviceInfo), m_client.clientInfo);
+}
+#endif
+
bool WebLoaderClient::canAuthenticateAgainstProtectionSpaceInFrame(WebPageProxy* page, WebFrameProxy* frame, WebProtectionSpace* protectionSpace)
{
if (!m_client.canAuthenticateAgainstProtectionSpaceInFrame)
Modified: trunk/Source/WebKit2/UIProcess/WebLoaderClient.h (120300 => 120301)
--- trunk/Source/WebKit2/UIProcess/WebLoaderClient.h 2012-06-14 09:32:37 UTC (rev 120300)
+++ trunk/Source/WebKit2/UIProcess/WebLoaderClient.h 2012-06-14 09:43:25 UTC (rev 120301)
@@ -51,6 +51,10 @@
class WebIntentData;
#endif
+#if ENABLE(WEB_INTENTS_TAG)
+class WebIntentServiceInfo;
+#endif
+
class WebLoaderClient : public APIClient<WKPageLoaderClient, kWKPageLoaderClientCurrentVersion> {
public:
void didStartProvisionalLoadForFrame(WebPageProxy*, WebFrameProxy*, APIObject*);
@@ -72,6 +76,10 @@
void didReceiveIntentForFrame(WebPageProxy*, WebFrameProxy*, WebIntentData*);
#endif
+#if ENABLE(WEB_INTENTS_TAG)
+ void registerIntentServiceForFrame(WebPageProxy*, WebFrameProxy*, WebIntentServiceInfo*);
+#endif
+
// FIXME: didFirstVisuallyNonEmptyLayoutForFrame and didNewFirstVisuallyNonEmptyLayout should be merged.
// The only reason for both to exist is to experiment with different heuristics for the time being.
void didNewFirstVisuallyNonEmptyLayout(WebPageProxy*, APIObject*);
Modified: trunk/Source/WebKit2/UIProcess/WebPageProxy.cpp (120300 => 120301)
--- trunk/Source/WebKit2/UIProcess/WebPageProxy.cpp 2012-06-14 09:32:37 UTC (rev 120300)
+++ trunk/Source/WebKit2/UIProcess/WebPageProxy.cpp 2012-06-14 09:43:25 UTC (rev 120301)
@@ -87,7 +87,9 @@
#if ENABLE(WEB_INTENTS)
#include "IntentData.h"
+#include "IntentServiceInfo.h"
#include "WebIntentData.h"
+#include "WebIntentServiceInfo.h"
#endif
#if USE(UI_SIDE_COMPOSITING)
@@ -1871,6 +1873,17 @@
m_loaderClient.didFinishProgress(this);
}
+#if ENABLE(WEB_INTENTS_TAG)
+void WebPageProxy::registerIntentServiceForFrame(uint64_t frameID, const IntentServiceInfo& serviceInfo)
+{
+ WebFrameProxy* frame = process()->webFrame(frameID);
+ MESSAGE_CHECK(frame);
+
+ RefPtr<WebIntentServiceInfo> webIntentServiceInfo = WebIntentServiceInfo::create(serviceInfo);
+ m_loaderClient.registerIntentServiceForFrame(this, frame, webIntentServiceInfo.get());
+}
+#endif
+
void WebPageProxy::didStartProvisionalLoadForFrame(uint64_t frameID, const String& url, const String& unreachableURL, CoreIPC::ArgumentDecoder* arguments)
{
clearPendingAPIRequestURL();
Modified: trunk/Source/WebKit2/UIProcess/WebPageProxy.h (120300 => 120301)
--- trunk/Source/WebKit2/UIProcess/WebPageProxy.h 2012-06-14 09:32:37 UTC (rev 120300)
+++ trunk/Source/WebKit2/UIProcess/WebPageProxy.h 2012-06-14 09:43:25 UTC (rev 120301)
@@ -160,6 +160,10 @@
struct IntentData;
#endif
+#if ENABLE(WEB_INTENTS_TAG)
+struct IntentServiceInfo;
+#endif
+
typedef GenericCallback<WKStringRef, StringImpl*> StringCallback;
typedef GenericCallback<WKSerializedScriptValueRef, WebSerializedScriptValue*> ScriptValueCallback;
@@ -721,6 +725,9 @@
#if ENABLE(WEB_INTENTS)
void didReceiveIntentForFrame(uint64_t frameID, const IntentData&);
#endif
+#if ENABLE(WEB_INTENTS_TAG)
+ void registerIntentServiceForFrame(uint64_t frameID, const IntentServiceInfo&);
+#endif
void decidePolicyForNavigationAction(uint64_t frameID, uint32_t navigationType, uint32_t modifiers, int32_t mouseButton, const WebCore::ResourceRequest&, uint64_t listenerID, CoreIPC::ArgumentDecoder*, bool& receivedPolicyAction, uint64_t& policyAction, uint64_t& downloadID);
void decidePolicyForNewWindowAction(uint64_t frameID, uint32_t navigationType, uint32_t modifiers, int32_t mouseButton, const WebCore::ResourceRequest&, const String& frameName, uint64_t listenerID, CoreIPC::ArgumentDecoder*);
Modified: trunk/Source/WebKit2/UIProcess/WebPageProxy.messages.in (120300 => 120301)
--- trunk/Source/WebKit2/UIProcess/WebPageProxy.messages.in 2012-06-14 09:32:37 UTC (rev 120300)
+++ trunk/Source/WebKit2/UIProcess/WebPageProxy.messages.in 2012-06-14 09:43:25 UTC (rev 120301)
@@ -93,6 +93,9 @@
#if ENABLE(WEB_INTENTS)
DidReceiveIntentForFrame(uint64_t frameID, WebKit::IntentData intent)
#endif
+#if ENABLE(WEB_INTENTS_TAG)
+ RegisterIntentServiceForFrame(uint64_t frameID, WebKit::IntentServiceInfo serviceInfo);
+#endif
# Progress messages
DidChangeProgress(double value)
Modified: trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp (120300 => 120301)
--- trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp 2012-06-14 09:32:37 UTC (rev 120300)
+++ trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp 2012-06-14 09:43:25 UTC (rev 120301)
@@ -75,6 +75,7 @@
#if ENABLE(WEB_INTENTS)
#include "IntentData.h"
+#include "IntentServiceInfo.h"
#include <WebCore/IntentRequest.h>
#endif
@@ -1560,6 +1561,24 @@
}
#endif
+#if ENABLE(WEB_INTENTS_TAG)
+void WebFrameLoaderClient::registerIntentService(const String& action, const String& type, const KURL& href, const String& title, const String& disposition)
+{
+ WebPage* webPage = m_frame->page();
+ if (!webPage)
+ return;
+
+ IntentServiceInfo serviceInfo;
+ serviceInfo.action = ""
+ serviceInfo.type = type;
+ serviceInfo.href = ""
+ serviceInfo.title = title;
+ serviceInfo.disposition = disposition;
+
+ webPage->send(Messages::WebPageProxy::RegisterIntentServiceForFrame(m_frame->frameID(), serviceInfo));
+}
+#endif
+
bool WebFrameLoaderClient::shouldUsePluginDocument(const String& /*mimeType*/) const
{
notImplemented();
Modified: trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebFrameLoaderClient.h (120300 => 120301)
--- trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebFrameLoaderClient.h 2012-06-14 09:32:37 UTC (rev 120300)
+++ trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebFrameLoaderClient.h 2012-06-14 09:43:25 UTC (rev 120301)
@@ -231,6 +231,9 @@
#if ENABLE(WEB_INTENTS)
virtual void dispatchIntent(PassRefPtr<WebCore::IntentRequest>) OVERRIDE;
#endif
+#if ENABLE(WEB_INTENTS_TAG)
+ virtual void registerIntentService(const String& action, const String& type, const WebCore::KURL& href, const String& title, const String& disposition) OVERRIDE;
+#endif
virtual bool shouldUsePluginDocument(const String& /*mimeType*/) const OVERRIDE;
Modified: trunk/Tools/ChangeLog (120300 => 120301)
--- trunk/Tools/ChangeLog 2012-06-14 09:32:37 UTC (rev 120300)
+++ trunk/Tools/ChangeLog 2012-06-14 09:43:25 UTC (rev 120301)
@@ -1,3 +1,17 @@
+2012-06-14 Christophe Dumez <christophe.du...@intel.com>
+
+ [WK2] Add implementation for registerIntentService in WebFrameLoaderClient
+ https://bugs.webkit.org/show_bug.cgi?id=88399
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ Update initialization of WKPageLoaderClient.
+
+ * MiniBrowser/mac/BrowserWindowController.m:
+ (-[BrowserWindowController awakeFromNib]):
+ * WebKitTestRunner/TestController.cpp:
+ (WTR::TestController::initialize):
+
2012-06-14 Sudarsana Nagineni <sudarsana.nagin...@linux.intel.com>
[EFL] [DRT] Implement setDomainRelaxationForbiddenForURLScheme in EFL DRT
Modified: trunk/Tools/MiniBrowser/mac/BrowserWindowController.m (120300 => 120301)
--- trunk/Tools/MiniBrowser/mac/BrowserWindowController.m 2012-06-14 09:32:37 UTC (rev 120300)
+++ trunk/Tools/MiniBrowser/mac/BrowserWindowController.m 2012-06-14 09:43:25 UTC (rev 120301)
@@ -613,6 +613,7 @@
0, // interactionOccurredWhileProcessUnresponsive
0, // pluginDidFail
0, // didReceiveIntentForFrame
+ 0, // registerIntentServiceForFrame
};
WKPageSetPageLoaderClient(_webView.pageRef, &loadClient);
Modified: trunk/Tools/WebKitTestRunner/TestController.cpp (120300 => 120301)
--- trunk/Tools/WebKitTestRunner/TestController.cpp 2012-06-14 09:32:37 UTC (rev 120300)
+++ trunk/Tools/WebKitTestRunner/TestController.cpp 2012-06-14 09:43:25 UTC (rev 120301)
@@ -410,6 +410,7 @@
0, // interactionOccurredWhileProcessUnresponsive
0, // pluginDidFail
0, // didReceiveIntentForFrame
+ 0, // registerIntentServiceForFrame
};
WKPageSetPageLoaderClient(m_mainWebView->page(), &pageLoaderClient);
}