webengine/osswebengine/WebKit/qt/Api/qwebframe_p.h
changeset 0 dd21522fd290
equal deleted inserted replaced
-1:000000000000 0:dd21522fd290
       
     1 /*
       
     2     Copyright (C) 2007 Trolltech ASA
       
     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     This class provides all functionality needed for loading images, style sheets and html
       
    21     pages from the web. It has a memory cache for these objects.
       
    22 */
       
    23 #ifndef QWEBFRAME_P_H
       
    24 #define QWEBFRAME_P_H
       
    25 
       
    26 #include "qwebframe.h"
       
    27 #include "qwebpage_p.h"
       
    28 
       
    29 #include "EventHandler.h"
       
    30 #include "FrameView.h"
       
    31 #include "KURL.h"
       
    32 #include "PlatformString.h"
       
    33 #include "wtf/RefPtr.h"
       
    34 
       
    35 namespace WebCore
       
    36 {
       
    37     class Element;
       
    38     class FrameLoaderClientQt;
       
    39     class Frame;
       
    40     class FrameView;
       
    41     class HTMLFrameOwnerElement;
       
    42     class PlatformScrollbar;
       
    43 }
       
    44 class QWebPage;
       
    45 
       
    46 
       
    47 class QWebFrameData
       
    48 {
       
    49 public:
       
    50     WebCore::KURL url;
       
    51     WebCore::String name;
       
    52     WebCore::HTMLFrameOwnerElement* ownerElement;
       
    53 
       
    54     WebCore::String referrer;
       
    55     bool allowsScrolling;
       
    56     int marginWidth;
       
    57     int marginHeight;
       
    58 };
       
    59 
       
    60 class QWebFramePrivate
       
    61 {
       
    62 public:
       
    63     QWebFramePrivate()
       
    64         : q(0)
       
    65         , frameLoaderClient(0)
       
    66         , frame(0)
       
    67         , frameView(0)
       
    68         , page(0)
       
    69         , eventHandler(0)
       
    70         , lastHoverElement(0)
       
    71         {}
       
    72     void init(QWebFrame *qframe, WebCore::Page *page,
       
    73               QWebFrameData *frameData);
       
    74 
       
    75     QWebFrame *parentFrame();
       
    76     WebCore::PlatformScrollbar *horizontalScrollBar() const;
       
    77     WebCore::PlatformScrollbar *verticalScrollBar() const;
       
    78 
       
    79     QWebFrame *q;
       
    80     WebCore::FrameLoaderClientQt *frameLoaderClient;
       
    81     WTF::RefPtr<WebCore::Frame> frame;
       
    82     WTF::RefPtr<WebCore::FrameView> frameView;
       
    83     QWebPage *page;
       
    84     WebCore::EventHandler *eventHandler;
       
    85     WebCore::Element *lastHoverElement;
       
    86 };
       
    87 
       
    88 #endif