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 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
43 class ChromeClient; | 43 class ChromeClient; |
44 class ConsoleMessageStorage; | 44 class ConsoleMessageStorage; |
45 class Deprecation; | 45 class Deprecation; |
46 class EventHandlerRegistry; | 46 class EventHandlerRegistry; |
47 class OverscrollController; | 47 class OverscrollController; |
48 class Page; | 48 class Page; |
49 struct PageScaleConstraints; | 49 struct PageScaleConstraints; |
50 class PageScaleConstraintsSet; | 50 class PageScaleConstraintsSet; |
51 class Settings; | 51 class Settings; |
52 class TopControls; | 52 class TopControls; |
| 53 class TopDocumentRootScrollerController; |
53 class UseCounter; | 54 class UseCounter; |
54 class Visitor; | 55 class Visitor; |
55 class VisualViewport; | 56 class VisualViewport; |
56 | 57 |
57 // FrameHost is the set of global data shared between multiple frames | 58 // FrameHost is the set of global data shared between multiple frames |
58 // and is provided by the embedder to each frame when created. | 59 // and is provided by the embedder to each frame when created. |
59 // FrameHost currently corresponds to the Page object in core/page | 60 // FrameHost currently corresponds to the Page object in core/page |
60 // however the concept of a Page is moving up out of Blink. | 61 // however the concept of a Page is moving up out of Blink. |
61 // In an out-of-process iframe world, a single Page may have | 62 // In an out-of-process iframe world, a single Page may have |
62 // multiple frames in different process, thus Page becomes a | 63 // multiple frames in different process, thus Page becomes a |
(...skipping 43 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 ConsoleMessageStorage& consoleMessageStorage(); | 114 ConsoleMessageStorage& consoleMessageStorage(); |
114 const ConsoleMessageStorage& consoleMessageStorage() const; | 115 const ConsoleMessageStorage& consoleMessageStorage() const; |
115 | 116 |
| 117 TopDocumentRootScrollerController& globalRootScrollerController() const; |
| 118 |
116 DECLARE_TRACE(); | 119 DECLARE_TRACE(); |
117 | 120 |
118 // Don't allow more than a certain number of frames in a page. | 121 // Don't allow more than a certain number of frames in a page. |
119 // This seems like a reasonable upper bound, and otherwise mutually | 122 // This seems like a reasonable upper bound, and otherwise mutually |
120 // recursive frameset pages can quickly bring the program to its knees | 123 // recursive frameset pages can quickly bring the program to its knees |
121 // with exponential growth in the number of frames. | 124 // with exponential growth in the number of frames. |
122 static const int maxNumberOfFrames = 1000; | 125 static const int maxNumberOfFrames = 1000; |
123 void incrementSubframeCount() { ++m_subframeCount; } | 126 void incrementSubframeCount() { ++m_subframeCount; } |
124 void decrementSubframeCount() { ASSERT(m_subframeCount); --m_subframeCount;
} | 127 void decrementSubframeCount() { ASSERT(m_subframeCount); --m_subframeCount;
} |
125 int subframeCount() const; | 128 int subframeCount() const; |
126 | 129 |
127 void setDefaultPageScaleLimits(float minScale, float maxScale); | 130 void setDefaultPageScaleLimits(float minScale, float maxScale); |
128 void setUserAgentPageScaleConstraints(const PageScaleConstraints& newConstra
ints); | 131 void setUserAgentPageScaleConstraints(const PageScaleConstraints& newConstra
ints); |
129 | 132 |
130 private: | 133 private: |
131 explicit FrameHost(Page&); | 134 explicit FrameHost(Page&); |
132 | 135 |
133 const Member<Page> m_page; | 136 const Member<Page> m_page; |
134 const Member<TopControls> m_topControls; | 137 const Member<TopControls> m_topControls; |
135 const std::unique_ptr<PageScaleConstraintsSet> m_pageScaleConstraintsSet; | 138 const std::unique_ptr<PageScaleConstraintsSet> m_pageScaleConstraintsSet; |
136 const Member<VisualViewport> m_visualViewport; | 139 const Member<VisualViewport> m_visualViewport; |
137 const Member<OverscrollController> m_overscrollController; | 140 const Member<OverscrollController> m_overscrollController; |
138 const Member<EventHandlerRegistry> m_eventHandlerRegistry; | 141 const Member<EventHandlerRegistry> m_eventHandlerRegistry; |
139 const Member<ConsoleMessageStorage> m_consoleMessageStorage; | 142 const Member<ConsoleMessageStorage> m_consoleMessageStorage; |
| 143 const Member<TopDocumentRootScrollerController> m_globalRootScrollerControll
er; |
140 | 144 |
141 AtomicString m_overrideEncoding; | 145 AtomicString m_overrideEncoding; |
142 int m_subframeCount; | 146 int m_subframeCount; |
143 }; | 147 }; |
144 | 148 |
145 } // namespace blink | 149 } // namespace blink |
146 | 150 |
147 #endif // FrameHost_h | 151 #endif // FrameHost_h |
OLD | NEW |