Commit 8c832484 authored by andreas.kling@nokia.com's avatar andreas.kling@nokia.com
Browse files

2011-01-27 Andreas Kling <kling@webkit.org>

        Reviewed by Kenneth Rohde Christiansen.

        [Qt][WK2] Add QWKPage APIs regarding engine process availability
        https://bugs.webkit.org/show_bug.cgi?id=53237

        QWKPage will now emit engineConnected() and engineDisconnected()
        when the web process crashes and is relaunched respectively.

        Also added QWKPage::isConnectedToEngine() for convenience.

        * UIProcess/API/qt/qwkpage.cpp:
        (QWKPagePrivate::QWKPagePrivate):
        (QWKPagePrivate::didRelaunchProcess):
        (QWKPagePrivate::processDidCrash):
        (QWKPage::isConnectedToEngine):
        * UIProcess/API/qt/qwkpage.h:
        * UIProcess/API/qt/qwkpage_p.h:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@76798 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent d24de784
2011-01-27 Andreas Kling <kling@webkit.org>
Reviewed by Kenneth Rohde Christiansen.
[Qt][WK2] Add QWKPage APIs regarding engine process availability
https://bugs.webkit.org/show_bug.cgi?id=53237
QWKPage will now emit engineConnected() and engineDisconnected()
when the web process crashes and is relaunched respectively.
Also added QWKPage::isConnectedToEngine() for convenience.
* UIProcess/API/qt/qwkpage.cpp:
(QWKPagePrivate::QWKPagePrivate):
(QWKPagePrivate::didRelaunchProcess):
(QWKPagePrivate::processDidCrash):
(QWKPage::isConnectedToEngine):
* UIProcess/API/qt/qwkpage.h:
* UIProcess/API/qt/qwkpage_p.h:
2011-01-27 Balazs Kelemen <kbalazs@webkit.org>
 
Reviewed by Andreas Kling.
......@@ -89,6 +89,7 @@ QWKPagePrivate::QWKPagePrivate(QWKPage* qq, QWKContext* c)
, preferences(0)
, createNewPageFn(0)
, backingStoreType(QGraphicsWKView::Simple)
, isConnectedToEngine(true)
{
memset(actions, 0, sizeof(actions));
page = context->d->context->createWebPage(this, 0);
......@@ -391,11 +392,15 @@ void QWKPagePrivate::didRelaunchProcess()
QGraphicsWKView* wkView = static_cast<QGraphicsWKView*>(view);
if (wkView)
q->setViewportSize(wkView->size().toSize());
isConnectedToEngine = true;
emit q->engineConnected();
}
void QWKPagePrivate::processDidCrash()
{
emit q->processCrashed();
isConnectedToEngine = false;
emit q->engineDisconnected();
}
QWKPage::QWKPage(QWKContext* context)
......@@ -780,4 +785,9 @@ void QWKPagePrivate::didFindZoomableArea(const IntRect& area)
emit q->zoomableAreaFound(QRect(area));
}
bool QWKPage::isConnectedToEngine() const
{
return d->isConnectedToEngine;
}
#include "moc_qwkpage.cpp"
......@@ -117,6 +117,8 @@ public:
void findZoomableAreaForPoint(const QPoint&);
bool isConnectedToEngine() const;
public:
Q_SIGNAL void statusBarMessage(const QString&);
Q_SIGNAL void titleChanged(const QString&);
......@@ -133,7 +135,8 @@ public:
Q_SIGNAL void zoomableAreaFound(const QRect&);
Q_SIGNAL void focusNextPrevChild(bool);
Q_SIGNAL void showContextMenu(QMenu*);
Q_SIGNAL void processCrashed();
Q_SIGNAL void engineConnected();
Q_SIGNAL void engineDisconnected();
protected:
void timerEvent(QTimerEvent*);
......
......@@ -123,6 +123,8 @@ public:
QPoint tripleClick;
QBasicTimer tripleClickTimer;
QGraphicsWKView::BackingStoreType backingStoreType;
bool isConnectedToEngine;
};
class QtViewportAttributesPrivate : public QSharedData {
......
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