OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2013 Apple Inc. All rights | 2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2013 Apple Inc. All rights |
3 * reserved. | 3 * reserved. |
4 * Copyright (C) 2008 Torch Mobile Inc. All rights reserved. | 4 * Copyright (C) 2008 Torch Mobile Inc. All rights reserved. |
5 * (http://www.torchmobile.com/) | 5 * (http://www.torchmobile.com/) |
6 * | 6 * |
7 * This library is free software; you can redistribute it and/or | 7 * This library is free software; you can redistribute it and/or |
8 * modify it under the terms of the GNU Library General Public | 8 * modify it under the terms of the GNU Library General Public |
9 * License as published by the Free Software Foundation; either | 9 * License as published by the Free Software Foundation; either |
10 * version 2 of the License, or (at your option) any later version. | 10 * version 2 of the License, or (at your option) any later version. |
(...skipping 217 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
228 static void allVisitedStateChanged(bool invalidateVisitedLinkHashes); | 228 static void allVisitedStateChanged(bool invalidateVisitedLinkHashes); |
229 static void visitedStateChanged(LinkHash visitedHash); | 229 static void visitedStateChanged(LinkHash visitedHash); |
230 | 230 |
231 void setVisibilityState(PageVisibilityState, bool); | 231 void setVisibilityState(PageVisibilityState, bool); |
232 PageVisibilityState visibilityState() const; | 232 PageVisibilityState visibilityState() const; |
233 bool isPageVisible() const; | 233 bool isPageVisible() const; |
234 | 234 |
235 bool isCursorVisible() const; | 235 bool isCursorVisible() const; |
236 void setIsCursorVisible(bool isVisible) { m_isCursorVisible = isVisible; } | 236 void setIsCursorVisible(bool isVisible) { m_isCursorVisible = isVisible; } |
237 | 237 |
238 // Don't allow more than a certain number of frames in a page. | |
239 // This seems like a reasonable upper bound, and otherwise mutually | |
240 // recursive frameset pages can quickly bring the program to its knees | |
241 // with exponential growth in the number of frames. | |
242 static const int maxNumberOfFrames = 1000; | |
243 void incrementSubframeCount() { ++m_subframeCount; } | |
244 void decrementSubframeCount() { | |
245 DCHECK_GT(m_subframeCount, 0); | |
246 --m_subframeCount; | |
247 } | |
248 int subframeCount() const; | |
249 | |
250 void setDefaultPageScaleLimits(float minScale, float maxScale); | 238 void setDefaultPageScaleLimits(float minScale, float maxScale); |
251 void setUserAgentPageScaleConstraints( | 239 void setUserAgentPageScaleConstraints( |
252 const PageScaleConstraints& newConstraints); | 240 const PageScaleConstraints& newConstraints); |
253 | 241 |
254 #if DCHECK_IS_ON() | 242 #if DCHECK_IS_ON() |
255 void setIsPainting(bool painting) { m_isPainting = painting; } | 243 void setIsPainting(bool painting) { m_isPainting = painting; } |
256 bool isPainting() const { return m_isPainting; } | 244 bool isPainting() const { return m_isPainting; } |
257 #endif | 245 #endif |
258 | 246 |
259 void didCommitLoad(LocalFrame*); | 247 void didCommitLoad(LocalFrame*); |
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
331 float m_deviceScaleFactor; | 319 float m_deviceScaleFactor; |
332 | 320 |
333 PageVisibilityState m_visibilityState; | 321 PageVisibilityState m_visibilityState; |
334 | 322 |
335 bool m_isCursorVisible; | 323 bool m_isCursorVisible; |
336 | 324 |
337 #if DCHECK_IS_ON() | 325 #if DCHECK_IS_ON() |
338 bool m_isPainting = false; | 326 bool m_isPainting = false; |
339 #endif | 327 #endif |
340 | 328 |
341 int m_subframeCount; | |
342 | |
343 // A pointer to all the interfaces provided to in-process Frames for this | 329 // A pointer to all the interfaces provided to in-process Frames for this |
344 // Page. | 330 // Page. |
345 // FIXME: Most of the members of Page should move onto FrameHost. | 331 // FIXME: Most of the members of Page should move onto FrameHost. |
346 Member<FrameHost> m_frameHost; | 332 Member<FrameHost> m_frameHost; |
347 }; | 333 }; |
348 | 334 |
349 extern template class CORE_EXTERN_TEMPLATE_EXPORT Supplement<Page>; | 335 extern template class CORE_EXTERN_TEMPLATE_EXPORT Supplement<Page>; |
350 | 336 |
351 } // namespace blink | 337 } // namespace blink |
352 | 338 |
353 #endif // Page_h | 339 #endif // Page_h |
OLD | NEW |