| OLD | NEW |
| 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 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 72 // Corresponds to pixel density of the device where this Page is | 72 // Corresponds to pixel density of the device where this Page is |
| 73 // being displayed. In multi-monitor setups this can vary between pages. | 73 // being displayed. In multi-monitor setups this can vary between pages. |
| 74 // This value does not account for Page zoom, use LocalFrame::devicePixelRat
io instead. | 74 // This value does not account for Page zoom, use LocalFrame::devicePixelRat
io instead. |
| 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 void trace(Visitor*); | 80 void trace(Visitor*); |
| 81 | 81 |
| 82 // Don't allow more than a certain number of frames in a page. |
| 83 // This seems like a reasonable upper bound, and otherwise mutually |
| 84 // recursive frameset pages can quickly bring the program to its knees |
| 85 // with exponential growth in the number of frames. |
| 86 static const int maxNumberOfFrames = 1000; |
| 87 void incrementFrameCount() { ++m_frameCount; } |
| 88 void decrementFrameCount() { ASSERT(m_frameCount); --m_frameCount; } |
| 89 int frameCount() const; |
| 90 |
| 82 private: | 91 private: |
| 83 explicit FrameHost(Page&); | 92 explicit FrameHost(Page&); |
| 84 | 93 |
| 85 RawPtrWillBeMember<Page> m_page; | 94 RawPtrWillBeMember<Page> m_page; |
| 86 const OwnPtr<PinchViewport> m_pinchViewport; | 95 const OwnPtr<PinchViewport> m_pinchViewport; |
| 87 const OwnPtrWillBeMember<EventHandlerRegistry> m_eventHandlerRegistry; | 96 const OwnPtrWillBeMember<EventHandlerRegistry> m_eventHandlerRegistry; |
| 97 int m_frameCount; |
| 88 }; | 98 }; |
| 89 | 99 |
| 90 } | 100 } |
| 91 | 101 |
| 92 #endif // FrameHost_h | 102 #endif // FrameHost_h |
| OLD | NEW |