Changeset 148008 in webkit


Ignore:
Timestamp:
Apr 9, 2013 4:48:24 AM (11 years ago)
Author:
michael.bruning@digia.com
Message:

[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):

Location:
trunk/Source/WebKit2
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit2/ChangeLog

    r148005 r148008  
     12013-04-09  Michael Brüning  <michael.bruning@digia.com>
     2
     3        [Qt][WK2] Use C API to enable Navigator Qt Object.
     4        https://bugs.webkit.org/show_bug.cgi?id=112810
     5
     6        Reviewed by Andreas Kling.
     7
     8        Replace the direct reference to the WebPageProxy with use of
     9        C API.
     10
     11        * UIProcess/API/qt/qquickwebview.cpp:
     12        (QQuickWebViewPrivate::setNavigatorQtObjectEnabled):
     13
    1142013-04-09  Michael Brüning  <michael.bruning@digia.com>
    215
  • trunk/Source/WebKit2/UIProcess/API/qt/qquickwebview.cpp

    r147637 r148008  
    6767#include <QtQml/QJSValue>
    6868#include <QtQuick/QQuickView>
     69#include <WKNumber.h>
    6970#include <WKOpenPanelResultListener.h>
    7071#include <WKPageGroup.h>
     
    840841    m_navigatorQtObjectEnabled = enabled;
    841842
    842     static String messageName("SetNavigatorQtObjectEnabled");
    843     RefPtr<WebBoolean> webEnabled = WebBoolean::create(enabled);
    844     webPageProxy->postMessageToInjectedBundle(messageName, webEnabled.get());
     843    static WKStringRef messageName = WKStringCreateWithUTF8CString("SetNavigatorQtObjectEnabled");
     844    WKRetainPtr<WKBooleanRef> wkEnabled = adoptWK(WKBooleanCreate(enabled));
     845    WKPagePostMessageToInjectedBundle(webPage.get(), messageName, wkEnabled.get());
    845846}
    846847
Note: See TracChangeset for help on using the changeset viewer.