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