|
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 * Copyright (C) 2004, 2005, 2006 Apple Computer, Inc. |
|
10 * Copyright (C) 2007 Trolltech ASA |
|
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 |
|
28 #ifndef FramePrivate_h |
|
29 #define FramePrivate_h |
|
30 |
|
31 #include "CommandByName.h" |
|
32 #include "Editor.h" |
|
33 #include "EventHandler.h" |
|
34 #include "FrameTree.h" |
|
35 #include "Range.h" |
|
36 #include "SelectionController.h" |
|
37 #include "StringHash.h" |
|
38 |
|
39 namespace KJS { |
|
40 class Interpreter; |
|
41 |
|
42 namespace Bindings { |
|
43 class Instance; |
|
44 class RootObject; |
|
45 } |
|
46 } |
|
47 |
|
48 #if PLATFORM(MAC) |
|
49 #ifdef __OBJC__ |
|
50 @class WebCoreFrameBridge; |
|
51 @class WebScriptObject; |
|
52 #else |
|
53 class WebCoreFrameBridge; |
|
54 class WebScriptObject; |
|
55 #endif |
|
56 #endif |
|
57 |
|
58 #if PLATFORM(WIN) |
|
59 #include "FrameWin.h" |
|
60 #endif |
|
61 |
|
62 namespace WebCore { |
|
63 |
|
64 class UserStyleSheetLoader; |
|
65 |
|
66 typedef HashMap<void*, RefPtr<KJS::Bindings::RootObject> > RootObjectMap; |
|
67 |
|
68 class FramePrivate { |
|
69 public: |
|
70 FramePrivate(Page*, Frame* parent, Frame* thisFrame, HTMLFrameOwnerElement*, FrameLoaderClient*); |
|
71 ~FramePrivate(); |
|
72 |
|
73 Page* m_page; |
|
74 FrameTree m_treeNode; |
|
75 RefPtr<DOMWindow> m_domWindow; |
|
76 |
|
77 HTMLFrameOwnerElement* m_ownerElement; |
|
78 RefPtr<FrameView> m_view; |
|
79 RefPtr<Document> m_doc; |
|
80 |
|
81 KJSProxy* m_jscript; |
|
82 |
|
83 String m_kjsStatusBarText; |
|
84 String m_kjsDefaultStatusBarText; |
|
85 |
|
86 int m_zoomFactor; |
|
87 |
|
88 TextGranularity m_selectionGranularity; |
|
89 |
|
90 SelectionController m_selectionController; |
|
91 Selection m_mark; |
|
92 Timer<Frame> m_caretBlinkTimer; |
|
93 Editor m_editor; |
|
94 CommandByName m_command; |
|
95 EventHandler m_eventHandler; |
|
96 |
|
97 bool m_caretVisible : 1; |
|
98 bool m_caretPaint : 1; |
|
99 bool m_isActive : 1; |
|
100 bool m_isPainting : 1; |
|
101 |
|
102 RefPtr<CSSMutableStyleDeclaration> m_typingStyle; |
|
103 |
|
104 Timer<Frame> m_lifeSupportTimer; |
|
105 |
|
106 FrameLoader* m_loader; |
|
107 |
|
108 UserStyleSheetLoader* m_userStyleSheetLoader; |
|
109 |
|
110 RefPtr<Node> m_elementToDraw; |
|
111 PaintRestriction m_paintRestriction; |
|
112 |
|
113 bool m_highlightTextMatches; |
|
114 bool m_windowHasFocus; |
|
115 |
|
116 bool m_inViewSourceMode; |
|
117 |
|
118 unsigned frameCount; |
|
119 |
|
120 bool m_prohibitsScrolling; |
|
121 |
|
122 // The root object used for objects bound outside the context of a plugin. |
|
123 RefPtr<KJS::Bindings::RootObject> m_bindingRootObject; |
|
124 RootObjectMap m_rootObjects; |
|
125 NPObject* m_windowScriptNPObject; |
|
126 #if PLATFORM(MAC) |
|
127 RetainPtr<WebScriptObject> m_windowScriptObject; |
|
128 WebCoreFrameBridge* m_bridge; |
|
129 #endif |
|
130 #if PLATFORM(SYMBIAN) |
|
131 WebCoreFrameBridge* m_bridge; |
|
132 #endif |
|
133 }; |
|
134 } |
|
135 |
|
136 #endif |