1/* This file is part of the KDE project
2 *
3 * Copyright (C) 1998, 1999 Torben Weis <weis@kde.org>
4 * 1999-2001 Lars Knoll <knoll@kde.org>
5 * 1999-2001 Antti Koivisto <koivisto@kde.org>
6 * 2000-2001 Simon Hausmann <hausmann@kde.org>
7 * 2000-2001 Dirk Mueller <mueller@kde.org>
8 * 2000 Stefan Schimanski <1Stein@gmx.de>
9 * 2001-2005 George Staikos <staikos@kde.org>
10 * 2010 Maksim Orlovich <maksim@kde.org>
11 *
12 * This library is free software; you can redistribute it and/or
13 * modify it under the terms of the GNU Library General Public
14 * License as published by the Free Software Foundation; either
15 * version 2 of the License, or (at your option) any later version.
16 *
17 * This library is distributed in the hope that it will be useful,
18 * but WITHOUT ANY WARRANTY; without even the implied warranty of
19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
20 * Library General Public License for more details.
21 *
22 * You should have received a copy of the GNU Library General Public License
23 * along with this library; see the file COPYING.LIB. If not, write to
24 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
25 * Boston, MA 02110-1301, USA.
26 */
27#ifndef khtml_childframe_p_h
28#define khtml_childframe_p_h
29
30#include <kparts/partmanager.h>
31#include <kparts/statusbarextension.h>
32#include <kparts/browserextension.h>
33#include <kparts/scriptableextension.h>
34
35#include "html/html_objectimpl.h"
36#include "khtml_run.h"
37#include "ecma/kjs_proxy.h"
38
39namespace khtml {
40class KHTML_EXPORT ChildFrame : public QObject
41{
42 Q_OBJECT
43public:
44 enum Type { Frame, IFrame, Object };
45
46 ChildFrame();
47 ~ChildFrame();
48
49 QWeakPointer<DOM::HTMLPartContainerElementImpl> m_partContainerElement;
50 QWeakPointer<KParts::BrowserExtension> m_extension;
51 QWeakPointer<KParts::ScriptableExtension> m_scriptable;
52
53 // Despite QPointer's shortcomings, we actually want it and not QPointer
54 // here, since Window::getOwnPropertySlot needs to access it, and
55 // QPointer's access path is cheaper
56 QPointer<KParts::ReadOnlyPart> m_part;
57
58 QString m_serviceName;
59 QString m_serviceType;
60 KJSProxy *m_jscript;
61 bool m_bCompleted;
62 QString m_name;
63 KParts::OpenUrlArguments m_args;
64 KParts::BrowserArguments m_browserArgs;
65 QWeakPointer<KHTMLRun> m_run;
66 KUrl m_workingURL;
67 Type m_type;
68 QStringList m_params;
69 bool m_bPreloaded;
70 bool m_bNotify;
71 bool m_bPendingRedirection;
72
73 // Debug stuff
74 const char* typeString() const;
75 void dump(int indent);
76 static void dumpFrameTree(KHTMLPart* part);
77}; // ChildFrame
78
79} // namespace khtml
80
81struct KHTMLFrameList : public QList<khtml::ChildFrame*>
82{
83 Iterator find( const QString &name ) KDE_NO_EXPORT;
84};
85
86typedef KHTMLFrameList::ConstIterator ConstFrameIt;
87typedef KHTMLFrameList::Iterator FrameIt;
88
89#endif
90