[Qt][WK2] Use C API to enable Navigator Qt Object.

https://bugs.webkit.org/show_bug.cgi?id=112810

Reviewed by Andreas Kling.

Replace the direct reference to the WebPageProxy with use of
C API.

* UIProcess/API/qt/qquickwebview.cpp:
(QQuickWebViewPrivate::setNavigatorQtObjectEnabled):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@148008 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 2e37c198
2013-04-09 Michael Brüning <michael.bruning@digia.com>
[Qt][WK2] Use C API to enable Navigator Qt Object.
https://bugs.webkit.org/show_bug.cgi?id=112810
Reviewed by Andreas Kling.
Replace the direct reference to the WebPageProxy with use of
C API.
* UIProcess/API/qt/qquickwebview.cpp:
(QQuickWebViewPrivate::setNavigatorQtObjectEnabled):
2013-04-09 Michael Brüning <michael.bruning@digia.com>
[WK2] Add C API to copy selected files from WebOpenPanelParameters.
......@@ -66,6 +66,7 @@
#include <QtCore/QFile>
#include <QtQml/QJSValue>
#include <QtQuick/QQuickView>
#include <WKNumber.h>
#include <WKOpenPanelResultListener.h>
#include <WKPageGroup.h>
#include <WKPreferences.h>
......@@ -839,9 +840,9 @@ void QQuickWebViewPrivate::setNavigatorQtObjectEnabled(bool enabled)
// FIXME: Currently we have to keep this information in both processes and the setting is asynchronous.
m_navigatorQtObjectEnabled = enabled;
static String messageName("SetNavigatorQtObjectEnabled");
RefPtr<WebBoolean> webEnabled = WebBoolean::create(enabled);
webPageProxy->postMessageToInjectedBundle(messageName, webEnabled.get());
static WKStringRef messageName = WKStringCreateWithUTF8CString("SetNavigatorQtObjectEnabled");
WKRetainPtr<WKBooleanRef> wkEnabled = adoptWK(WKBooleanCreate(enabled));
WKPagePostMessageToInjectedBundle(webPage.get(), messageName, wkEnabled.get());
}
static WKRetainPtr<WKStringRef> readUserScript(const QUrl& url)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment