OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2013 Apple Inc. All rights reserv
ed. | 2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2013 Apple Inc. All rights reserv
ed. |
3 * Copyright (C) 2008 Torch Mobile Inc. All rights reserved. (http://www.torchmo
bile.com/) | 3 * Copyright (C) 2008 Torch Mobile Inc. All rights reserved. (http://www.torchmo
bile.com/) |
4 * | 4 * |
5 * This library is free software; you can redistribute it and/or | 5 * This library is free software; you can redistribute it and/or |
6 * modify it under the terms of the GNU Library General Public | 6 * modify it under the terms of the GNU Library General Public |
7 * License as published by the Free Software Foundation; either | 7 * License as published by the Free Software Foundation; either |
8 * version 2 of the License, or (at your option) any later version. | 8 * version 2 of the License, or (at your option) any later version. |
9 * | 9 * |
10 * This library is distributed in the hope that it will be useful, | 10 * This library is distributed in the hope that it will be useful, |
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
135 // depends on this will generally have to be rewritten to propagate any | 135 // depends on this will generally have to be rewritten to propagate any |
136 // necessary state through all renderer processes for that page and/or | 136 // necessary state through all renderer processes for that page and/or |
137 // coordinate/rely on the browser process to help dispatch/coordinate work. | 137 // coordinate/rely on the browser process to help dispatch/coordinate work. |
138 LocalFrame* deprecatedLocalMainFrame() const { return toLocalFrame(m_mainFra
me); } | 138 LocalFrame* deprecatedLocalMainFrame() const { return toLocalFrame(m_mainFra
me); } |
139 | 139 |
140 void documentDetached(Document*); | 140 void documentDetached(Document*); |
141 | 141 |
142 bool openedByDOM() const; | 142 bool openedByDOM() const; |
143 void setOpenedByDOM(); | 143 void setOpenedByDOM(); |
144 | 144 |
145 void incrementSubframeCount() { ++m_subframeCount; } | |
146 void decrementSubframeCount() { ASSERT(m_subframeCount); --m_subframeCount;
} | |
147 int subframeCount() const { checkSubframeCountConsistency(); return m_subfra
meCount; } | |
148 | |
149 PageAnimator& animator() { return m_animator; } | 145 PageAnimator& animator() { return m_animator; } |
150 Chrome& chrome() const { return *m_chrome; } | 146 Chrome& chrome() const { return *m_chrome; } |
151 AutoscrollController& autoscrollController() const { return *m_autoscrollCon
troller; } | 147 AutoscrollController& autoscrollController() const { return *m_autoscrollCon
troller; } |
152 DragCaretController& dragCaretController() const { return *m_dragCaretContro
ller; } | 148 DragCaretController& dragCaretController() const { return *m_dragCaretContro
ller; } |
153 DragController& dragController() const { return *m_dragController; } | 149 DragController& dragController() const { return *m_dragController; } |
154 FocusController& focusController() const { return *m_focusController; } | 150 FocusController& focusController() const { return *m_focusController; } |
155 ContextMenuController& contextMenuController() const { return *m_contextMenu
Controller; } | 151 ContextMenuController& contextMenuController() const { return *m_contextMenu
Controller; } |
156 InspectorController& inspectorController() const { return *m_inspectorContro
ller; } | 152 InspectorController& inspectorController() const { return *m_inspectorContro
ller; } |
157 PointerLockController& pointerLockController() const { return *m_pointerLock
Controller; } | 153 PointerLockController& pointerLockController() const { return *m_pointerLock
Controller; } |
158 ValidationMessageClient& validationMessageClient() const { return *m_validat
ionMessageClient; } | 154 ValidationMessageClient& validationMessageClient() const { return *m_validat
ionMessageClient; } |
(...skipping 27 matching lines...) Expand all Loading... |
186 void setDeviceScaleFactor(float); | 182 void setDeviceScaleFactor(float); |
187 void setDeviceColorProfile(const Vector<char>&); | 183 void setDeviceColorProfile(const Vector<char>&); |
188 void resetDeviceColorProfile(); | 184 void resetDeviceColorProfile(); |
189 | 185 |
190 static void allVisitedStateChanged(); | 186 static void allVisitedStateChanged(); |
191 static void visitedStateChanged(LinkHash visitedHash); | 187 static void visitedStateChanged(LinkHash visitedHash); |
192 | 188 |
193 StorageNamespace* sessionStorage(bool optionalCreate = true); | 189 StorageNamespace* sessionStorage(bool optionalCreate = true); |
194 StorageClient& storageClient() const { return *m_storageClient; } | 190 StorageClient& storageClient() const { return *m_storageClient; } |
195 | 191 |
196 // Don't allow more than a certain number of frames in a page. | |
197 // This seems like a reasonable upper bound, and otherwise mutually | |
198 // recursive frameset pages can quickly bring the program to its knees | |
199 // with exponential growth in the number of frames. | |
200 static const int maxNumberOfFrames = 1000; | |
201 | |
202 PageVisibilityState visibilityState() const; | 192 PageVisibilityState visibilityState() const; |
203 void setVisibilityState(PageVisibilityState, bool); | 193 void setVisibilityState(PageVisibilityState, bool); |
204 | 194 |
205 bool isCursorVisible() const; | 195 bool isCursorVisible() const; |
206 void setIsCursorVisible(bool isVisible) { m_isCursorVisible = isVisible; } | 196 void setIsCursorVisible(bool isVisible) { m_isCursorVisible = isVisible; } |
207 | 197 |
208 #if ENABLE(ASSERT) | 198 #if ENABLE(ASSERT) |
209 void setIsPainting(bool painting) { m_isPainting = painting; } | 199 void setIsPainting(bool painting) { m_isPainting = painting; } |
210 bool isPainting() const { return m_isPainting; } | 200 bool isPainting() const { return m_isPainting; } |
211 #endif | 201 #endif |
(...skipping 17 matching lines...) Expand all Loading... |
229 | 219 |
230 void trace(Visitor*); | 220 void trace(Visitor*); |
231 void willBeDestroyed(); | 221 void willBeDestroyed(); |
232 | 222 |
233 protected: | 223 protected: |
234 PageLifecycleNotifier& lifecycleNotifier(); | 224 PageLifecycleNotifier& lifecycleNotifier(); |
235 | 225 |
236 private: | 226 private: |
237 void initGroup(); | 227 void initGroup(); |
238 | 228 |
239 #if ENABLE(ASSERT) | |
240 void checkSubframeCountConsistency() const; | |
241 #else | |
242 void checkSubframeCountConsistency() const { } | |
243 #endif | |
244 | |
245 void setTimerAlignmentInterval(double); | 229 void setTimerAlignmentInterval(double); |
246 | 230 |
247 void setNeedsLayoutInAllFrames(); | 231 void setNeedsLayoutInAllFrames(); |
248 | 232 |
249 // SettingsDelegate overrides. | 233 // SettingsDelegate overrides. |
250 virtual void settingsChanged(SettingsDelegate::ChangeType) OVERRIDE; | 234 virtual void settingsChanged(SettingsDelegate::ChangeType) OVERRIDE; |
251 | 235 |
252 PageAnimator m_animator; | 236 PageAnimator m_animator; |
253 const OwnPtr<AutoscrollController> m_autoscrollController; | 237 const OwnPtr<AutoscrollController> m_autoscrollController; |
254 const OwnPtr<Chrome> m_chrome; | 238 const OwnPtr<Chrome> m_chrome; |
(...skipping 23 matching lines...) Expand all Loading... |
278 mutable RefPtr<PluginData> m_pluginData; | 262 mutable RefPtr<PluginData> m_pluginData; |
279 | 263 |
280 BackForwardClient* m_backForwardClient; | 264 BackForwardClient* m_backForwardClient; |
281 EditorClient* const m_editorClient; | 265 EditorClient* const m_editorClient; |
282 SpellCheckerClient* const m_spellCheckerClient; | 266 SpellCheckerClient* const m_spellCheckerClient; |
283 StorageClient* m_storageClient; | 267 StorageClient* m_storageClient; |
284 OwnPtrWillBeMember<ValidationMessageClient> m_validationMessageClient; | 268 OwnPtrWillBeMember<ValidationMessageClient> m_validationMessageClient; |
285 | 269 |
286 UseCounter m_useCounter; | 270 UseCounter m_useCounter; |
287 | 271 |
288 int m_subframeCount; | |
289 bool m_openedByDOM; | 272 bool m_openedByDOM; |
290 | 273 |
291 bool m_tabKeyCyclesThroughElements; | 274 bool m_tabKeyCyclesThroughElements; |
292 bool m_defersLoading; | 275 bool m_defersLoading; |
293 | 276 |
294 float m_deviceScaleFactor; | 277 float m_deviceScaleFactor; |
295 | 278 |
296 OwnPtr<StorageNamespace> m_sessionStorage; | 279 OwnPtr<StorageNamespace> m_sessionStorage; |
297 | 280 |
298 double m_timerAlignmentInterval; | 281 double m_timerAlignmentInterval; |
299 | 282 |
300 PageVisibilityState m_visibilityState; | 283 PageVisibilityState m_visibilityState; |
301 | 284 |
302 bool m_isCursorVisible; | 285 bool m_isCursorVisible; |
303 | 286 |
304 #if ENABLE(ASSERT) | 287 #if ENABLE(ASSERT) |
305 bool m_isPainting; | 288 bool m_isPainting; |
306 #endif | 289 #endif |
307 | 290 |
308 WillBeHeapHashSet<RawPtrWillBeWeakMember<MultisamplingChangedObserver> > m_m
ultisamplingChangedObservers; | 291 WillBeHeapHashSet<RawPtrWillBeWeakMember<MultisamplingChangedObserver> > m_m
ultisamplingChangedObservers; |
309 | 292 |
310 // A pointer to all the interfaces provided to in-process Frames for this Pa
ge. | 293 // A pointer to all the interfaces provided to in-process Frames for this Pa
ge. |
311 // FIXME: Most of the members of Page should move onto FrameHost. | 294 // FIXME: Most of the members of Page should move onto FrameHost. |
312 OwnPtrWillBeMember<FrameHost> m_frameHost; | 295 OwnPtrWillBeMember<FrameHost> m_frameHost; |
313 }; | 296 }; |
314 | 297 |
315 } // namespace blink | 298 } // namespace blink |
316 | 299 |
317 #endif // Page_h | 300 #endif // Page_h |
OLD | NEW |