Chromium Code Reviews| 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 213 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 224 static void allVisitedStateChanged(bool invalidateVisitedLinkHashes); | 224 static void allVisitedStateChanged(bool invalidateVisitedLinkHashes); |
| 225 static void visitedStateChanged(LinkHash visitedHash); | 225 static void visitedStateChanged(LinkHash visitedHash); |
| 226 | 226 |
| 227 void setVisibilityState(PageVisibilityState, bool); | 227 void setVisibilityState(PageVisibilityState, bool); |
| 228 PageVisibilityState visibilityState() const; | 228 PageVisibilityState visibilityState() const; |
| 229 bool isPageVisible() const; | 229 bool isPageVisible() const; |
| 230 | 230 |
| 231 bool isCursorVisible() const; | 231 bool isCursorVisible() const; |
| 232 void setIsCursorVisible(bool isVisible) { m_isCursorVisible = isVisible; } | 232 void setIsCursorVisible(bool isVisible) { m_isCursorVisible = isVisible; } |
| 233 | 233 |
| 234 // Don't allow more than a certain number of frames in a page. | |
| 235 // This seems like a reasonable upper bound, and otherwise mutually | |
| 236 // recursive frameset pages can quickly bring the program to its knees | |
| 237 // with exponential growth in the number of frames. | |
| 238 static const int maxNumberOfFrames = 1000; | |
| 239 void incrementSubframeCount() { ++m_subframeCount; } | |
| 240 void decrementSubframeCount() { | |
| 241 DCHECK(m_subframeCount); | |
|
joelhockey
2017/03/10 00:25:43
This is a question of chromium coding style rather
sashab
2017/03/10 00:56:21
Great catch! I'd definitely say DCHECK_GT is bette
| |
| 242 --m_subframeCount; | |
| 243 } | |
| 244 int subframeCount() const; | |
| 245 | |
| 234 void setDefaultPageScaleLimits(float minScale, float maxScale); | 246 void setDefaultPageScaleLimits(float minScale, float maxScale); |
| 235 void setUserAgentPageScaleConstraints( | 247 void setUserAgentPageScaleConstraints( |
| 236 const PageScaleConstraints& newConstraints); | 248 const PageScaleConstraints& newConstraints); |
| 237 | 249 |
| 238 #if DCHECK_IS_ON() | 250 #if DCHECK_IS_ON() |
| 239 void setIsPainting(bool painting) { m_isPainting = painting; } | 251 void setIsPainting(bool painting) { m_isPainting = painting; } |
| 240 bool isPainting() const { return m_isPainting; } | 252 bool isPainting() const { return m_isPainting; } |
| 241 #endif | 253 #endif |
| 242 | 254 |
| 243 void didCommitLoad(LocalFrame*); | 255 void didCommitLoad(LocalFrame*); |
| (...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 314 float m_deviceScaleFactor; | 326 float m_deviceScaleFactor; |
| 315 | 327 |
| 316 PageVisibilityState m_visibilityState; | 328 PageVisibilityState m_visibilityState; |
| 317 | 329 |
| 318 bool m_isCursorVisible; | 330 bool m_isCursorVisible; |
| 319 | 331 |
| 320 #if DCHECK_IS_ON() | 332 #if DCHECK_IS_ON() |
| 321 bool m_isPainting = false; | 333 bool m_isPainting = false; |
| 322 #endif | 334 #endif |
| 323 | 335 |
| 336 int m_subframeCount; | |
| 337 | |
| 324 // A pointer to all the interfaces provided to in-process Frames for this | 338 // A pointer to all the interfaces provided to in-process Frames for this |
| 325 // Page. | 339 // Page. |
| 326 // FIXME: Most of the members of Page should move onto FrameHost. | 340 // FIXME: Most of the members of Page should move onto FrameHost. |
| 327 Member<FrameHost> m_frameHost; | 341 Member<FrameHost> m_frameHost; |
| 328 }; | 342 }; |
| 329 | 343 |
| 330 extern template class CORE_EXTERN_TEMPLATE_EXPORT Supplement<Page>; | 344 extern template class CORE_EXTERN_TEMPLATE_EXPORT Supplement<Page>; |
| 331 | 345 |
| 332 } // namespace blink | 346 } // namespace blink |
| 333 | 347 |
| 334 #endif // Page_h | 348 #endif // Page_h |
| OLD | NEW |