Chromium Code Reviews

Side by Side Diff: Source/core/frame/FrameHost.h

Issue 618253002: Revert of Streamline frame detach (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff | | Annotate | Revision Log
« no previous file with comments | « Source/core/frame/FrameClient.h ('k') | Source/core/frame/FrameHost.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2013 Google Inc. All rights reserved. 2 * Copyright (C) 2013 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 64 matching lines...)
75 float deviceScaleFactor() const; 75 float deviceScaleFactor() const;
76 76
77 PinchViewport& pinchViewport() const; 77 PinchViewport& pinchViewport() const;
78 EventHandlerRegistry& eventHandlerRegistry() const; 78 EventHandlerRegistry& eventHandlerRegistry() const;
79 79
80 const AtomicString& overrideEncoding() const { return m_overrideEncoding; } 80 const AtomicString& overrideEncoding() const { return m_overrideEncoding; }
81 void setOverrideEncoding(const AtomicString& encoding) { m_overrideEncoding = encoding; } 81 void setOverrideEncoding(const AtomicString& encoding) { m_overrideEncoding = encoding; }
82 82
83 void trace(Visitor*); 83 void trace(Visitor*);
84 84
85 // Don't allow more than a certain number of frames in a page.
86 // This seems like a reasonable upper bound, and otherwise mutually
87 // recursive frameset pages can quickly bring the program to its knees
88 // with exponential growth in the number of frames.
89 static const int maxNumberOfFrames = 1000;
90 void incrementFrameCount() { ++m_frameCount; }
91 void decrementFrameCount() { ASSERT(m_frameCount); --m_frameCount; }
92 int frameCount() const;
93
94 private: 85 private:
95 explicit FrameHost(Page&); 86 explicit FrameHost(Page&);
96 87
97 RawPtrWillBeMember<Page> m_page; 88 RawPtrWillBeMember<Page> m_page;
98 const OwnPtr<PinchViewport> m_pinchViewport; 89 const OwnPtr<PinchViewport> m_pinchViewport;
99 const OwnPtrWillBeMember<EventHandlerRegistry> m_eventHandlerRegistry; 90 const OwnPtrWillBeMember<EventHandlerRegistry> m_eventHandlerRegistry;
100 91
101 AtomicString m_overrideEncoding; 92 AtomicString m_overrideEncoding;
102 int m_frameCount;
103 }; 93 };
104 94
105 } 95 }
106 96
107 #endif // FrameHost_h 97 #endif // FrameHost_h
OLDNEW
« no previous file with comments | « Source/core/frame/FrameClient.h ('k') | Source/core/frame/FrameHost.cpp » ('j') | no next file with comments »

Powered by Google App Engine