Changeset 120278 in webkit
- Timestamp:
- Jun 13, 2012 9:37:22 PM (12 years ago)
- Location:
- trunk
- Files:
-
- 19 edited
- 4 copied
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebKit2/CMakeLists.txt
r120215 r120278 123 123 Shared/ImmutableArray.cpp 124 124 Shared/ImmutableDictionary.cpp 125 Shared/IntentData.cpp 125 126 Shared/MutableArray.cpp 126 127 Shared/MutableDictionary.cpp … … 237 238 UIProcess/WebIconDatabaseClient.cpp 238 239 UIProcess/WebInspectorProxy.cpp 240 UIProcess/WebIntentData.cpp 239 241 UIProcess/WebKeyValueStorageManagerProxy.cpp 240 242 UIProcess/WebLayerTreeRenderer.cpp -
trunk/Source/WebKit2/ChangeLog
r120277 r120278 1 2012-06-13 Christophe Dumez <christophe.dumez@intel.com> 2 3 [WK2] Add implementation for dispatchIntent in WebFrameLoaderClient 4 https://bugs.webkit.org/show_bug.cgi?id=88340 5 6 Reviewed by Kenneth Rohde Christiansen. 7 8 Add implementation for dispatchIntent() in WebFrameLoaderClient. 9 10 * CMakeLists.txt: 11 * GNUmakefile.list.am: 12 * Shared/API/c/WKBase.h: 13 * Shared/APIClientTraits.h: 14 * Shared/APIObject.h: 15 * Shared/IntentData.cpp: Added. 16 (WebKit): 17 (WebKit::IntentData::encode): 18 (WebKit::IntentData::decode): 19 * Shared/IntentData.h: Added. 20 (CoreIPC): 21 (WebKit): 22 (IntentData): 23 * Target.pri: 24 * UIProcess/API/C/WKAPICast.h: 25 (WebKit): 26 * UIProcess/API/C/WKPage.h: 27 * UIProcess/API/gtk/WebKitLoaderClient.cpp: 28 (attachLoaderClientToView): 29 * UIProcess/WebIntentData.cpp: Added. 30 (WebKit): 31 (WebKit::WebIntentData::WebIntentData): 32 (WebKit::WebIntentData::data): 33 * UIProcess/WebIntentData.h: Added. 34 (WebKit): 35 (WebIntentData): 36 (WebKit::WebIntentData::create): 37 (WebKit::WebIntentData::~WebIntentData): 38 (WebKit::WebIntentData::action): 39 (WebKit::WebIntentData::payloadType): 40 (WebKit::WebIntentData::extras): 41 (WebKit::WebIntentData::suggestions): 42 (WebKit::WebIntentData::type): 43 * UIProcess/WebLoaderClient.cpp: 44 (WebKit): 45 (WebKit::WebLoaderClient::didReceiveIntentForFrame): 46 * UIProcess/WebLoaderClient.h: 47 (WebKit): 48 (WebLoaderClient): 49 * UIProcess/WebPageProxy.cpp: 50 (WebKit): 51 (WebKit::WebPageProxy::didReceiveIntentForFrame): 52 * UIProcess/WebPageProxy.h: 53 (WebKit): 54 (WebPageProxy): 55 * UIProcess/WebPageProxy.messages.in: 56 * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp: 57 (WebKit::WebFrameLoaderClient::dispatchIntent): 58 1 59 2012-06-13 Tim Horton <timothy_horton@apple.com> 2 60 -
trunk/Source/WebKit2/GNUmakefile.list.am
r120262 r120278 363 363 Source/WebKit2/Shared/ImmutableDictionary.cpp \ 364 364 Source/WebKit2/Shared/ImmutableDictionary.h \ 365 Source/WebKit2/Shared/IntentData.cpp \ 366 Source/WebKit2/Shared/IntentData.h \ 365 367 Source/WebKit2/Shared/LayerTreeContext.h \ 366 368 Source/WebKit2/Shared/MutableArray.cpp \ … … 802 804 Source/WebKit2/UIProcess/WebInspectorProxy.cpp \ 803 805 Source/WebKit2/UIProcess/WebInspectorProxy.h \ 806 Source/WebKit2/UIProcess/WebIntentData.cpp \ 807 Source/WebKit2/UIProcess/WebIntentData.h \ 804 808 Source/WebKit2/UIProcess/WebKeyValueStorageManagerProxy.cpp \ 805 809 Source/WebKit2/UIProcess/WebKeyValueStorageManagerProxy.h \ -
trunk/Source/WebKit2/Shared/API/c/WKBase.h
r120215 r120278 99 99 typedef const struct OpaqueWKIconDatabase* WKIconDatabaseRef; 100 100 typedef const struct OpaqueWKInspector* WKInspectorRef; 101 typedef const struct OpaqueWKIntentData* WKIntentDataRef; 101 102 typedef const struct OpaqueWKKeyValueStorageManager* WKKeyValueStorageManagerRef; 102 103 typedef const struct OpaqueWKMediaCacheManager* WKMediaCacheManagerRef; -
trunk/Source/WebKit2/Shared/APIClientTraits.h
r120215 r120278 54 54 55 55 template<> struct APIClientTraits<WKPageLoaderClient> { 56 static const size_t interfaceSizesByVersion[ 2];56 static const size_t interfaceSizesByVersion[3]; 57 57 }; 58 58 -
trunk/Source/WebKit2/Shared/APIObject.h
r120215 r120278 89 89 TypeIconDatabase, 90 90 TypeInspector, 91 TypeIntentData, 91 92 TypeKeyValueStorageManager, 92 93 TypeMediaCacheManager, -
trunk/Source/WebKit2/Shared/IntentData.cpp
r120277 r120278 1 1 /* 2 * Copyright (C) 201 1 Apple Inc. All rights reserved.2 * Copyright (C) 2012 Intel Corporation. All rights reserved. 3 3 * 4 4 * Redistribution and use in source and binary forms, with or without … … 24 24 */ 25 25 26 #i fndef APIClientTraits_h27 # define APIClientTraits_h26 #include "config.h" 27 #include "IntentData.h" 28 28 29 #include "WKBundlePage.h" 30 #include "WKPage.h" 29 #if ENABLE(WEB_INTENTS) 30 31 #include "APIObject.h" 32 #include "DataReference.h" 33 #include "WebCoreArgumentCoders.h" 34 35 using namespace WebCore; 31 36 32 37 namespace WebKit { 33 38 34 template <typename ClientInterface> struct APIClientTraits { 35 static const size_t interfaceSizesByVersion[1]; 36 }; 37 template <typename ClientInterface> const size_t APIClientTraits<ClientInterface>::interfaceSizesByVersion[] = { sizeof(ClientInterface) }; 39 void IntentData::encode(CoreIPC::ArgumentEncoder* encoder) const 40 { 41 encoder->encode(action); 42 encoder->encode(type); 43 encoder->encode(CoreIPC::DataReference(data)); 44 encoder->encode(extras); 45 encoder->encode(suggestions); 46 } 38 47 39 template<> struct APIClientTraits<WKBundlePageLoaderClient> { 40 static const size_t interfaceSizesByVersion[3]; 41 }; 48 bool IntentData::decode(CoreIPC::ArgumentDecoder* decoder, IntentData& intentData) 49 { 50 if (!decoder->decode(intentData.action)) 51 return false; 52 if (!decoder->decode(intentData.type)) 53 return false; 54 CoreIPC::DataReference data; 55 if (!decoder->decode(data)) 56 return false; 57 intentData.data.append(data.data(), data.size()); 58 if (!decoder->decode(intentData.extras)) 59 return false; 60 if (!decoder->decode(intentData.suggestions)) 61 return false; 42 62 43 template<> struct APIClientTraits<WKBundlePageResourceLoadClient> { 44 static const size_t interfaceSizesByVersion[2]; 45 }; 46 47 template<> struct APIClientTraits<WKBundlePageFullScreenClient> { 48 static const size_t interfaceSizesByVersion[2]; 49 }; 50 51 template<> struct APIClientTraits<WKPageContextMenuClient> { 52 static const size_t interfaceSizesByVersion[3]; 53 }; 54 55 template<> struct APIClientTraits<WKPageLoaderClient> { 56 static const size_t interfaceSizesByVersion[2]; 57 }; 58 59 template<> struct APIClientTraits<WKPageUIClient> { 60 static const size_t interfaceSizesByVersion[2]; 61 }; 62 63 template<> struct APIClientTraits<WKBundlePageFormClient> { 64 static const size_t interfaceSizesByVersion[2]; 65 }; 63 return true; 64 } 66 65 67 66 } // namespace WebKit 68 67 69 #endif // APIClientTraits_h 68 #endif // ENABLE(WEB_INTENTS) 69 -
trunk/Source/WebKit2/Shared/IntentData.h
r120277 r120278 1 1 /* 2 * Copyright (C) 201 1 Apple Inc. All rights reserved.2 * Copyright (C) 2012 Intel Corporation. All rights reserved. 3 3 * 4 4 * Redistribution and use in source and binary forms, with or without … … 24 24 */ 25 25 26 #ifndef APIClientTraits_h27 #define APIClientTraits_h26 #ifndef IntentData_h 27 #define IntentData_h 28 28 29 #include "WKBundlePage.h" 30 #include "WKPage.h" 29 #if ENABLE(WEB_INTENTS) 30 31 #include "APIObject.h" 32 #include "GenericCallback.h" 33 #include <wtf/text/WTFString.h> 34 35 namespace CoreIPC { 36 class ArgumentDecoder; 37 class ArgumentEncoder; 38 } 31 39 32 40 namespace WebKit { 33 41 34 template <typename ClientInterface> struct APIClientTraits { 35 static const size_t interfaceSizesByVersion[1]; 36 }; 37 template <typename ClientInterface> const size_t APIClientTraits<ClientInterface>::interfaceSizesByVersion[] = { sizeof(ClientInterface) }; 42 struct IntentData { 43 void encode(CoreIPC::ArgumentEncoder*) const; 44 static bool decode(CoreIPC::ArgumentDecoder*, IntentData&); 38 45 39 template<> struct APIClientTraits<WKBundlePageLoaderClient> { 40 static const size_t interfaceSizesByVersion[3]; 41 }; 42 43 template<> struct APIClientTraits<WKBundlePageResourceLoadClient> { 44 static const size_t interfaceSizesByVersion[2]; 45 }; 46 47 template<> struct APIClientTraits<WKBundlePageFullScreenClient> { 48 static const size_t interfaceSizesByVersion[2]; 49 }; 50 51 template<> struct APIClientTraits<WKPageContextMenuClient> { 52 static const size_t interfaceSizesByVersion[3]; 53 }; 54 55 template<> struct APIClientTraits<WKPageLoaderClient> { 56 static const size_t interfaceSizesByVersion[2]; 57 }; 58 59 template<> struct APIClientTraits<WKPageUIClient> { 60 static const size_t interfaceSizesByVersion[2]; 61 }; 62 63 template<> struct APIClientTraits<WKBundlePageFormClient> { 64 static const size_t interfaceSizesByVersion[2]; 46 String action; 47 String type; 48 Vector<uint8_t> data; 49 HashMap<String, String> extras; 50 Vector<WebCore::KURL> suggestions; 65 51 }; 66 52 67 53 } // namespace WebKit 68 54 69 #endif // APIClientTraits_h 55 #endif // ENABLE(WEB_INTENTS) 56 57 #endif // IntentData_h -
trunk/Source/WebKit2/Target.pri
r120215 r120278 77 77 Shared/ImmutableArray.h \ 78 78 Shared/ImmutableDictionary.h \ 79 Shared/IntentData.h \ 79 80 Shared/LayerTreeContext.h \ 80 81 Shared/MutableArray.h \ … … 253 254 UIProcess/WebIconDatabaseClient.h \ 254 255 UIProcess/WebInspectorProxy.h \ 256 UIProcess/WebIntentData.h \ 255 257 UIProcess/WebKeyValueStorageManagerProxy.h \ 256 258 UIProcess/WebLayerTreeRenderer.h \ … … 441 443 Shared/ImmutableArray.cpp \ 442 444 Shared/ImmutableDictionary.cpp \ 445 Shared/IntentData.cpp \ 443 446 Shared/MutableArray.cpp \ 444 447 Shared/MutableDictionary.cpp \ … … 597 600 UIProcess/WebIconDatabaseClient.cpp \ 598 601 UIProcess/WebInspectorProxy.cpp \ 602 UIProcess/WebIntentData.cpp \ 599 603 UIProcess/WebKeyValueStorageManagerProxy.cpp \ 600 604 UIProcess/WebLayerTreeRenderer.cpp \ -
trunk/Source/WebKit2/UIProcess/API/C/WKAPICast.h
r120215 r120278 71 71 class WebIconDatabase; 72 72 class WebInspectorProxy; 73 class WebIntentData; 73 74 class WebKeyValueStorageManagerProxy; 74 75 class WebMediaCacheManagerProxy; … … 108 109 WK_ADD_API_MAPPING(WKHitTestResultRef, WebHitTestResult) 109 110 WK_ADD_API_MAPPING(WKIconDatabaseRef, WebIconDatabase) 111 WK_ADD_API_MAPPING(WKIntentDataRef, WebIntentData) 110 112 WK_ADD_API_MAPPING(WKKeyValueStorageManagerRef, WebKeyValueStorageManagerProxy) 111 113 WK_ADD_API_MAPPING(WKMediaCacheManagerRef, WebMediaCacheManagerProxy) -
trunk/Source/WebKit2/UIProcess/API/C/WKPage.h
r120215 r120278 74 74 typedef void (*WKPageWillGoToBackForwardListItemCallback)(WKPageRef page, WKBackForwardListItemRef item, WKTypeRef userData, const void *clientInfo); 75 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 77 77 78 // Deprecated … … 121 122 WKPageCallback interactionOccurredWhileProcessUnresponsive; 122 123 WKPagePluginDidFailCallback pluginDidFail; 124 125 // Version 2 126 WKPageDidReceiveIntentForFrameCallback didReceiveIntentForFrame; 123 127 }; 124 128 typedef struct WKPageLoaderClient WKPageLoaderClient; 125 129 126 enum { kWKPageLoaderClientCurrentVersion = 1};130 enum { kWKPageLoaderClientCurrentVersion = 2 }; 127 131 128 132 // Policy Client. -
trunk/Source/WebKit2/UIProcess/API/gtk/WebKitLoaderClient.cpp
r120215 r120278 150 150 0, // interactionOccurredWhileProcessUnresponsive 151 151 0, // pluginDidFail 152 0, // didReceiveIntentForFrame 152 153 }; 153 154 WKPageRef wkPage = toAPI(webkitWebViewBaseGetPage(WEBKIT_WEB_VIEW_BASE(webView))); -
trunk/Source/WebKit2/UIProcess/WebIntentData.cpp
r120277 r120278 1 1 /* 2 * Copyright (C) 201 1 Apple Inc. All rights reserved.2 * Copyright (C) 2012 Intel Corporation. All rights reserved. 3 3 * 4 4 * Redistribution and use in source and binary forms, with or without … … 24 24 */ 25 25 26 #i fndef APIClientTraits_h27 # define APIClientTraits_h26 #include "config.h" 27 #include "WebIntentData.h" 28 28 29 #include "WKBundlePage.h" 30 #include "WKPage.h" 29 #if ENABLE(WEB_INTENTS) 31 30 32 31 namespace WebKit { 33 32 34 template <typename ClientInterface> struct APIClientTraits { 35 static const size_t interfaceSizesByVersion[1];36 }; 37 template <typename ClientInterface> const size_t APIClientTraits<ClientInterface>::interfaceSizesByVersion[] = { sizeof(ClientInterface) }; 33 WebIntentData::WebIntentData(const IntentData& store) 34 : m_store(store) 35 { 36 } 38 37 39 template<> struct APIClientTraits<WKBundlePageLoaderClient> { 40 static const size_t interfaceSizesByVersion[3]; 41 }; 42 43 template<> struct APIClientTraits<WKBundlePageResourceLoadClient> { 44 static const size_t interfaceSizesByVersion[2]; 45 }; 46 47 template<> struct APIClientTraits<WKBundlePageFullScreenClient> { 48 static const size_t interfaceSizesByVersion[2]; 49 }; 50 51 template<> struct APIClientTraits<WKPageContextMenuClient> { 52 static const size_t interfaceSizesByVersion[3]; 53 }; 54 55 template<> struct APIClientTraits<WKPageLoaderClient> { 56 static const size_t interfaceSizesByVersion[2]; 57 }; 58 59 template<> struct APIClientTraits<WKPageUIClient> { 60 static const size_t interfaceSizesByVersion[2]; 61 }; 62 63 template<> struct APIClientTraits<WKBundlePageFormClient> { 64 static const size_t interfaceSizesByVersion[2]; 65 }; 38 PassRefPtr<WebSerializedScriptValue> WebIntentData::data() const 39 { 40 Vector<uint8_t> dataCopy = m_store.data; 41 return WebSerializedScriptValue::adopt(dataCopy); 42 } 66 43 67 44 } // namespace WebKit 68 45 69 #endif // APIClientTraits_h 46 #endif // ENABLE(WEB_INTENTS) 47 -
trunk/Source/WebKit2/UIProcess/WebIntentData.h
r120277 r120278 1 1 /* 2 * Copyright (C) 201 1 Apple Inc. All rights reserved.2 * Copyright (C) 2012 Intel Corporation. All rights reserved. 3 3 * 4 4 * Redistribution and use in source and binary forms, with or without … … 24 24 */ 25 25 26 #ifndef APIClientTraits_h27 #define APIClientTraits_h26 #ifndef WebIntentData_h 27 #define WebIntentData_h 28 28 29 #include "WKBundlePage.h" 30 #include "WKPage.h" 29 #if ENABLE(WEB_INTENTS) 30 31 #include "APIObject.h" 32 #include "IntentData.h" 33 #include "WebSerializedScriptValue.h" 34 #include <wtf/PassRefPtr.h> 31 35 32 36 namespace WebKit { 33 37 34 template <typename ClientInterface> struct APIClientTraits { 35 static const size_t interfaceSizesByVersion[1]; 36 }; 37 template <typename ClientInterface> const size_t APIClientTraits<ClientInterface>::interfaceSizesByVersion[] = { sizeof(ClientInterface) }; 38 class WebIntentData : public APIObject { 39 public: 40 static const Type APIType = TypeIntentData; 38 41 39 template<> struct APIClientTraits<WKBundlePageLoaderClient> { 40 static const size_t interfaceSizesByVersion[3]; 41 }; 42 static PassRefPtr<WebIntentData> create(const IntentData& store) 43 { 44 return adoptRef(new WebIntentData(store)); 45 } 42 46 43 template<> struct APIClientTraits<WKBundlePageResourceLoadClient> { 44 static const size_t interfaceSizesByVersion[2]; 45 }; 47 virtual ~WebIntentData() { } 46 48 47 template<> struct APIClientTraits<WKBundlePageFullScreenClient> { 48 static const size_t interfaceSizesByVersion[2]; 49 }; 49 const String& action() const { return m_store.action; } 50 const String& payloadType() const { return m_store.type; } 51 PassRefPtr<WebSerializedScriptValue> data() const; 52 const HashMap<String, String>& extras() const { return m_store.extras; } 53 const Vector<WebCore::KURL>& suggestions() const { return m_store.suggestions; } 50 54 51 template<> struct APIClientTraits<WKPageContextMenuClient> { 52 static const size_t interfaceSizesByVersion[3]; 53 }; 55 private: 56 WebIntentData(const IntentData&); 54 57 55 template<> struct APIClientTraits<WKPageLoaderClient> { 56 static const size_t interfaceSizesByVersion[2]; 57 }; 58 virtual Type type() const { return APIType; } 58 59 59 template<> struct APIClientTraits<WKPageUIClient> { 60 static const size_t interfaceSizesByVersion[2]; 61 }; 62 63 template<> struct APIClientTraits<WKBundlePageFormClient> { 64 static const size_t interfaceSizesByVersion[2]; 60 IntentData m_store; 65 61 }; 66 62 67 63 } // namespace WebKit 68 64 69 #endif // APIClientTraits_h 65 #endif // ENABLE(WEB_INTENTS) 66 67 #endif // WebIntentData_h -
trunk/Source/WebKit2/UIProcess/WebLoaderClient.cpp
r120215 r120278 28 28 29 29 #include "ImmutableArray.h" 30 #include "WKAPICast.h" 30 31 #include "WebBackForwardListItem.h" 31 #include "WKAPICast.h"32 32 #include <string.h> 33 33 34 #if ENABLE(WEB_INTENTS) 35 #include "WebIntentData.h" 36 #endif 37 34 38 using namespace WebCore; 35 39 … … 163 167 m_client.didDetectXSSForFrame(toAPI(page), toAPI(frame), toAPI(userData), m_client.clientInfo); 164 168 } 169 170 #if ENABLE(WEB_INTENTS) 171 void WebLoaderClient::didReceiveIntentForFrame(WebPageProxy* page, WebFrameProxy* frame, WebIntentData* intentData) 172 { 173 if (!m_client.didReceiveIntentForFrame) 174 return; 175 176 m_client.didReceiveIntentForFrame(toAPI(page), toAPI(frame), toAPI(intentData), m_client.clientInfo); 177 } 178 #endif 165 179 166 180 bool WebLoaderClient::canAuthenticateAgainstProtectionSpaceInFrame(WebPageProxy* page, WebFrameProxy* frame, WebProtectionSpace* protectionSpace) -
trunk/Source/WebKit2/UIProcess/WebLoaderClient.h
r120215 r120278 48 48 class WebProtectionSpace; 49 49 50 #if ENABLE(WEB_INTENTS) 51 class WebIntentData; 52 #endif 53 50 54 class WebLoaderClient : public APIClient<WKPageLoaderClient, kWKPageLoaderClientCurrentVersion> { 51 55 public: … … 65 69 void didRunInsecureContentForFrame(WebPageProxy*, WebFrameProxy*, APIObject*); 66 70 void didDetectXSSForFrame(WebPageProxy*, WebFrameProxy*, APIObject*); 71 #if ENABLE(WEB_INTENTS) 72 void didReceiveIntentForFrame(WebPageProxy*, WebFrameProxy*, WebIntentData*); 73 #endif 67 74 68 75 // FIXME: didFirstVisuallyNonEmptyLayoutForFrame and didNewFirstVisuallyNonEmptyLayout should be merged. -
trunk/Source/WebKit2/UIProcess/WebPageProxy.cpp
r120215 r120278 86 86 #include <stdio.h> 87 87 88 #if ENABLE(WEB_INTENTS) 89 #include "IntentData.h" 90 #include "WebIntentData.h" 91 #endif 92 88 93 #if USE(UI_SIDE_COMPOSITING) 89 94 #include "LayerTreeHostProxyMessages.h" … … 2136 2141 m_loaderClient.didDetectXSSForFrame(this, frame, userData.get()); 2137 2142 } 2143 2144 #if ENABLE(WEB_INTENTS) 2145 void WebPageProxy::didReceiveIntentForFrame(uint64_t frameID, const IntentData& intentData) 2146 { 2147 WebFrameProxy* frame = process()->webFrame(frameID); 2148 MESSAGE_CHECK(frame); 2149 2150 RefPtr<WebIntentData> webIntentData = WebIntentData::create(intentData); 2151 m_loaderClient.didReceiveIntentForFrame(this, frame, webIntentData.get()); 2152 } 2153 #endif 2138 2154 2139 2155 void WebPageProxy::frameDidBecomeFrameSet(uint64_t frameID, bool value) -
trunk/Source/WebKit2/UIProcess/WebPageProxy.h
r120262 r120278 157 157 #endif 158 158 159 #if ENABLE(WEB_INTENTS) 160 struct IntentData; 161 #endif 162 159 163 typedef GenericCallback<WKStringRef, StringImpl*> StringCallback; 160 164 typedef GenericCallback<WKSerializedScriptValueRef, WebSerializedScriptValue*> ScriptValueCallback; … … 714 718 void didChangeProgress(double); 715 719 void didFinishProgress(); 720 721 #if ENABLE(WEB_INTENTS) 722 void didReceiveIntentForFrame(uint64_t frameID, const IntentData&); 723 #endif 716 724 717 725 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); -
trunk/Source/WebKit2/UIProcess/WebPageProxy.messages.in
r120215 r120278 90 90 UnableToImplementPolicy(uint64_t frameID, WebCore::ResourceError error, WebKit::InjectedBundleUserMessageEncoder userData) 91 91 92 # Intent messages 93 #if ENABLE(WEB_INTENTS) 94 DidReceiveIntentForFrame(uint64_t frameID, WebKit::IntentData intent) 95 #endif 96 92 97 # Progress messages 93 98 DidChangeProgress(double value) -
trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp
r120218 r120278 75 75 76 76 #if ENABLE(WEB_INTENTS) 77 #include "IntentData.h" 77 78 #include <WebCore/IntentRequest.h> 78 79 #endif … … 1541 1542 1542 1543 #if ENABLE(WEB_INTENTS) 1543 void WebFrameLoaderClient::dispatchIntent(PassRefPtr<IntentRequest>) 1544 { 1545 notImplemented(); 1544 void WebFrameLoaderClient::dispatchIntent(PassRefPtr<IntentRequest> request) 1545 { 1546 WebPage* webPage = m_frame->page(); 1547 if (!webPage) 1548 return; 1549 1550 IntentData intentData; 1551 Intent* coreIntent = request->intent(); 1552 ASSERT(coreIntent); 1553 intentData.action = coreIntent->action(); 1554 intentData.type = coreIntent->type(); 1555 intentData.data = coreIntent->data()->data(); 1556 intentData.extras = coreIntent->extras(); 1557 intentData.suggestions = coreIntent->suggestions(); 1558 1559 webPage->send(Messages::WebPageProxy::DidReceiveIntentForFrame(m_frame->frameID(), intentData)); 1546 1560 } 1547 1561 #endif -
trunk/Tools/ChangeLog
r120275 r120278 1 2012-06-13 Christophe Dumez <christophe.dumez@intel.com> 2 3 [WK2] Add implementation for dispatchIntent in WebFrameLoaderClient 4 https://bugs.webkit.org/show_bug.cgi?id=88340 5 6 Reviewed by Kenneth Rohde Christiansen. 7 8 Update initialization of WKPageLoaderClient. 9 10 * MiniBrowser/mac/BrowserWindowController.m: 11 (-[BrowserWindowController awakeFromNib]): 12 * WebKitTestRunner/TestController.cpp: 13 (WTR::TestController::initialize): 14 1 15 2012-06-13 Sheriff Bot <webkit.review.bot@gmail.com> 2 16 -
trunk/Tools/MiniBrowser/mac/BrowserWindowController.m
r120215 r120278 613 613 0, // interactionOccurredWhileProcessUnresponsive 614 614 0, // pluginDidFail 615 0, // didReceiveIntentForFrame 615 616 }; 616 617 WKPageSetPageLoaderClient(_webView.pageRef, &loadClient); -
trunk/Tools/WebKitTestRunner/TestController.cpp
r120215 r120278 410 410 0, // interactionOccurredWhileProcessUnresponsive 411 411 0, // pluginDidFail 412 0, // didReceiveIntentForFrame 412 413 }; 413 414 WKPageSetPageLoaderClient(m_mainWebView->page(), &pageLoaderClient);
Note: See TracChangeset
for help on using the changeset viewer.