1/*
2 Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies)
3 Copyright (C) 2007 Staikos Computing Services Inc.
4
5 This library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Library General Public
7 License as published by the Free Software Foundation; either
8 version 2 of the License, or (at your option) any later version.
9
10 This library is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 Library General Public License for more details.
14
15 You should have received a copy of the GNU Library General Public License
16 along with this library; see the file COPYING.LIB. If not, write to
17 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
18 Boston, MA 02110-1301, USA.
19*/
20
21#ifndef qwebframe_p_h
22#define qwebframe_p_h
23
24#include "QWebFrameAdapter.h"
25
26#include "qwebframe.h"
27#include "qwebpage_p.h"
28
29
30namespace WebCore {
31class FrameLoaderClientQt;
32class FrameView;
33class HTMLFrameOwnerElement;
34class Scrollbar;
35class TextureMapperLayer;
36}
37class QWebPage;
38
39class QWebFramePrivate : public QWebFrameAdapter {
40public:
41 QWebFramePrivate()
42 : q(0)
43 , page(0)
44 { }
45 ~QWebFramePrivate() override;
46
47 void setPage(QWebPage*);
48
49 inline QWebFrame *parentFrame() { return qobject_cast<QWebFrame*>(q->parent()); }
50
51 static QWebFrame* kit(const QWebFrameAdapter*);
52
53 // Adapter implementation
54 QWebFrame* apiHandle() override { return q; }
55 QObject* handle() override { return q; }
56 void contentsSizeDidChange(const QSize &) override;
57 int scrollBarPolicy(Qt::Orientation) const override;
58 void emitUrlChanged() override;
59 void didStartProvisionalLoad() override;
60 void didClearWindowObject() override;
61 bool handleProgressFinished(QPoint*) override;
62 void emitInitialLayoutCompleted() override;
63 void emitIconChanged() override;
64 void emitLoadStarted(bool originatingLoad) override;
65 void emitLoadFinished(bool originatingLoad, bool ok) override;
66 QWebFrameAdapter* createChildFrame(QWebFrameData*) override;
67
68 QWebFrame *q;
69 QWebPage *page;
70
71};
72
73#endif
74