| 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 24 matching lines...) Expand all Loading... |
| 35 #include "platform/heap/Handle.h" | 35 #include "platform/heap/Handle.h" |
| 36 #include "wtf/Allocator.h" | 36 #include "wtf/Allocator.h" |
| 37 #include "wtf/Noncopyable.h" | 37 #include "wtf/Noncopyable.h" |
| 38 #include "wtf/OwnPtr.h" | 38 #include "wtf/OwnPtr.h" |
| 39 #include "wtf/PassOwnPtr.h" | 39 #include "wtf/PassOwnPtr.h" |
| 40 #include "wtf/text/AtomicString.h" | 40 #include "wtf/text/AtomicString.h" |
| 41 | 41 |
| 42 namespace blink { | 42 namespace blink { |
| 43 | 43 |
| 44 class ChromeClient; | 44 class ChromeClient; |
| 45 class ConsoleMessageStorage; | |
| 46 class CustomElementReactionStack; | 45 class CustomElementReactionStack; |
| 47 class Deprecation; | 46 class Deprecation; |
| 48 class EventHandlerRegistry; | 47 class EventHandlerRegistry; |
| 49 class OverscrollController; | 48 class OverscrollController; |
| 50 class Page; | 49 class Page; |
| 51 struct PageScaleConstraints; | 50 struct PageScaleConstraints; |
| 52 class PageScaleConstraintsSet; | 51 class PageScaleConstraintsSet; |
| 53 class Settings; | 52 class Settings; |
| 54 class TopControls; | 53 class TopControls; |
| 55 class UseCounter; | 54 class UseCounter; |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 108 | 107 |
| 109 PageScaleConstraintsSet& pageScaleConstraintsSet(); | 108 PageScaleConstraintsSet& pageScaleConstraintsSet(); |
| 110 const PageScaleConstraintsSet& pageScaleConstraintsSet() const; | 109 const PageScaleConstraintsSet& pageScaleConstraintsSet() const; |
| 111 | 110 |
| 112 EventHandlerRegistry& eventHandlerRegistry(); | 111 EventHandlerRegistry& eventHandlerRegistry(); |
| 113 const EventHandlerRegistry& eventHandlerRegistry() const; | 112 const EventHandlerRegistry& eventHandlerRegistry() const; |
| 114 | 113 |
| 115 const AtomicString& overrideEncoding() const { return m_overrideEncoding; } | 114 const AtomicString& overrideEncoding() const { return m_overrideEncoding; } |
| 116 void setOverrideEncoding(const AtomicString& encoding) { m_overrideEncoding
= encoding; } | 115 void setOverrideEncoding(const AtomicString& encoding) { m_overrideEncoding
= encoding; } |
| 117 | 116 |
| 118 ConsoleMessageStorage& consoleMessageStorage(); | |
| 119 const ConsoleMessageStorage& consoleMessageStorage() const; | |
| 120 | |
| 121 CustomElementReactionStack& customElementReactionStack(); | 117 CustomElementReactionStack& customElementReactionStack(); |
| 122 const CustomElementReactionStack& customElementReactionStack() const; | 118 const CustomElementReactionStack& customElementReactionStack() const; |
| 123 | 119 |
| 124 DECLARE_TRACE(); | 120 DECLARE_TRACE(); |
| 125 | 121 |
| 126 // Don't allow more than a certain number of frames in a page. | 122 // Don't allow more than a certain number of frames in a page. |
| 127 // This seems like a reasonable upper bound, and otherwise mutually | 123 // This seems like a reasonable upper bound, and otherwise mutually |
| 128 // recursive frameset pages can quickly bring the program to its knees | 124 // recursive frameset pages can quickly bring the program to its knees |
| 129 // with exponential growth in the number of frames. | 125 // with exponential growth in the number of frames. |
| 130 static const int maxNumberOfFrames = 1000; | 126 static const int maxNumberOfFrames = 1000; |
| 131 void incrementSubframeCount() { ++m_subframeCount; } | 127 void incrementSubframeCount() { ++m_subframeCount; } |
| 132 void decrementSubframeCount() { ASSERT(m_subframeCount); --m_subframeCount;
} | 128 void decrementSubframeCount() { ASSERT(m_subframeCount); --m_subframeCount;
} |
| 133 int subframeCount() const; | 129 int subframeCount() const; |
| 134 | 130 |
| 135 void setDefaultPageScaleLimits(float minScale, float maxScale); | 131 void setDefaultPageScaleLimits(float minScale, float maxScale); |
| 136 void setUserAgentPageScaleConstraints(const PageScaleConstraints& newConstra
ints); | 132 void setUserAgentPageScaleConstraints(const PageScaleConstraints& newConstra
ints); |
| 137 | 133 |
| 138 private: | 134 private: |
| 139 explicit FrameHost(Page&); | 135 explicit FrameHost(Page&); |
| 140 | 136 |
| 141 const Member<Page> m_page; | 137 const Member<Page> m_page; |
| 142 const Member<TopControls> m_topControls; | 138 const Member<TopControls> m_topControls; |
| 143 const OwnPtr<PageScaleConstraintsSet> m_pageScaleConstraintsSet; | 139 const OwnPtr<PageScaleConstraintsSet> m_pageScaleConstraintsSet; |
| 144 const Member<VisualViewport> m_visualViewport; | 140 const Member<VisualViewport> m_visualViewport; |
| 145 const Member<OverscrollController> m_overscrollController; | 141 const Member<OverscrollController> m_overscrollController; |
| 146 const Member<EventHandlerRegistry> m_eventHandlerRegistry; | 142 const Member<EventHandlerRegistry> m_eventHandlerRegistry; |
| 147 const Member<ConsoleMessageStorage> m_consoleMessageStorage; | |
| 148 const Member<CustomElementReactionStack> m_customElementReactionStack; | 143 const Member<CustomElementReactionStack> m_customElementReactionStack; |
| 149 | 144 |
| 150 AtomicString m_overrideEncoding; | 145 AtomicString m_overrideEncoding; |
| 151 int m_subframeCount; | 146 int m_subframeCount; |
| 152 }; | 147 }; |
| 153 | 148 |
| 154 } // namespace blink | 149 } // namespace blink |
| 155 | 150 |
| 156 #endif // FrameHost_h | 151 #endif // FrameHost_h |
| OLD | NEW |