diff options
Diffstat (limited to 'Source/WebKit2/WebProcess/qt/QtBuiltinBundle.cpp')
-rw-r--r-- | Source/WebKit2/WebProcess/qt/QtBuiltinBundle.cpp | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/Source/WebKit2/WebProcess/qt/QtBuiltinBundle.cpp b/Source/WebKit2/WebProcess/qt/QtBuiltinBundle.cpp index c75a446dd..3bb795cad 100644 --- a/Source/WebKit2/WebProcess/qt/QtBuiltinBundle.cpp +++ b/Source/WebKit2/WebProcess/qt/QtBuiltinBundle.cpp @@ -93,6 +93,10 @@ void QtBuiltinBundle::didReceiveMessageToPage(WKBundlePageRef page, WKStringRef handleMessageToNavigatorQtObject(page, messageBody); else if (WKStringIsEqualToUTF8CString(messageName, "SetNavigatorQtObjectEnabled")) handleSetNavigatorQtObjectEnabled(page, messageBody); +#ifdef HAVE_WEBCHANNEL + else if (WKStringIsEqualToUTF8CString(messageName, "MessageToNavigatorQtWebChannelTransportObject")) + handleMessageToNavigatorQtWebChannelTransport(page, messageBody); +#endif } void QtBuiltinBundle::handleMessageToNavigatorQtObject(WKBundlePageRef page, WKTypeRef messageBody) @@ -119,4 +123,18 @@ void QtBuiltinBundle::handleSetNavigatorQtObjectEnabled(WKBundlePageRef page, WK bundlePage->setNavigatorQtObjectEnabled(enabled); } +#ifdef HAVE_WEBCHANNEL +void QtBuiltinBundle::handleMessageToNavigatorQtWebChannelTransport(WKBundlePageRef page, WKTypeRef messageBody) +{ + ASSERT(messageBody); + ASSERT(WKGetTypeID(messageBody) == WKStringGetTypeID()); + WKStringRef contents = static_cast<WKStringRef>(messageBody); + + QtBuiltinBundlePage* bundlePage = m_pages.get(page); + if (!bundlePage) + return; + bundlePage->didReceiveMessageToNavigatorQtWebChannelTransport(contents); +} +#endif + } // namespace WebKit |