2010-07-22 Jamey Hicks <jamey.hicks@nokia.com>
authorcommit-queue <commit-queue@webkit.org>
Thu, 22 Jul 2010 17:02:14 +0000 (17:02 +0000)
committerSimon Hausmann <simon.hausmann@nokia.com>
Fri, 30 Jul 2010 11:11:31 +0000 (13:11 +0200)
commite4306d5c4e0a48a34152e7d2498feaf4654e2bf9
tree4be13aa5fe6bed3776fe1b84e43065c96e7b4a8e
parent0698601d6735cfc493ecd0177b6cfadfc48e6188
2010-07-22  Jamey Hicks  <jamey.hicks@nokia.com>

        Reviewed by Kenneth Rohde Christiansen.

        [Qt] Enable binding of QObjects to JavaScript environment for inspector frontend

        This patch enables QObjects to be bound to global variables in the
        javascript environment of the inspector frontend. This is useful
        for writing alternate inspector frontends in javascript which need
        additional native functionality. It's a lighter-weight alternative
        than using an NPAPI plugin.

        The code which instantiates QWebInspector uses this by setting the
        dynamic property "q_inspectorJavaScriptWindowObjects" on the
        QWebInspector. The value of this property should be a
        QMap<QString,QVariant> mapping global variable name to QObject.

        I have used this to add support for eclipse/chrome remote
        debugging in QtTestBrowser.

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

        * WebCoreSupport/InspectorClientQt.cpp:
        (WebCore::InspectorClientWebPage::InspectorClientWebPage):
        (WebCore::InspectorClientWebPage::javaScriptWindowObjectCleared):
        (WebCore::InspectorClientQt::openInspectorFrontend):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@63899 268f45cc-cd09-0410-ab3c-d52691b4dbfc
WebKit/qt/ChangeLog
WebKit/qt/WebCoreSupport/InspectorClientQt.cpp