Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(278)

Side by Side Diff: third_party/WebKit/Source/core/page/Page.h

Issue 2752543003: Move FrameHost::m_subframeCount to Page (Closed)
Patch Set: Rebase Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 232 matching lines...) Expand 10 before | Expand all | Expand 10 after
243 static void allVisitedStateChanged(bool invalidateVisitedLinkHashes); 243 static void allVisitedStateChanged(bool invalidateVisitedLinkHashes);
244 static void visitedStateChanged(LinkHash visitedHash); 244 static void visitedStateChanged(LinkHash visitedHash);
245 245
246 void setVisibilityState(PageVisibilityState, bool); 246 void setVisibilityState(PageVisibilityState, bool);
247 PageVisibilityState visibilityState() const; 247 PageVisibilityState visibilityState() const;
248 bool isPageVisible() const; 248 bool isPageVisible() const;
249 249
250 bool isCursorVisible() const; 250 bool isCursorVisible() const;
251 void setIsCursorVisible(bool isVisible) { m_isCursorVisible = isVisible; } 251 void setIsCursorVisible(bool isVisible) { m_isCursorVisible = isVisible; }
252 252
253 // Don't allow more than a certain number of frames in a page.
254 // This seems like a reasonable upper bound, and otherwise mutually
255 // recursive frameset pages can quickly bring the program to its knees
256 // with exponential growth in the number of frames.
257 static const int maxNumberOfFrames = 1000;
258 void incrementSubframeCount() { ++m_subframeCount; }
259 void decrementSubframeCount() {
260 DCHECK_GT(m_subframeCount, 0);
261 --m_subframeCount;
262 }
263 int subframeCount() const;
264
253 void setDefaultPageScaleLimits(float minScale, float maxScale); 265 void setDefaultPageScaleLimits(float minScale, float maxScale);
254 void setUserAgentPageScaleConstraints( 266 void setUserAgentPageScaleConstraints(
255 const PageScaleConstraints& newConstraints); 267 const PageScaleConstraints& newConstraints);
256 268
257 #if DCHECK_IS_ON() 269 #if DCHECK_IS_ON()
258 void setIsPainting(bool painting) { m_isPainting = painting; } 270 void setIsPainting(bool painting) { m_isPainting = painting; }
259 bool isPainting() const { return m_isPainting; } 271 bool isPainting() const { return m_isPainting; }
260 #endif 272 #endif
261 273
262 void didCommitLoad(LocalFrame*); 274 void didCommitLoad(LocalFrame*);
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
339 float m_deviceScaleFactor; 351 float m_deviceScaleFactor;
340 352
341 PageVisibilityState m_visibilityState; 353 PageVisibilityState m_visibilityState;
342 354
343 bool m_isCursorVisible; 355 bool m_isCursorVisible;
344 356
345 #if DCHECK_IS_ON() 357 #if DCHECK_IS_ON()
346 bool m_isPainting = false; 358 bool m_isPainting = false;
347 #endif 359 #endif
348 360
361 int m_subframeCount;
362
349 // A pointer to all the interfaces provided to in-process Frames for this 363 // A pointer to all the interfaces provided to in-process Frames for this
350 // Page. 364 // Page.
351 // FIXME: Most of the members of Page should move onto FrameHost. 365 // FIXME: Most of the members of Page should move onto FrameHost.
352 Member<FrameHost> m_frameHost; 366 Member<FrameHost> m_frameHost;
353 }; 367 };
354 368
355 extern template class CORE_EXTERN_TEMPLATE_EXPORT Supplement<Page>; 369 extern template class CORE_EXTERN_TEMPLATE_EXPORT Supplement<Page>;
356 370
357 } // namespace blink 371 } // namespace blink
358 372
359 #endif // Page_h 373 #endif // Page_h
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/html/HTMLFrameOwnerElement.cpp ('k') | third_party/WebKit/Source/core/page/Page.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698