File indexing completed on 2024-04-21 14:58:49

0001 /* This file is part of the KDE project
0002  *
0003  * Copyright (C) 1998, 1999 Torben Weis <weis@kde.org>
0004  *                     1999-2001 Lars Knoll <knoll@kde.org>
0005  *                     1999-2001 Antti Koivisto <koivisto@kde.org>
0006  *                     2000-2001 Simon Hausmann <hausmann@kde.org>
0007  *                     2000-2001 Dirk Mueller <mueller@kde.org>
0008  *                     2000 Stefan Schimanski <1Stein@gmx.de>
0009  *                     2001-2005 George Staikos <staikos@kde.org>
0010  *                     2010 Maksim Orlovich <maksim@kde.org>
0011  *
0012  * This library is free software; you can redistribute it and/or
0013  * modify it under the terms of the GNU Library General Public
0014  * License as published by the Free Software Foundation; either
0015  * version 2 of the License, or (at your option) any later version.
0016  *
0017  * This library is distributed in the hope that it will be useful,
0018  * but WITHOUT ANY WARRANTY; without even the implied warranty of
0019  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
0020  * Library General Public License for more details.
0021  *
0022  * You should have received a copy of the GNU Library General Public License
0023  * along with this library; see the file COPYING.LIB.  If not, write to
0024  * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
0025  * Boston, MA 02110-1301, USA.
0026  */
0027 #ifndef khtml_childframe_p_h
0028 #define khtml_childframe_p_h
0029 
0030 #include <kparts/partmanager.h>
0031 #include <kparts/statusbarextension.h>
0032 #include <kparts/browserextension.h>
0033 #include <kparts/scriptableextension.h>
0034 
0035 #include "html/html_objectimpl.h"
0036 #include "khtml_run.h"
0037 #include "ecma/kjs_proxy.h"
0038 
0039 namespace khtml
0040 {
0041 class KHTML_EXPORT ChildFrame : public QObject
0042 {
0043     Q_OBJECT
0044 public:
0045     enum Type { Frame, IFrame, Object };
0046 
0047     ChildFrame();
0048     ~ChildFrame();
0049 
0050     QWeakPointer<DOM::HTMLPartContainerElementImpl> m_partContainerElement;
0051     QWeakPointer<KParts::BrowserExtension> m_extension;
0052     QWeakPointer<KParts::ScriptableExtension> m_scriptable;
0053 
0054     // Despite QPointer's shortcomings, we actually want it and not QPointer
0055     // here, since Window::getOwnPropertySlot needs to access it, and
0056     // QPointer's access path is cheaper
0057     QPointer<KParts::ReadOnlyPart> m_part;
0058 
0059     QString m_serviceName;
0060     QString m_serviceType;
0061     KJSProxy *m_jscript;
0062     bool m_bCompleted;
0063     QString m_name;
0064     KParts::OpenUrlArguments m_args;
0065     KParts::BrowserArguments m_browserArgs;
0066     QWeakPointer<KHTMLRun> m_run;
0067     QUrl m_workingURL;
0068     Type m_type;
0069     QStringList m_params;
0070     bool m_bPreloaded;
0071     bool m_bNotify;
0072     bool m_bPendingRedirection;
0073 
0074     // Debug stuff
0075     const char *typeString() const;
0076     void dump(int indent);
0077     static void dumpFrameTree(KHTMLPart *part);
0078 }; // ChildFrame
0079 
0080 } // namespace khtml
0081 
0082 struct KHTMLFrameList : public QList<khtml::ChildFrame *> {
0083     Iterator find(const QString &name) KHTML_NO_EXPORT;
0084 };
0085 
0086 typedef KHTMLFrameList::ConstIterator ConstFrameIt;
0087 typedef KHTMLFrameList::Iterator FrameIt;
0088 
0089 #endif