| Differences between
and this patch
- a/Source/WebKit2/CMakeLists.txt -2 / +2 lines
Lines 153-158 SET(WebKit2_SOURCES a/Source/WebKit2/CMakeLists.txt_sec1
153
    Shared/WebGraphicsContext.cpp
153
    Shared/WebGraphicsContext.cpp
154
    Shared/WebHitTestResult.cpp
154
    Shared/WebHitTestResult.cpp
155
    Shared/WebImage.cpp
155
    Shared/WebImage.cpp
156
    Shared/WebIntentData.cpp
157
    Shared/WebIntentServiceInfo.cpp
156
    Shared/WebKeyboardEvent.cpp
158
    Shared/WebKeyboardEvent.cpp
157
    Shared/WebLayerTreeInfo.cpp
159
    Shared/WebLayerTreeInfo.cpp
158
    Shared/WebMemorySampler.cpp
160
    Shared/WebMemorySampler.cpp
Lines 245-252 SET(WebKit2_SOURCES a/Source/WebKit2/CMakeLists.txt_sec2
245
    UIProcess/WebIconDatabase.cpp
247
    UIProcess/WebIconDatabase.cpp
246
    UIProcess/WebIconDatabaseClient.cpp
248
    UIProcess/WebIconDatabaseClient.cpp
247
    UIProcess/WebInspectorProxy.cpp
249
    UIProcess/WebInspectorProxy.cpp
248
    UIProcess/WebIntentData.cpp
249
    UIProcess/WebIntentServiceInfo.cpp
250
    UIProcess/WebKeyValueStorageManagerProxy.cpp
250
    UIProcess/WebKeyValueStorageManagerProxy.cpp
251
    UIProcess/WebLayerTreeRenderer.cpp
251
    UIProcess/WebLayerTreeRenderer.cpp
252
    UIProcess/WebLoaderClient.cpp
252
    UIProcess/WebLoaderClient.cpp
- a/Source/WebKit2/ChangeLog +78 lines
Lines 1-3 a/Source/WebKit2/ChangeLog_sec1
1
2012-07-10  Christophe Dumez  <christophe.dumez@intel.com>
2
3
        [WK2] WebKitTestRunner needs to print information about Web intents
4
        https://bugs.webkit.org/show_bug.cgi?id=90873
5
6
        Reviewed by NOBODY (OOPS!).
7
8
        Add Bundle API for Web Intents. This is needed by the WebKitTestRunner
9
        to print information about the new intent requests and the intent
10
        service registrations.
11
12
        * CMakeLists.txt: Move WebIntentData and WebIntentServiceInfo from
13
        UIProcess/ to Shared/.
14
        * GNUmakefile.list.am: Move WebIntentData and WebIntentServiceInfo from
15
        UIProcess/ to Shared/.
16
        * Shared/APIClientTraits.h:
17
        * Shared/WebIntentData.cpp: Renamed from Source/WebKit2/UIProcess/WebIntentData.cpp.
18
        (WebKit):
19
        (WebKit::WebIntentData::WebIntentData):
20
        (WebKit::WebIntentData::data):
21
        (WebKit::WebIntentData::suggestions):
22
        (WebKit::WebIntentData::extra):
23
        (WebKit::WebIntentData::extras):
24
        * Shared/WebIntentData.h: Renamed from Source/WebKit2/UIProcess/WebIntentData.h.
25
        (WebKit):
26
        (WebIntentData):
27
        (WebKit::WebIntentData::create):
28
        (WebKit::WebIntentData::~WebIntentData):
29
        (WebKit::WebIntentData::action):
30
        (WebKit::WebIntentData::payloadType):
31
        (WebKit::WebIntentData::service):
32
        (WebKit::WebIntentData::store):
33
        (WebKit::WebIntentData::type):
34
        * Shared/WebIntentServiceInfo.cpp: Renamed from Source/WebKit2/UIProcess/WebIntentServiceInfo.cpp.
35
        (WebKit):
36
        (WebKit::WebIntentServiceInfo::WebIntentServiceInfo):
37
        * Shared/WebIntentServiceInfo.h: Renamed from Source/WebKit2/UIProcess/WebIntentServiceInfo.h.
38
        (WebKit):
39
        (WebIntentServiceInfo):
40
        (WebKit::WebIntentServiceInfo::create):
41
        (WebKit::WebIntentServiceInfo::~WebIntentServiceInfo):
42
        (WebKit::WebIntentServiceInfo::action):
43
        (WebKit::WebIntentServiceInfo::payloadType):
44
        (WebKit::WebIntentServiceInfo::href):
45
        (WebKit::WebIntentServiceInfo::title):
46
        (WebKit::WebIntentServiceInfo::disposition):
47
        (WebKit::WebIntentServiceInfo::type):
48
        * Target.pri: Move WebIntentData and WebIntentServiceInfo from
49
        UIProcess/ to Shared/.
50
        * UIProcess/API/C/WKPage.h:
51
        * UIProcess/API/efl/ewk_view_loader_client.cpp:
52
        (didReceiveIntentForFrame):
53
        (registerIntentServiceForFrame):
54
        * UIProcess/WebLoaderClient.cpp:
55
        (WebKit::WebLoaderClient::didReceiveIntentForFrame):
56
        (WebKit::WebLoaderClient::registerIntentServiceForFrame):
57
        * UIProcess/WebLoaderClient.h:
58
        (WebLoaderClient):
59
        * UIProcess/WebPageProxy.cpp:
60
        (WebKit::WebPageProxy::registerIntentServiceForFrame):
61
        (WebKit::WebPageProxy::didReceiveIntentForFrame):
62
        * UIProcess/WebPageProxy.h:
63
        (WebPageProxy):
64
        * UIProcess/WebPageProxy.messages.in:
65
        * WebProcess/InjectedBundle/API/c/WKBundlePage.h:
66
        * WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.cpp:
67
        (WebKit):
68
        (WebKit::InjectedBundlePageLoaderClient::didReceiveIntentForFrame):
69
        (WebKit::InjectedBundlePageLoaderClient::registerIntentServiceForFrame):
70
        * WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.h:
71
        (WebKit):
72
        (InjectedBundlePageLoaderClient):
73
        * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
74
        (WebKit::WebFrameLoaderClient::dispatchIntent):
75
        (WebKit::WebFrameLoaderClient::registerIntentService):
76
        * WebProcess/qt/QtBuiltinBundlePage.cpp:
77
        (WebKit::QtBuiltinBundlePage::QtBuiltinBundlePage):
78
1
2012-07-10  Sheriff Bot  <webkit.review.bot@gmail.com>
79
2012-07-10  Sheriff Bot  <webkit.review.bot@gmail.com>
2
80
3
        Unreviewed, rolling out r122178.
81
        Unreviewed, rolling out r122178.
- a/Source/WebKit2/GNUmakefile.list.am -4 / +4 lines
Lines 462-467 webkit2_sources += \ a/Source/WebKit2/GNUmakefile.list.am_sec1
462
	Source/WebKit2/Shared/WebHitTestResult.h \
462
	Source/WebKit2/Shared/WebHitTestResult.h \
463
	Source/WebKit2/Shared/WebImage.cpp \
463
	Source/WebKit2/Shared/WebImage.cpp \
464
	Source/WebKit2/Shared/WebImage.h \
464
	Source/WebKit2/Shared/WebImage.h \
465
	Source/WebKit2/Shared/WebIntentData.cpp \
466
	Source/WebKit2/Shared/WebIntentData.h \
467
	Source/WebKit2/Shared/WebIntentServiceInfo.cpp \
468
	Source/WebKit2/Shared/WebIntentServiceInfo.h \
465
	Source/WebKit2/Shared/WebKeyboardEvent.cpp \
469
	Source/WebKit2/Shared/WebKeyboardEvent.cpp \
466
	Source/WebKit2/Shared/WebMouseEvent.cpp \
470
	Source/WebKit2/Shared/WebMouseEvent.cpp \
467
	Source/WebKit2/Shared/WebNavigationDataStore.h \
471
	Source/WebKit2/Shared/WebNavigationDataStore.h \
Lines 850-859 webkit2_sources += \ a/Source/WebKit2/GNUmakefile.list.am_sec2
850
	Source/WebKit2/UIProcess/WebIconDatabaseClient.h \
854
	Source/WebKit2/UIProcess/WebIconDatabaseClient.h \
851
	Source/WebKit2/UIProcess/WebInspectorProxy.cpp \
855
	Source/WebKit2/UIProcess/WebInspectorProxy.cpp \
852
	Source/WebKit2/UIProcess/WebInspectorProxy.h \
856
	Source/WebKit2/UIProcess/WebInspectorProxy.h \
853
	Source/WebKit2/UIProcess/WebIntentData.cpp \
854
	Source/WebKit2/UIProcess/WebIntentData.h \
855
	Source/WebKit2/UIProcess/WebIntentServiceInfo.cpp \
856
	Source/WebKit2/UIProcess/WebIntentServiceInfo.h \
857
	Source/WebKit2/UIProcess/WebKeyValueStorageManagerProxy.cpp \
857
	Source/WebKit2/UIProcess/WebKeyValueStorageManagerProxy.cpp \
858
	Source/WebKit2/UIProcess/WebKeyValueStorageManagerProxy.h \
858
	Source/WebKit2/UIProcess/WebKeyValueStorageManagerProxy.h \
859
	Source/WebKit2/UIProcess/WebMediaCacheManagerProxy.cpp \
859
	Source/WebKit2/UIProcess/WebMediaCacheManagerProxy.cpp \
- a/Source/WebKit2/Shared/APIClientTraits.h -1 / +1 lines
Lines 38-44 template <typename ClientInterface> struct APIClientTraits { a/Source/WebKit2/Shared/APIClientTraits.h_sec1
38
template <typename ClientInterface> const size_t APIClientTraits<ClientInterface>::interfaceSizesByVersion[] = { sizeof(ClientInterface) };
38
template <typename ClientInterface> const size_t APIClientTraits<ClientInterface>::interfaceSizesByVersion[] = { sizeof(ClientInterface) };
39
39
40
template<> struct APIClientTraits<WKBundlePageLoaderClient> {
40
template<> struct APIClientTraits<WKBundlePageLoaderClient> {
41
    static const size_t interfaceSizesByVersion[3];
41
    static const size_t interfaceSizesByVersion[4];
42
};
42
};
43
43
44
template<> struct APIClientTraits<WKBundlePageResourceLoadClient> {
44
template<> struct APIClientTraits<WKBundlePageResourceLoadClient> {
- a/Source/WebKit2/Shared/WebIntentData.cpp +75 lines
Line 0 a/Source/WebKit2/Shared/WebIntentData.cpp_sec1
1
/*
2
 * Copyright (C) 2012 Intel Corporation. All rights reserved.
3
 *
4
 * Redistribution and use in source and binary forms, with or without
5
 * modification, are permitted provided that the following conditions
6
 * are met:
7
 * 1. Redistributions of source code must retain the above copyright
8
 *    notice, this list of conditions and the following disclaimer.
9
 * 2. Redistributions in binary form must reproduce the above copyright
10
 *    notice, this list of conditions and the following disclaimer in the
11
 *    documentation and/or other materials provided with the distribution.
12
 *
13
 * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
14
 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
15
 * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
16
 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
17
 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
18
 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
19
 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
20
 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
21
 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
22
 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
23
 * THE POSSIBILITY OF SUCH DAMAGE.
24
 */
25
26
#include "config.h"
27
#include "WebIntentData.h"
28
29
#if ENABLE(WEB_INTENTS)
30
31
#include "ImmutableArray.h"
32
#include "ImmutableDictionary.h"
33
#include "WebString.h"
34
#include "WebURL.h"
35
36
namespace WebKit {
37
38
WebIntentData::WebIntentData(const IntentData& store)
39
    : m_store(store)
40
{
41
}
42
43
PassRefPtr<WebSerializedScriptValue> WebIntentData::data() const
44
{
45
    Vector<uint8_t> dataCopy = m_store.data;
46
    return WebSerializedScriptValue::adopt(dataCopy);
47
}
48
49
PassRefPtr<ImmutableArray> WebIntentData::suggestions() const
50
{
51
    const size_t numSuggestions = m_store.suggestions.size();
52
    Vector<RefPtr<APIObject> > wkSuggestions(numSuggestions);
53
    for (unsigned i = 0; i < numSuggestions; ++i)
54
        wkSuggestions[i] = WebURL::create(m_store.suggestions[i]);
55
    return ImmutableArray::adopt(wkSuggestions);
56
}
57
58
String WebIntentData::extra(const String& key) const
59
{
60
    return m_store.extras.get(key);
61
}
62
63
PassRefPtr<ImmutableDictionary> WebIntentData::extras() const
64
{
65
    ImmutableDictionary::MapType wkExtras;
66
    HashMap<String, String>::const_iterator end = m_store.extras.end();
67
    for (HashMap<String, String>::const_iterator it = m_store.extras.begin(); it != end; ++it)
68
        wkExtras.set(it->first, WebString::create(it->second));
69
    return ImmutableDictionary::adopt(wkExtras);
70
}
71
72
} // namespace WebKit
73
74
#endif // ENABLE(WEB_INTENTS)
75
- a/Source/WebKit2/Shared/WebIntentData.h +71 lines
Line 0 a/Source/WebKit2/Shared/WebIntentData.h_sec1
1
/*
2
 * Copyright (C) 2012 Intel Corporation. All rights reserved.
3
 *
4
 * Redistribution and use in source and binary forms, with or without
5
 * modification, are permitted provided that the following conditions
6
 * are met:
7
 * 1. Redistributions of source code must retain the above copyright
8
 *    notice, this list of conditions and the following disclaimer.
9
 * 2. Redistributions in binary form must reproduce the above copyright
10
 *    notice, this list of conditions and the following disclaimer in the
11
 *    documentation and/or other materials provided with the distribution.
12
 *
13
 * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
14
 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
15
 * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
16
 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
17
 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
18
 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
19
 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
20
 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
21
 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
22
 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
23
 * THE POSSIBILITY OF SUCH DAMAGE.
24
 */
25
26
#ifndef WebIntentData_h
27
#define WebIntentData_h
28
29
#if ENABLE(WEB_INTENTS)
30
31
#include "APIObject.h"
32
#include "IntentData.h"
33
#include "WebSerializedScriptValue.h"
34
#include <wtf/PassRefPtr.h>
35
36
namespace WebKit {
37
38
class WebIntentData : public APIObject {
39
public:
40
    static const Type APIType = TypeIntentData;
41
42
    static PassRefPtr<WebIntentData> create(const IntentData& store)
43
    {
44
        return adoptRef(new WebIntentData(store));
45
    }
46
47
    virtual ~WebIntentData() { }
48
49
    const String& action() const { return m_store.action; }
50
    const String& payloadType() const { return m_store.type; }
51
    const WebCore::KURL& service() const { return m_store.service; }
52
    PassRefPtr<WebSerializedScriptValue> data() const;
53
    String extra(const String& key) const;
54
    PassRefPtr<ImmutableDictionary> extras() const;
55
    PassRefPtr<ImmutableArray> suggestions() const;
56
57
    const IntentData& store() const { return m_store; }
58
59
private:
60
    WebIntentData(const IntentData&);
61
62
    virtual Type type() const { return APIType; }
63
64
    IntentData m_store;
65
};
66
67
} // namespace WebKit
68
69
#endif // ENABLE(WEB_INTENTS)
70
71
#endif // WebIntentData_h
- a/Source/WebKit2/Shared/WebIntentServiceInfo.cpp +40 lines
Line 0 a/Source/WebKit2/Shared/WebIntentServiceInfo.cpp_sec1
1
/*
2
 * Copyright (C) 2012 Intel Corporation. All rights reserved.
3
 *
4
 * Redistribution and use in source and binary forms, with or without
5
 * modification, are permitted provided that the following conditions
6
 * are met:
7
 * 1. Redistributions of source code must retain the above copyright
8
 *    notice, this list of conditions and the following disclaimer.
9
 * 2. Redistributions in binary form must reproduce the above copyright
10
 *    notice, this list of conditions and the following disclaimer in the
11
 *    documentation and/or other materials provided with the distribution.
12
 *
13
 * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
14
 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
15
 * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
16
 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
17
 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
18
 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
19
 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
20
 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
21
 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
22
 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
23
 * THE POSSIBILITY OF SUCH DAMAGE.
24
 */
25
26
#include "config.h"
27
#include "WebIntentServiceInfo.h"
28
29
#if ENABLE(WEB_INTENTS_TAG)
30
31
namespace WebKit {
32
33
WebIntentServiceInfo::WebIntentServiceInfo(const IntentServiceInfo& store)
34
    : m_store(store)
35
{
36
}
37
38
} // namespace WebKit
39
40
#endif // ENABLE(WEB_INTENTS_TAG)
- a/Source/WebKit2/Shared/WebIntentServiceInfo.h +66 lines
Line 0 a/Source/WebKit2/Shared/WebIntentServiceInfo.h_sec1
1
/*
2
 * Copyright (C) 2012 Intel Corporation. All rights reserved.
3
 *
4
 * Redistribution and use in source and binary forms, with or without
5
 * modification, are permitted provided that the following conditions
6
 * are met:
7
 * 1. Redistributions of source code must retain the above copyright
8
 *    notice, this list of conditions and the following disclaimer.
9
 * 2. Redistributions in binary form must reproduce the above copyright
10
 *    notice, this list of conditions and the following disclaimer in the
11
 *    documentation and/or other materials provided with the distribution.
12
 *
13
 * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
14
 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
15
 * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
16
 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
17
 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
18
 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
19
 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
20
 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
21
 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
22
 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
23
 * THE POSSIBILITY OF SUCH DAMAGE.
24
 */
25
26
#ifndef WebIntentServiceInfo_h
27
#define WebIntentServiceInfo_h
28
29
#if ENABLE(WEB_INTENTS_TAG)
30
31
#include "APIObject.h"
32
#include "IntentServiceInfo.h"
33
#include <wtf/PassRefPtr.h>
34
35
namespace WebKit {
36
37
class WebIntentServiceInfo : public APIObject {
38
public:
39
    static const Type APIType = TypeIntentServiceInfo;
40
41
    static PassRefPtr<WebIntentServiceInfo> create(const IntentServiceInfo& store)
42
    {
43
        return adoptRef(new WebIntentServiceInfo(store));
44
    }
45
46
    virtual ~WebIntentServiceInfo() { }
47
48
    const String& action() const { return m_store.action; }
49
    const String& payloadType() const { return m_store.type; }
50
    const WebCore::KURL& href() const { return m_store.href; }
51
    const String& title() const { return m_store.title; }
52
    const String& disposition() const { return m_store.disposition; }
53
54
private:
55
    WebIntentServiceInfo(const IntentServiceInfo&);
56
57
    virtual Type type() const { return APIType; }
58
59
    IntentServiceInfo m_store;
60
};
61
62
} // namespace WebKit
63
64
#endif // ENABLE(WEB_INTENTS_TAG)
65
66
#endif // WebIntentServiceInfo_h
- a/Source/WebKit2/Target.pri -4 / +4 lines
Lines 112-117 HEADERS += \ a/Source/WebKit2/Target.pri_sec1
112
    Shared/WebGraphicsContext.h \
112
    Shared/WebGraphicsContext.h \
113
    Shared/WebHitTestResult.h \
113
    Shared/WebHitTestResult.h \
114
    Shared/WebImage.h \
114
    Shared/WebImage.h \
115
    Shared/WebIntentData.h \
116
    Shared/WebIntentServiceInfo.h \
115
    Shared/WebLayerTreeInfo.h \
117
    Shared/WebLayerTreeInfo.h \
116
    Shared/WebNavigationDataStore.h \
118
    Shared/WebNavigationDataStore.h \
117
    Shared/WebNumber.h \
119
    Shared/WebNumber.h \
Lines 263-270 HEADERS += \ a/Source/WebKit2/Target.pri_sec2
263
    UIProcess/WebIconDatabase.h \
265
    UIProcess/WebIconDatabase.h \
264
    UIProcess/WebIconDatabaseClient.h \
266
    UIProcess/WebIconDatabaseClient.h \
265
    UIProcess/WebInspectorProxy.h \
267
    UIProcess/WebInspectorProxy.h \
266
    UIProcess/WebIntentData.h \
267
    UIProcess/WebIntentServiceInfo.h \
268
    UIProcess/WebKeyValueStorageManagerProxy.h \
268
    UIProcess/WebKeyValueStorageManagerProxy.h \
269
    UIProcess/WebLayerTreeRenderer.h \
269
    UIProcess/WebLayerTreeRenderer.h \
270
    UIProcess/WebLoaderClient.h \
270
    UIProcess/WebLoaderClient.h \
Lines 487-492 SOURCES += \ a/Source/WebKit2/Target.pri_sec3
487
    Shared/WebHitTestResult.cpp \
487
    Shared/WebHitTestResult.cpp \
488
    Shared/WebKeyboardEvent.cpp \
488
    Shared/WebKeyboardEvent.cpp \
489
    Shared/WebImage.cpp \
489
    Shared/WebImage.cpp \
490
    Shared/WebIntentData.cpp \
491
    Shared/WebIntentServiceInfo.cpp \
490
    Shared/WebLayerTreeInfo.cpp \
492
    Shared/WebLayerTreeInfo.cpp \
491
    Shared/WebMouseEvent.cpp \
493
    Shared/WebMouseEvent.cpp \
492
    Shared/WebNetworkInfo.cpp \
494
    Shared/WebNetworkInfo.cpp \
Lines 626-633 SOURCES += \ a/Source/WebKit2/Target.pri_sec4
626
    UIProcess/WebIconDatabase.cpp \
628
    UIProcess/WebIconDatabase.cpp \
627
    UIProcess/WebIconDatabaseClient.cpp \
629
    UIProcess/WebIconDatabaseClient.cpp \
628
    UIProcess/WebInspectorProxy.cpp \
630
    UIProcess/WebInspectorProxy.cpp \
629
    UIProcess/WebIntentData.cpp \
630
    UIProcess/WebIntentServiceInfo.cpp \
631
    UIProcess/WebKeyValueStorageManagerProxy.cpp \
631
    UIProcess/WebKeyValueStorageManagerProxy.cpp \
632
    UIProcess/WebLayerTreeRenderer.cpp \
632
    UIProcess/WebLayerTreeRenderer.cpp \
633
    UIProcess/WebLoaderClient.cpp \
633
    UIProcess/WebLoaderClient.cpp \
- a/Source/WebKit2/UIProcess/API/C/WKPage.h -2 / +2 lines
Lines 73-80 typedef bool (*WKPageShouldGoToBackForwardListItemCallback)(WKPageRef page, WKBa a/Source/WebKit2/UIProcess/API/C/WKPage.h_sec1
73
typedef void (*WKPageDidNewFirstVisuallyNonEmptyLayoutCallback)(WKPageRef page, WKTypeRef userData, const void *clientInfo);
73
typedef void (*WKPageDidNewFirstVisuallyNonEmptyLayoutCallback)(WKPageRef page, WKTypeRef userData, const void *clientInfo);
74
typedef void (*WKPageWillGoToBackForwardListItemCallback)(WKPageRef page, WKBackForwardListItemRef item, WKTypeRef userData, const void *clientInfo);
74
typedef void (*WKPageWillGoToBackForwardListItemCallback)(WKPageRef page, WKBackForwardListItemRef item, WKTypeRef userData, const void *clientInfo);
75
typedef void (*WKPagePluginDidFailCallback)(WKPageRef page, WKErrorCode errorCode, WKStringRef mimeType, WKStringRef pluginIdentifier, WKStringRef pluginVersion, const void* clientInfo);
75
typedef void (*WKPagePluginDidFailCallback)(WKPageRef page, WKErrorCode errorCode, WKStringRef mimeType, WKStringRef pluginIdentifier, WKStringRef pluginVersion, const void* clientInfo);
76
typedef void (*WKPageDidReceiveIntentForFrameCallback)(WKPageRef page, WKFrameRef frame, WKIntentDataRef intent, const void *clientInfo);
76
typedef void (*WKPageDidReceiveIntentForFrameCallback)(WKPageRef page, WKFrameRef frame, WKIntentDataRef intent, WKTypeRef userData, const void *clientInfo);
77
typedef void (*WKPageRegisterIntentServiceForFrameCallback)(WKPageRef page, WKFrameRef frame, WKIntentServiceInfoRef serviceInfo, const void *clientInfo);
77
typedef void (*WKPageRegisterIntentServiceForFrameCallback)(WKPageRef page, WKFrameRef frame, WKIntentServiceInfoRef serviceInfo, WKTypeRef userData, const void *clientInfo);
78
78
79
// Deprecated
79
// Deprecated
80
typedef void (*WKPageDidFailToInitializePluginCallback_deprecatedForUseWithV0)(WKPageRef page, WKStringRef mimeType, const void* clientInfo);
80
typedef void (*WKPageDidFailToInitializePluginCallback_deprecatedForUseWithV0)(WKPageRef page, WKStringRef mimeType, const void* clientInfo);
- a/Source/WebKit2/UIProcess/API/efl/ewk_view_loader_client.cpp -2 / +2 lines
Lines 48-54 static void didReceiveTitleForFrame(WKPageRef, WKStringRef title, WKFrameRef fra a/Source/WebKit2/UIProcess/API/efl/ewk_view_loader_client.cpp_sec1
48
}
48
}
49
49
50
#if ENABLE(WEB_INTENTS)
50
#if ENABLE(WEB_INTENTS)
51
static void didReceiveIntentForFrame(WKPageRef page, WKFrameRef frame, WKIntentDataRef intent, const void* clientInfo)
51
static void didReceiveIntentForFrame(WKPageRef page, WKFrameRef frame, WKIntentDataRef intent, WKTypeRef, const void* clientInfo)
52
{
52
{
53
    Evas_Object* ewkView = static_cast<Evas_Object*>(const_cast<void*>(clientInfo));
53
    Evas_Object* ewkView = static_cast<Evas_Object*>(const_cast<void*>(clientInfo));
54
    Ewk_Intent* ewkIntent = ewk_intent_new(intent);
54
    Ewk_Intent* ewkIntent = ewk_intent_new(intent);
Lines 58-64 static void didReceiveIntentForFrame(WKPageRef page, WKFrameRef frame, WKIntentD a/Source/WebKit2/UIProcess/API/efl/ewk_view_loader_client.cpp_sec2
58
#endif
58
#endif
59
59
60
#if ENABLE(WEB_INTENTS_TAG)
60
#if ENABLE(WEB_INTENTS_TAG)
61
static void registerIntentServiceForFrame(WKPageRef page, WKFrameRef frame, WKIntentServiceInfoRef serviceInfo, const void *clientInfo)
61
static void registerIntentServiceForFrame(WKPageRef page, WKFrameRef frame, WKIntentServiceInfoRef serviceInfo, WKTypeRef, const void *clientInfo)
62
{
62
{
63
    Evas_Object* ewkView = static_cast<Evas_Object*>(const_cast<void*>(clientInfo));
63
    Evas_Object* ewkView = static_cast<Evas_Object*>(const_cast<void*>(clientInfo));
64
    Ewk_Intent_Service* ewkIntentService = ewk_intent_service_new(serviceInfo);
64
    Ewk_Intent_Service* ewkIntentService = ewk_intent_service_new(serviceInfo);
- a/Source/WebKit2/UIProcess/WebIntentData.cpp -75 lines
Lines 1-75 a/Source/WebKit2/UIProcess/WebIntentData.cpp_sec1
1
/*
2
 * Copyright (C) 2012 Intel Corporation. All rights reserved.
3
 *
4
 * Redistribution and use in source and binary forms, with or without
5
 * modification, are permitted provided that the following conditions
6
 * are met:
7
 * 1. Redistributions of source code must retain the above copyright
8
 *    notice, this list of conditions and the following disclaimer.
9
 * 2. Redistributions in binary form must reproduce the above copyright
10
 *    notice, this list of conditions and the following disclaimer in the
11
 *    documentation and/or other materials provided with the distribution.
12
 *
13
 * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
14
 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
15
 * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
16
 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
17
 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
18
 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
19
 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
20
 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
21
 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
22
 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
23
 * THE POSSIBILITY OF SUCH DAMAGE.
24
 */
25
26
#include "config.h"
27
#include "WebIntentData.h"
28
29
#if ENABLE(WEB_INTENTS)
30
31
#include "ImmutableArray.h"
32
#include "ImmutableDictionary.h"
33
#include "WebString.h"
34
#include "WebURL.h"
35
36
namespace WebKit {
37
38
WebIntentData::WebIntentData(const IntentData& store)
39
    : m_store(store)
40
{
41
}
42
43
PassRefPtr<WebSerializedScriptValue> WebIntentData::data() const
44
{
45
    Vector<uint8_t> dataCopy = m_store.data;
46
    return WebSerializedScriptValue::adopt(dataCopy);
47
}
48
49
PassRefPtr<ImmutableArray> WebIntentData::suggestions() const
50
{
51
    const size_t numSuggestions = m_store.suggestions.size();
52
    Vector<RefPtr<APIObject> > wkSuggestions(numSuggestions);
53
    for (unsigned i = 0; i < numSuggestions; ++i)
54
        wkSuggestions[i] = WebURL::create(m_store.suggestions[i]);
55
    return ImmutableArray::adopt(wkSuggestions);
56
}
57
58
String WebIntentData::extra(const String& key) const
59
{
60
    return m_store.extras.get(key);
61
}
62
63
PassRefPtr<ImmutableDictionary> WebIntentData::extras() const
64
{
65
    ImmutableDictionary::MapType wkExtras;
66
    HashMap<String, String>::const_iterator end = m_store.extras.end();
67
    for (HashMap<String, String>::const_iterator it = m_store.extras.begin(); it != end; ++it)
68
        wkExtras.set(it->first, WebString::create(it->second));
69
    return ImmutableDictionary::adopt(wkExtras);
70
}
71
72
} // namespace WebKit
73
74
#endif // ENABLE(WEB_INTENTS)
75
- a/Source/WebKit2/UIProcess/WebIntentData.h -71 lines
Lines 1-71 a/Source/WebKit2/UIProcess/WebIntentData.h_sec1
1
/*
2
 * Copyright (C) 2012 Intel Corporation. All rights reserved.
3
 *
4
 * Redistribution and use in source and binary forms, with or without
5
 * modification, are permitted provided that the following conditions
6
 * are met:
7
 * 1. Redistributions of source code must retain the above copyright
8
 *    notice, this list of conditions and the following disclaimer.
9
 * 2. Redistributions in binary form must reproduce the above copyright
10
 *    notice, this list of conditions and the following disclaimer in the
11
 *    documentation and/or other materials provided with the distribution.
12
 *
13
 * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
14
 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
15
 * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
16
 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
17
 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
18
 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
19
 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
20
 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
21
 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
22
 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
23
 * THE POSSIBILITY OF SUCH DAMAGE.
24
 */
25
26
#ifndef WebIntentData_h
27
#define WebIntentData_h
28
29
#if ENABLE(WEB_INTENTS)
30
31
#include "APIObject.h"
32
#include "IntentData.h"
33
#include "WebSerializedScriptValue.h"
34
#include <wtf/PassRefPtr.h>
35
36
namespace WebKit {
37
38
class WebIntentData : public APIObject {
39
public:
40
    static const Type APIType = TypeIntentData;
41
42
    static PassRefPtr<WebIntentData> create(const IntentData& store)
43
    {
44
        return adoptRef(new WebIntentData(store));
45
    }
46
47
    virtual ~WebIntentData() { }
48
49
    const String& action() const { return m_store.action; }
50
    const String& payloadType() const { return m_store.type; }
51
    const WebCore::KURL& service() const { return m_store.service; }
52
    PassRefPtr<WebSerializedScriptValue> data() const;
53
    String extra(const String& key) const;
54
    PassRefPtr<ImmutableDictionary> extras() const;
55
    PassRefPtr<ImmutableArray> suggestions() const;
56
57
    const IntentData& store() const { return m_store; }
58
59
private:
60
    WebIntentData(const IntentData&);
61
62
    virtual Type type() const { return APIType; }
63
64
    IntentData m_store;
65
};
66
67
} // namespace WebKit
68
69
#endif // ENABLE(WEB_INTENTS)
70
71
#endif // WebIntentData_h
- a/Source/WebKit2/UIProcess/WebIntentServiceInfo.cpp -40 lines
Lines 1-40 a/Source/WebKit2/UIProcess/WebIntentServiceInfo.cpp_sec1
1
/*
2
 * Copyright (C) 2012 Intel Corporation. All rights reserved.
3
 *
4
 * Redistribution and use in source and binary forms, with or without
5
 * modification, are permitted provided that the following conditions
6
 * are met:
7
 * 1. Redistributions of source code must retain the above copyright
8
 *    notice, this list of conditions and the following disclaimer.
9
 * 2. Redistributions in binary form must reproduce the above copyright
10
 *    notice, this list of conditions and the following disclaimer in the
11
 *    documentation and/or other materials provided with the distribution.
12
 *
13
 * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
14
 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
15
 * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
16
 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
17
 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
18
 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
19
 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
20
 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
21
 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
22
 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
23
 * THE POSSIBILITY OF SUCH DAMAGE.
24
 */
25
26
#include "config.h"
27
#include "WebIntentServiceInfo.h"
28
29
#if ENABLE(WEB_INTENTS_TAG)
30
31
namespace WebKit {
32
33
WebIntentServiceInfo::WebIntentServiceInfo(const IntentServiceInfo& store)
34
    : m_store(store)
35
{
36
}
37
38
} // namespace WebKit
39
40
#endif // ENABLE(WEB_INTENTS_TAG)
- a/Source/WebKit2/UIProcess/WebIntentServiceInfo.h -66 lines
Lines 1-66 a/Source/WebKit2/UIProcess/WebIntentServiceInfo.h_sec1
1
/*
2
 * Copyright (C) 2012 Intel Corporation. All rights reserved.
3
 *
4
 * Redistribution and use in source and binary forms, with or without
5
 * modification, are permitted provided that the following conditions
6
 * are met:
7
 * 1. Redistributions of source code must retain the above copyright
8
 *    notice, this list of conditions and the following disclaimer.
9
 * 2. Redistributions in binary form must reproduce the above copyright
10
 *    notice, this list of conditions and the following disclaimer in the
11
 *    documentation and/or other materials provided with the distribution.
12
 *
13
 * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
14
 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
15
 * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
16
 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
17
 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
18
 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
19
 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
20
 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
21
 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
22
 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
23
 * THE POSSIBILITY OF SUCH DAMAGE.
24
 */
25
26
#ifndef WebIntentServiceInfo_h
27
#define WebIntentServiceInfo_h
28
29
#if ENABLE(WEB_INTENTS_TAG)
30
31
#include "APIObject.h"
32
#include "IntentServiceInfo.h"
33
#include <wtf/PassRefPtr.h>
34
35
namespace WebKit {
36
37
class WebIntentServiceInfo : public APIObject {
38
public:
39
    static const Type APIType = TypeIntentServiceInfo;
40
41
    static PassRefPtr<WebIntentServiceInfo> create(const IntentServiceInfo& store)
42
    {
43
        return adoptRef(new WebIntentServiceInfo(store));
44
    }
45
46
    virtual ~WebIntentServiceInfo() { }
47
48
    const String& action() const { return m_store.action; }
49
    const String& payloadType() const { return m_store.type; }
50
    const WebCore::KURL& href() const { return m_store.href; }
51
    const String& title() const { return m_store.title; }
52
    const String& disposition() const { return m_store.disposition; }
53
54
private:
55
    WebIntentServiceInfo(const IntentServiceInfo&);
56
57
    virtual Type type() const { return APIType; }
58
59
    IntentServiceInfo m_store;
60
};
61
62
} // namespace WebKit
63
64
#endif // ENABLE(WEB_INTENTS_TAG)
65
66
#endif // WebIntentServiceInfo_h
- a/Source/WebKit2/UIProcess/WebLoaderClient.cpp -4 / +4 lines
Lines 169-190 void WebLoaderClient::didDetectXSSForFrame(WebPageProxy* page, WebFrameProxy* fr a/Source/WebKit2/UIProcess/WebLoaderClient.cpp_sec1
169
}
169
}
170
170
171
#if ENABLE(WEB_INTENTS)
171
#if ENABLE(WEB_INTENTS)
172
void WebLoaderClient::didReceiveIntentForFrame(WebPageProxy* page, WebFrameProxy* frame, WebIntentData* intentData)
172
void WebLoaderClient::didReceiveIntentForFrame(WebPageProxy* page, WebFrameProxy* frame, WebIntentData* intentData, APIObject* userData)
173
{
173
{
174
    if (!m_client.didReceiveIntentForFrame)
174
    if (!m_client.didReceiveIntentForFrame)
175
        return;
175
        return;
176
176
177
    m_client.didReceiveIntentForFrame(toAPI(page), toAPI(frame), toAPI(intentData), m_client.clientInfo);
177
    m_client.didReceiveIntentForFrame(toAPI(page), toAPI(frame), toAPI(intentData), toAPI(userData), m_client.clientInfo);
178
}
178
}
179
#endif
179
#endif
180
180
181
#if ENABLE(WEB_INTENTS_TAG)
181
#if ENABLE(WEB_INTENTS_TAG)
182
void WebLoaderClient::registerIntentServiceForFrame(WebPageProxy* page, WebFrameProxy* frame, WebIntentServiceInfo* serviceInfo)
182
void WebLoaderClient::registerIntentServiceForFrame(WebPageProxy* page, WebFrameProxy* frame, WebIntentServiceInfo* serviceInfo, APIObject* userData)
183
{
183
{
184
    if (!m_client.registerIntentServiceForFrame)
184
    if (!m_client.registerIntentServiceForFrame)
185
        return;
185
        return;
186
186
187
    m_client.registerIntentServiceForFrame(toAPI(page), toAPI(frame), toAPI(serviceInfo), m_client.clientInfo);
187
    m_client.registerIntentServiceForFrame(toAPI(page), toAPI(frame), toAPI(serviceInfo), toAPI(userData), m_client.clientInfo);
188
}
188
}
189
#endif
189
#endif
190
190
- a/Source/WebKit2/UIProcess/WebLoaderClient.h -2 / +2 lines
Lines 73-83 public: a/Source/WebKit2/UIProcess/WebLoaderClient.h_sec1
73
    void didRunInsecureContentForFrame(WebPageProxy*, WebFrameProxy*, APIObject*);
73
    void didRunInsecureContentForFrame(WebPageProxy*, WebFrameProxy*, APIObject*);
74
    void didDetectXSSForFrame(WebPageProxy*, WebFrameProxy*, APIObject*);
74
    void didDetectXSSForFrame(WebPageProxy*, WebFrameProxy*, APIObject*);
75
#if ENABLE(WEB_INTENTS)
75
#if ENABLE(WEB_INTENTS)
76
    void didReceiveIntentForFrame(WebPageProxy*, WebFrameProxy*, WebIntentData*);
76
    void didReceiveIntentForFrame(WebPageProxy*, WebFrameProxy*, WebIntentData*, APIObject*);
77
#endif
77
#endif
78
78
79
#if ENABLE(WEB_INTENTS_TAG)
79
#if ENABLE(WEB_INTENTS_TAG)
80
    void registerIntentServiceForFrame(WebPageProxy*, WebFrameProxy*, WebIntentServiceInfo*);
80
    void registerIntentServiceForFrame(WebPageProxy*, WebFrameProxy*, WebIntentServiceInfo*, APIObject*);
81
#endif
81
#endif
82
82
83
    // FIXME: didFirstVisuallyNonEmptyLayoutForFrame and didNewFirstVisuallyNonEmptyLayout should be merged.
83
    // FIXME: didFirstVisuallyNonEmptyLayoutForFrame and didNewFirstVisuallyNonEmptyLayout should be merged.
- a/Source/WebKit2/UIProcess/WebPageProxy.cpp -4 / +14 lines
Lines 1894-1906 void WebPageProxy::didFinishProgress() a/Source/WebKit2/UIProcess/WebPageProxy.cpp_sec1
1894
}
1894
}
1895
1895
1896
#if ENABLE(WEB_INTENTS_TAG)
1896
#if ENABLE(WEB_INTENTS_TAG)
1897
void WebPageProxy::registerIntentServiceForFrame(uint64_t frameID, const IntentServiceInfo& serviceInfo)
1897
void WebPageProxy::registerIntentServiceForFrame(uint64_t frameID, const IntentServiceInfo& serviceInfo, CoreIPC::ArgumentDecoder* arguments)
1898
{
1898
{
1899
    RefPtr<APIObject> userData;
1900
    WebContextUserMessageDecoder messageDecoder(userData, m_process->context());
1901
    if (!arguments->decode(messageDecoder))
1902
        return;
1903
1899
    WebFrameProxy* frame = process()->webFrame(frameID);
1904
    WebFrameProxy* frame = process()->webFrame(frameID);
1900
    MESSAGE_CHECK(frame);
1905
    MESSAGE_CHECK(frame);
1901
1906
1902
    RefPtr<WebIntentServiceInfo> webIntentServiceInfo = WebIntentServiceInfo::create(serviceInfo);
1907
    RefPtr<WebIntentServiceInfo> webIntentServiceInfo = WebIntentServiceInfo::create(serviceInfo);
1903
    m_loaderClient.registerIntentServiceForFrame(this, frame, webIntentServiceInfo.get());
1908
    m_loaderClient.registerIntentServiceForFrame(this, frame, webIntentServiceInfo.get(), userData.get());
1904
}
1909
}
1905
#endif
1910
#endif
1906
1911
Lines 2175-2187 void WebPageProxy::didDetectXSSForFrame(uint64_t frameID, CoreIPC::ArgumentDecod a/Source/WebKit2/UIProcess/WebPageProxy.cpp_sec2
2175
}
2180
}
2176
2181
2177
#if ENABLE(WEB_INTENTS)
2182
#if ENABLE(WEB_INTENTS)
2178
void WebPageProxy::didReceiveIntentForFrame(uint64_t frameID, const IntentData& intentData)
2183
void WebPageProxy::didReceiveIntentForFrame(uint64_t frameID, const IntentData& intentData, CoreIPC::ArgumentDecoder* arguments)
2179
{
2184
{
2185
    RefPtr<APIObject> userData;
2186
    WebContextUserMessageDecoder messageDecoder(userData, m_process->context());
2187
    if (!arguments->decode(messageDecoder))
2188
        return;
2189
2180
    WebFrameProxy* frame = process()->webFrame(frameID);
2190
    WebFrameProxy* frame = process()->webFrame(frameID);
2181
    MESSAGE_CHECK(frame);
2191
    MESSAGE_CHECK(frame);
2182
2192
2183
    RefPtr<WebIntentData> webIntentData = WebIntentData::create(intentData);
2193
    RefPtr<WebIntentData> webIntentData = WebIntentData::create(intentData);
2184
    m_loaderClient.didReceiveIntentForFrame(this, frame, webIntentData.get());
2194
    m_loaderClient.didReceiveIntentForFrame(this, frame, webIntentData.get(), userData.get());
2185
}
2195
}
2186
#endif
2196
#endif
2187
2197
- a/Source/WebKit2/UIProcess/WebPageProxy.h -2 / +2 lines
Lines 749-758 private: a/Source/WebKit2/UIProcess/WebPageProxy.h_sec1
749
    void didFinishProgress();
749
    void didFinishProgress();
750
750
751
#if ENABLE(WEB_INTENTS)
751
#if ENABLE(WEB_INTENTS)
752
    void didReceiveIntentForFrame(uint64_t frameID, const IntentData&);
752
    void didReceiveIntentForFrame(uint64_t frameID, const IntentData&, CoreIPC::ArgumentDecoder*);
753
#endif
753
#endif
754
#if ENABLE(WEB_INTENTS_TAG)
754
#if ENABLE(WEB_INTENTS_TAG)
755
    void registerIntentServiceForFrame(uint64_t frameID, const IntentServiceInfo&);
755
    void registerIntentServiceForFrame(uint64_t frameID, const IntentServiceInfo&, CoreIPC::ArgumentDecoder*);
756
#endif
756
#endif
757
    
757
    
758
    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);
758
    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);
- a/Source/WebKit2/UIProcess/WebPageProxy.messages.in -2 / +2 lines
Lines 97-106 messages -> WebPageProxy { a/Source/WebKit2/UIProcess/WebPageProxy.messages.in_sec1
97
97
98
    # Intent messages
98
    # Intent messages
99
#if ENABLE(WEB_INTENTS)
99
#if ENABLE(WEB_INTENTS)
100
    DidReceiveIntentForFrame(uint64_t frameID, WebKit::IntentData intent)
100
    DidReceiveIntentForFrame(uint64_t frameID, WebKit::IntentData intent, WebKit::InjectedBundleUserMessageEncoder userData)
101
#endif
101
#endif
102
#if ENABLE(WEB_INTENTS_TAG)
102
#if ENABLE(WEB_INTENTS_TAG)
103
    RegisterIntentServiceForFrame(uint64_t frameID, WebKit::IntentServiceInfo serviceInfo);
103
    RegisterIntentServiceForFrame(uint64_t frameID, WebKit::IntentServiceInfo serviceInfo, WebKit::InjectedBundleUserMessageEncoder userData);
104
#endif
104
#endif
105
105
106
    # Progress messages
106
    # Progress messages
- a/Source/WebKit2/WebProcess/InjectedBundle/API/c/WKBundlePage.h -1 / +7 lines
Lines 109-114 typedef void (*WKBundlePageWillDisconnectDOMWindowExtensionFromGlobalObjectCallb a/Source/WebKit2/WebProcess/InjectedBundle/API/c/WKBundlePage.h_sec1
109
typedef void (*WKBundlePageDidReconnectDOMWindowExtensionToGlobalObjectCallback)(WKBundlePageRef page, WKBundleDOMWindowExtensionRef, const void* clientInfo);
109
typedef void (*WKBundlePageDidReconnectDOMWindowExtensionToGlobalObjectCallback)(WKBundlePageRef page, WKBundleDOMWindowExtensionRef, const void* clientInfo);
110
typedef void (*WKBundlePageWillDestroyGlobalObjectForDOMWindowExtensionCallback)(WKBundlePageRef page, WKBundleDOMWindowExtensionRef, const void* clientInfo);
110
typedef void (*WKBundlePageWillDestroyGlobalObjectForDOMWindowExtensionCallback)(WKBundlePageRef page, WKBundleDOMWindowExtensionRef, const void* clientInfo);
111
typedef bool (*WKBundlePageShouldForceUniversalAccessFromLocalURLCallback)(WKBundlePageRef, WKStringRef url, const void* clientInfo);
111
typedef bool (*WKBundlePageShouldForceUniversalAccessFromLocalURLCallback)(WKBundlePageRef, WKStringRef url, const void* clientInfo);
112
typedef void (*WKBundlePageDidReceiveIntentForFrameCallback)(WKBundlePageRef page, WKBundleFrameRef frame, WKIntentDataRef intent, WKTypeRef* userData, const void* clientInfo);
113
typedef void (*WKBundlePageRegisterIntentServiceForFrameCallback)(WKBundlePageRef page, WKBundleFrameRef frame, WKIntentServiceInfoRef serviceInfo, WKTypeRef* userData, const void* clientInfo);
112
114
113
struct WKBundlePageLoaderClient {
115
struct WKBundlePageLoaderClient {
114
    int                                                                     version;
116
    int                                                                     version;
Lines 147-156 struct WKBundlePageLoaderClient { a/Source/WebKit2/WebProcess/InjectedBundle/API/c/WKBundlePage.h_sec2
147
    // Version 2
149
    // Version 2
148
    WKBundlePageDidFinishProgressCallback                                   didFinishProgress;
150
    WKBundlePageDidFinishProgressCallback                                   didFinishProgress;
149
    WKBundlePageShouldForceUniversalAccessFromLocalURLCallback              shouldForceUniversalAccessFromLocalURL;
151
    WKBundlePageShouldForceUniversalAccessFromLocalURLCallback              shouldForceUniversalAccessFromLocalURL;
152
153
    // Version 3
154
    WKBundlePageDidReceiveIntentForFrameCallback                            didReceiveIntentForFrame;
155
    WKBundlePageRegisterIntentServiceForFrameCallback                       registerIntentServiceForFrame;
150
};
156
};
151
typedef struct WKBundlePageLoaderClient WKBundlePageLoaderClient;
157
typedef struct WKBundlePageLoaderClient WKBundlePageLoaderClient;
152
158
153
enum { kWKBundlePageLoaderClientCurrentVersion = 2 };
159
enum { kWKBundlePageLoaderClientCurrentVersion = 3 };
154
160
155
enum {
161
enum {
156
    WKBundlePagePolicyActionPassThrough,
162
    WKBundlePagePolicyActionPassThrough,
- a/Source/WebKit2/WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.cpp +31 lines
Lines 33-38 a/Source/WebKit2/WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.cpp_sec1
33
#include "WebError.h"
33
#include "WebError.h"
34
#include <wtf/text/WTFString.h>
34
#include <wtf/text/WTFString.h>
35
35
36
#if ENABLE(WEB_INTENTS)
37
#include "WebIntentData.h"
38
#endif
39
#if ENABLE(WEB_INTENTS_TAG)
40
#include "WebIntentServiceInfo.h"
41
#endif
42
36
using namespace WebCore;
43
using namespace WebCore;
37
44
38
namespace WebKit {
45
namespace WebKit {
Lines 187-192 void InjectedBundlePageLoaderClient::didDetectXSSForFrame(WebPage* page, WebFram a/Source/WebKit2/WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.cpp_sec2
187
    userData = adoptRef(toImpl(userDataToPass));
194
    userData = adoptRef(toImpl(userDataToPass));
188
}
195
}
189
196
197
#if ENABLE(WEB_INTENTS)
198
void InjectedBundlePageLoaderClient::didReceiveIntentForFrame(WebPage* page, WebFrame* frame, WebIntentData* intent, RefPtr<APIObject>& userData)
199
{
200
    if (!m_client.didReceiveIntentForFrame)
201
        return;
202
203
    WKTypeRef userDataToPass = 0;
204
    m_client.didReceiveIntentForFrame(toAPI(page), toAPI(frame), toAPI(intent), &userDataToPass, m_client.clientInfo);
205
    userData = adoptRef(toImpl(userDataToPass));
206
}
207
#endif
208
209
#if ENABLE(WEB_INTENTS_TAG)
210
void InjectedBundlePageLoaderClient::registerIntentServiceForFrame(WebPage* page, WebFrame* frame, WebIntentServiceInfo* service, RefPtr<APIObject>& userData)
211
{
212
    if (!m_client.registerIntentServiceForFrame)
213
        return;
214
215
    WKTypeRef userDataToPass = 0;
216
    m_client.registerIntentServiceForFrame(toAPI(page), toAPI(frame), toAPI(service), &userDataToPass, m_client.clientInfo);
217
    userData = adoptRef(toImpl(userDataToPass));
218
}
219
#endif
220
190
void InjectedBundlePageLoaderClient::didFirstLayoutForFrame(WebPage* page, WebFrame* frame, RefPtr<APIObject>& userData)
221
void InjectedBundlePageLoaderClient::didFirstLayoutForFrame(WebPage* page, WebFrame* frame, RefPtr<APIObject>& userData)
191
{
222
{
192
    if (!m_client.didFirstLayoutForFrame)
223
    if (!m_client.didFirstLayoutForFrame)
- a/Source/WebKit2/WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.h +13 lines
Lines 46-51 class APIObject; a/Source/WebKit2/WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.h_sec1
46
class InjectedBundleBackForwardListItem;
46
class InjectedBundleBackForwardListItem;
47
class WebPage;
47
class WebPage;
48
class WebFrame;
48
class WebFrame;
49
#if ENABLE(WEB_INTENTS)
50
class WebIntentData;
51
#endif
52
#if ENABLE(WEB_INTENTS_TAG)
53
class WebIntentServiceInfo;
54
#endif
49
55
50
class InjectedBundlePageLoaderClient : public APIClient<WKBundlePageLoaderClient, kWKBundlePageLoaderClientCurrentVersion> {
56
class InjectedBundlePageLoaderClient : public APIClient<WKBundlePageLoaderClient, kWKBundlePageLoaderClientCurrentVersion> {
51
public:
57
public:
Lines 65-70 public: a/Source/WebKit2/WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.h_sec2
65
    void didRunInsecureContentForFrame(WebPage*, WebFrame*, RefPtr<APIObject>& userData);
71
    void didRunInsecureContentForFrame(WebPage*, WebFrame*, RefPtr<APIObject>& userData);
66
    void didDetectXSSForFrame(WebPage*, WebFrame*, RefPtr<APIObject>& userData);
72
    void didDetectXSSForFrame(WebPage*, WebFrame*, RefPtr<APIObject>& userData);
67
73
74
#if ENABLE(WEB_INTENTS)
75
    void didReceiveIntentForFrame(WebPage*, WebFrame*, WebIntentData*, RefPtr<APIObject>& userData);
76
#endif
77
#if ENABLE(WEB_INTENTS_TAG)
78
    void registerIntentServiceForFrame(WebPage*, WebFrame*, WebIntentServiceInfo*, RefPtr<APIObject>& userData);
79
#endif
80
68
    void didFirstLayoutForFrame(WebPage*, WebFrame*, RefPtr<APIObject>& userData);
81
    void didFirstLayoutForFrame(WebPage*, WebFrame*, RefPtr<APIObject>& userData);
69
    void didFirstVisuallyNonEmptyLayoutForFrame(WebPage*, WebFrame*, RefPtr<APIObject>& userData);
82
    void didFirstVisuallyNonEmptyLayoutForFrame(WebPage*, WebFrame*, RefPtr<APIObject>& userData);
70
    void didLayoutForFrame(WebPage*, WebFrame*);
83
    void didLayoutForFrame(WebPage*, WebFrame*);
- a/Source/WebKit2/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp -3 / +16 lines
Lines 75-84 a/Source/WebKit2/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp_sec1
75
75
76
#if ENABLE(WEB_INTENTS)
76
#if ENABLE(WEB_INTENTS)
77
#include "IntentData.h"
77
#include "IntentData.h"
78
#include "IntentServiceInfo.h"
78
#include "WebIntentData.h"
79
#include <WebCore/IntentRequest.h>
79
#include <WebCore/IntentRequest.h>
80
#endif
80
#endif
81
81
82
#if ENABLE(WEB_INTENTS_TAG)
83
#include "IntentServiceInfo.h"
84
#include "WebIntentServiceInfo.h"
85
#endif
86
82
using namespace WebCore;
87
using namespace WebCore;
83
88
84
namespace WebKit {
89
namespace WebKit {
Lines 1567-1573 void WebFrameLoaderClient::dispatchIntent(PassRefPtr<IntentRequest> request) a/Source/WebKit2/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp_sec2
1567
    intentData.extras = coreIntent->extras();
1572
    intentData.extras = coreIntent->extras();
1568
    intentData.suggestions = coreIntent->suggestions();
1573
    intentData.suggestions = coreIntent->suggestions();
1569
1574
1570
    webPage->send(Messages::WebPageProxy::DidReceiveIntentForFrame(m_frame->frameID(), intentData));
1575
    RefPtr<APIObject> userData;
1576
    RefPtr<WebIntentData> webIntent = WebIntentData::create(intentData);
1577
    webPage->injectedBundleLoaderClient().didReceiveIntentForFrame(webPage, m_frame, webIntent.get(), userData);
1578
1579
    webPage->send(Messages::WebPageProxy::DidReceiveIntentForFrame(m_frame->frameID(), intentData, InjectedBundleUserMessageEncoder(userData.get())));
1571
}
1580
}
1572
#endif
1581
#endif
1573
1582
Lines 1585-1591 void WebFrameLoaderClient::registerIntentService(const String& action, const Str a/Source/WebKit2/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp_sec3
1585
    serviceInfo.title = title;
1594
    serviceInfo.title = title;
1586
    serviceInfo.disposition = disposition;
1595
    serviceInfo.disposition = disposition;
1587
1596
1588
    webPage->send(Messages::WebPageProxy::RegisterIntentServiceForFrame(m_frame->frameID(), serviceInfo));
1597
    RefPtr<APIObject> userData;
1598
    RefPtr<WebIntentServiceInfo> webIntentServiceInfo = WebIntentServiceInfo::create(serviceInfo);
1599
    webPage->injectedBundleLoaderClient().registerIntentServiceForFrame(webPage, m_frame, webIntentServiceInfo.get(), userData);
1600
1601
    webPage->send(Messages::WebPageProxy::RegisterIntentServiceForFrame(m_frame->frameID(), serviceInfo, InjectedBundleUserMessageEncoder(userData.get())));
1589
}
1602
}
1590
#endif
1603
#endif
1591
1604
- a/Source/WebKit2/WebProcess/qt/QtBuiltinBundlePage.cpp +2 lines
Lines 76-81 QtBuiltinBundlePage::QtBuiltinBundlePage(QtBuiltinBundle* bundle, WKBundlePageRe a/Source/WebKit2/WebProcess/qt/QtBuiltinBundlePage.cpp_sec1
76
        0, // willDestroyGlobalObjectForDOMWindowExtension
76
        0, // willDestroyGlobalObjectForDOMWindowExtension
77
        0, // didFinishProgress
77
        0, // didFinishProgress
78
        0, // shouldForceUniversalAccessFromLocalURL
78
        0, // shouldForceUniversalAccessFromLocalURL
79
        0, // didReceiveIntentForFrame
80
        0, // registerIntentServiceForFrame
79
    };
81
    };
80
    WKBundlePageSetPageLoaderClient(m_page, &loaderClient);
82
    WKBundlePageSetPageLoaderClient(m_page, &loaderClient);
81
}
83
}
- a/Tools/ChangeLog +19 lines
Lines 1-5 a/Tools/ChangeLog_sec1
1
2012-07-10  Christophe Dumez  <christophe.dumez@intel.com>
1
2012-07-10  Christophe Dumez  <christophe.dumez@intel.com>
2
2
3
        [WK2] WebKitTestRunner needs to print information about Web intents
4
        https://bugs.webkit.org/show_bug.cgi?id=90873
5
6
        Reviewed by NOBODY (OOPS!).
7
8
        Print out information about new intents requests and intent
9
        services registrations in WebKitTestRunner. This is expected
10
        by tests under webintents/*.
11
12
        * WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp:
13
        (WTR::InjectedBundlePage::InjectedBundlePage):
14
        (WTR::InjectedBundlePage::didReceiveIntentForFrame):
15
        (WTR):
16
        (WTR::InjectedBundlePage::registerIntentServiceForFrame):
17
        * WebKitTestRunner/InjectedBundle/InjectedBundlePage.h:
18
        (InjectedBundlePage):
19
20
2012-07-10  Christophe Dumez  <christophe.dumez@intel.com>
21
3
        [EFL] WebKit DRT and WTR fail to build due to undefined reference to WTF::MD5::*
22
        [EFL] WebKit DRT and WTR fail to build due to undefined reference to WTF::MD5::*
4
        https://bugs.webkit.org/show_bug.cgi?id=90868
23
        https://bugs.webkit.org/show_bug.cgi?id=90868
5
24
- a/Tools/WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp -1 / +79 lines
Lines 49-54 a/Tools/WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp_sec1
49
#include "DumpRenderTreeSupportQt.h"
49
#include "DumpRenderTreeSupportQt.h"
50
#endif
50
#endif
51
51
52
#if ENABLE(WEB_INTENTS)
53
#include <WebKit2/WKIntentData.h>
54
#endif
55
#if ENABLE(WEB_INTENTS_TAG)
56
#include <WebKit2/WKIntentServiceInfo.h>
57
#endif
58
52
using namespace std;
59
using namespace std;
53
60
54
namespace WTR {
61
namespace WTR {
Lines 241-247 InjectedBundlePage::InjectedBundlePage(WKBundlePageRef page) a/Tools/WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp_sec2
241
        0, // didReconnectDOMWindowExtensionToGlobalObject
248
        0, // didReconnectDOMWindowExtensionToGlobalObject
242
        0, // willDestroyGlobalObjectForDOMWindowExtension
249
        0, // willDestroyGlobalObjectForDOMWindowExtension
243
        didFinishProgress, // didFinishProgress
250
        didFinishProgress, // didFinishProgress
244
        0 // shouldForceUniversalAccessFromLocalURL
251
        0, // shouldForceUniversalAccessFromLocalURL
252
        didReceiveIntentForFrame, // didReceiveIntentForFrame
253
        registerIntentServiceForFrame // registerIntentServiceForFrame
245
    };
254
    };
246
    WKBundlePageSetPageLoaderClient(m_page, &loaderClient);
255
    WKBundlePageSetPageLoaderClient(m_page, &loaderClient);
247
256
Lines 416-421 void InjectedBundlePage::didFinishProgress(WKBundlePageRef, const void *clientIn a/Tools/WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp_sec3
416
    static_cast<InjectedBundlePage*>(const_cast<void*>(clientInfo))->didFinishProgress();
425
    static_cast<InjectedBundlePage*>(const_cast<void*>(clientInfo))->didFinishProgress();
417
}
426
}
418
427
428
void InjectedBundlePage::didReceiveIntentForFrame(WKBundlePageRef page, WKBundleFrameRef frame, WKIntentDataRef intent, WKTypeRef* userData, const void* clientInfo)
429
{
430
#if ENABLE(WEB_INTENTS)
431
    InjectedBundle::shared().stringBuilder()->append("Received Web Intent: action=");
432
    WKRetainPtr<WKStringRef> wkAction(AdoptWK, WKIntentDataCopyAction(intent));
433
    InjectedBundle::shared().stringBuilder()->append(toWTFString(wkAction.get()));
434
    InjectedBundle::shared().stringBuilder()->append(" type=");
435
    WKRetainPtr<WKStringRef> wkType(AdoptWK, WKIntentDataCopyType(intent));
436
    InjectedBundle::shared().stringBuilder()->append(toWTFString(wkType.get()));
437
    InjectedBundle::shared().stringBuilder()->append("\n");
438
439
    // FIXME: Print number of ports when exposed in WebKit2
440
441
    WKRetainPtr<WKURLRef> wkServiceUrl(AdoptWK, WKIntentDataCopyService(intent));
442
    if (wkServiceUrl) {
443
        WKRetainPtr<WKStringRef> wkService(AdoptWK, WKURLCopyString(wkServiceUrl.get()));
444
        if (wkService && !WKStringIsEmpty(wkService.get())) {
445
            InjectedBundle::shared().stringBuilder()->append("Explicit intent service: ");
446
            InjectedBundle::shared().stringBuilder()->append(toWTFString(wkService.get()));
447
            InjectedBundle::shared().stringBuilder()->append("\n");
448
        }
449
    }
450
451
    WKRetainPtr<WKDictionaryRef> wkExtras(AdoptWK, WKIntentDataCopyExtras(intent));
452
    WKRetainPtr<WKArrayRef> wkExtraKeys(AdoptWK, WKDictionaryCopyKeys(wkExtras.get()));
453
    const size_t numExtraKeys = WKArrayGetSize(wkExtraKeys.get());
454
    for (size_t i = 0; i < numExtraKeys; ++i) {
455
        WKStringRef wkKey = static_cast<WKStringRef>(WKArrayGetItemAtIndex(wkExtraKeys.get(), i));
456
        WKStringRef wkValue = static_cast<WKStringRef>(WKDictionaryGetItemForKey(wkExtras.get(), wkKey));
457
        InjectedBundle::shared().stringBuilder()->append("Extras[");
458
        InjectedBundle::shared().stringBuilder()->append(toWTFString(wkKey));
459
        InjectedBundle::shared().stringBuilder()->append("] = ");
460
        InjectedBundle::shared().stringBuilder()->append(toWTFString(wkValue));
461
        InjectedBundle::shared().stringBuilder()->append("\n");
462
    }
463
464
    WKRetainPtr<WKArrayRef> wkSuggestions(AdoptWK, WKIntentDataCopySuggestions(intent));
465
    const size_t numSuggestions = WKArrayGetSize(wkSuggestions.get());
466
    for (size_t i = 0; i < numSuggestions; ++i) {
467
        WKStringRef wkSuggestion = static_cast<WKStringRef>(WKArrayGetItemAtIndex(wkSuggestions.get(), i));
468
        InjectedBundle::shared().stringBuilder()->append("Have suggestion ");
469
        InjectedBundle::shared().stringBuilder()->append(toWTFString(wkSuggestion));
470
        InjectedBundle::shared().stringBuilder()->append("\n");
471
    }
472
#endif
473
}
474
475
void InjectedBundlePage::registerIntentServiceForFrame(WKBundlePageRef page, WKBundleFrameRef frame, WKIntentServiceInfoRef serviceInfo, WKTypeRef* userData, const void* clientInfo)
476
{
477
#if ENABLE(WEB_INTENTS_TAG)
478
    InjectedBundle::shared().stringBuilder()->append("Registered Web Intent Service: action=");
479
    WKRetainPtr<WKStringRef> wkAction(AdoptWK, WKIntentServiceInfoCopyAction(serviceInfo));
480
    InjectedBundle::shared().stringBuilder()->append(toWTFString(wkAction.get()));
481
    InjectedBundle::shared().stringBuilder()->append(" type=");
482
    WKRetainPtr<WKStringRef> wkType(AdoptWK, WKIntentServiceInfoCopyType(serviceInfo));
483
    InjectedBundle::shared().stringBuilder()->append(toWTFString(wkType.get()));
484
    InjectedBundle::shared().stringBuilder()->append(" title=");
485
    WKRetainPtr<WKStringRef> wkTitle(AdoptWK, WKIntentServiceInfoCopyTitle(serviceInfo));
486
    InjectedBundle::shared().stringBuilder()->append(toWTFString(wkTitle.get()));
487
    InjectedBundle::shared().stringBuilder()->append(" url=");
488
    WKRetainPtr<WKURLRef> wkUrl(AdoptWK, WKIntentServiceInfoCopyHref(serviceInfo));
489
    InjectedBundle::shared().stringBuilder()->append(toWTFString(adoptWK(WKURLCopyString(wkUrl.get()))));
490
    InjectedBundle::shared().stringBuilder()->append(" disposition=");
491
    WKRetainPtr<WKStringRef> wkDisposition(AdoptWK, WKIntentServiceInfoCopyDisposition(serviceInfo));
492
    InjectedBundle::shared().stringBuilder()->append(toWTFString(wkDisposition.get()));
493
    InjectedBundle::shared().stringBuilder()->append("\n");
494
#endif
495
}
496
419
void InjectedBundlePage::didFinishDocumentLoadForFrame(WKBundlePageRef page, WKBundleFrameRef frame, WKTypeRef*, const void* clientInfo)
497
void InjectedBundlePage::didFinishDocumentLoadForFrame(WKBundlePageRef page, WKBundleFrameRef frame, WKTypeRef*, const void* clientInfo)
420
{
498
{
421
    static_cast<InjectedBundlePage*>(const_cast<void*>(clientInfo))->didFinishDocumentLoadForFrame(frame);
499
    static_cast<InjectedBundlePage*>(const_cast<void*>(clientInfo))->didFinishDocumentLoadForFrame(frame);
- a/Tools/WebKitTestRunner/InjectedBundle/InjectedBundlePage.h +2 lines
Lines 72-77 private: a/Tools/WebKitTestRunner/InjectedBundle/InjectedBundlePage.h_sec1
72
    static void didReceiveContentLengthForResource(WKBundlePageRef, WKBundleFrameRef, uint64_t identifier, uint64_t length, const void*);
72
    static void didReceiveContentLengthForResource(WKBundlePageRef, WKBundleFrameRef, uint64_t identifier, uint64_t length, const void*);
73
    static void didFinishLoadForResource(WKBundlePageRef, WKBundleFrameRef, uint64_t identifier, const void*);
73
    static void didFinishLoadForResource(WKBundlePageRef, WKBundleFrameRef, uint64_t identifier, const void*);
74
    static void didFailLoadForResource(WKBundlePageRef, WKBundleFrameRef, uint64_t identifier, WKErrorRef, const void*);
74
    static void didFailLoadForResource(WKBundlePageRef, WKBundleFrameRef, uint64_t identifier, WKErrorRef, const void*);
75
    static void didReceiveIntentForFrame(WKBundlePageRef, WKBundleFrameRef, WKIntentDataRef, WKTypeRef*, const void*);
76
    static void registerIntentServiceForFrame(WKBundlePageRef, WKBundleFrameRef, WKIntentServiceInfoRef, WKTypeRef*, const void*);
75
77
76
    void didStartProvisionalLoadForFrame(WKBundleFrameRef);
78
    void didStartProvisionalLoadForFrame(WKBundleFrameRef);
77
    void didReceiveServerRedirectForProvisionalLoadForFrame(WKBundleFrameRef);
79
    void didReceiveServerRedirectForProvisionalLoadForFrame(WKBundleFrameRef);

Return to Bug 90873