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

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

Issue 2739033003: 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 217 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
238 void setDefaultPageScaleLimits(float minScale, float maxScale); 250 void setDefaultPageScaleLimits(float minScale, float maxScale);
239 void setUserAgentPageScaleConstraints( 251 void setUserAgentPageScaleConstraints(
240 const PageScaleConstraints& newConstraints); 252 const PageScaleConstraints& newConstraints);
241 253
242 #if DCHECK_IS_ON() 254 #if DCHECK_IS_ON()
243 void setIsPainting(bool painting) { m_isPainting = painting; } 255 void setIsPainting(bool painting) { m_isPainting = painting; }
244 bool isPainting() const { return m_isPainting; } 256 bool isPainting() const { return m_isPainting; }
245 #endif 257 #endif
246 258
247 void didCommitLoad(LocalFrame*); 259 void didCommitLoad(LocalFrame*);
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
319 float m_deviceScaleFactor; 331 float m_deviceScaleFactor;
320 332
321 PageVisibilityState m_visibilityState; 333 PageVisibilityState m_visibilityState;
322 334
323 bool m_isCursorVisible; 335 bool m_isCursorVisible;
324 336
325 #if DCHECK_IS_ON() 337 #if DCHECK_IS_ON()
326 bool m_isPainting = false; 338 bool m_isPainting = false;
327 #endif 339 #endif
328 340
341 int m_subframeCount;
342
329 // A pointer to all the interfaces provided to in-process Frames for this 343 // A pointer to all the interfaces provided to in-process Frames for this
330 // Page. 344 // Page.
331 // FIXME: Most of the members of Page should move onto FrameHost. 345 // FIXME: Most of the members of Page should move onto FrameHost.
332 Member<FrameHost> m_frameHost; 346 Member<FrameHost> m_frameHost;
333 }; 347 };
334 348
335 extern template class CORE_EXTERN_TEMPLATE_EXPORT Supplement<Page>; 349 extern template class CORE_EXTERN_TEMPLATE_EXPORT Supplement<Page>;
336 350
337 } // namespace blink 351 } // namespace blink
338 352
339 #endif // Page_h 353 #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