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 26 matching lines...) Expand all Loading... |
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 ConsoleMessageStorage; |
45 class CustomElementReactionStack; | 45 class CustomElementReactionStack; |
46 class Deprecation; | 46 class Deprecation; |
| 47 class DoublePoint; |
47 class EventHandlerRegistry; | 48 class EventHandlerRegistry; |
| 49 class IntPoint; |
48 class OverscrollController; | 50 class OverscrollController; |
49 class Page; | 51 class Page; |
50 struct PageScaleConstraints; | 52 struct PageScaleConstraints; |
51 class PageScaleConstraintsSet; | 53 class PageScaleConstraintsSet; |
| 54 class ScrollAndScaleEmulator; |
52 class Settings; | 55 class Settings; |
53 class TopControls; | 56 class TopControls; |
54 class UseCounter; | 57 class UseCounter; |
55 class Visitor; | 58 class Visitor; |
56 class VisualViewport; | 59 class VisualViewport; |
57 | 60 |
58 // FrameHost is the set of global data shared between multiple frames | 61 // FrameHost is the set of global data shared between multiple frames |
59 // and is provided by the embedder to each frame when created. | 62 // and is provided by the embedder to each frame when created. |
60 // FrameHost currently corresponds to the Page object in core/page | 63 // FrameHost currently corresponds to the Page object in core/page |
61 // however the concept of a Page is moving up out of Blink. | 64 // however the concept of a Page is moving up out of Blink. |
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
127 // recursive frameset pages can quickly bring the program to its knees | 130 // recursive frameset pages can quickly bring the program to its knees |
128 // with exponential growth in the number of frames. | 131 // with exponential growth in the number of frames. |
129 static const int maxNumberOfFrames = 1000; | 132 static const int maxNumberOfFrames = 1000; |
130 void incrementSubframeCount() { ++m_subframeCount; } | 133 void incrementSubframeCount() { ++m_subframeCount; } |
131 void decrementSubframeCount() { ASSERT(m_subframeCount); --m_subframeCount;
} | 134 void decrementSubframeCount() { ASSERT(m_subframeCount); --m_subframeCount;
} |
132 int subframeCount() const; | 135 int subframeCount() const; |
133 | 136 |
134 void setDefaultPageScaleLimits(float minScale, float maxScale); | 137 void setDefaultPageScaleLimits(float minScale, float maxScale); |
135 void setUserAgentPageScaleConstraints(const PageScaleConstraints& newConstra
ints); | 138 void setUserAgentPageScaleConstraints(const PageScaleConstraints& newConstra
ints); |
136 | 139 |
| 140 // Override the page scale and scroll positions of main frame and visual vie
wport. |
| 141 void setScrollAndScaleOverride(const IntPoint& framePosition, const DoublePo
int& visualViewportPosition, float pageScale); |
| 142 void clearScrollAndScaleOverride(); |
| 143 ScrollAndScaleEmulator* scrollAndScaleEmulator() { return m_scrollAndScaleEm
ulator; } |
| 144 |
137 private: | 145 private: |
138 explicit FrameHost(Page&); | 146 explicit FrameHost(Page&); |
139 | 147 |
140 const Member<Page> m_page; | 148 const Member<Page> m_page; |
141 const Member<TopControls> m_topControls; | 149 const Member<TopControls> m_topControls; |
142 const std::unique_ptr<PageScaleConstraintsSet> m_pageScaleConstraintsSet; | 150 const std::unique_ptr<PageScaleConstraintsSet> m_pageScaleConstraintsSet; |
143 const Member<VisualViewport> m_visualViewport; | 151 const Member<VisualViewport> m_visualViewport; |
144 const Member<OverscrollController> m_overscrollController; | 152 const Member<OverscrollController> m_overscrollController; |
145 const Member<EventHandlerRegistry> m_eventHandlerRegistry; | 153 const Member<EventHandlerRegistry> m_eventHandlerRegistry; |
146 const Member<ConsoleMessageStorage> m_consoleMessageStorage; | 154 const Member<ConsoleMessageStorage> m_consoleMessageStorage; |
147 const Member<CustomElementReactionStack> m_customElementReactionStack; | 155 const Member<CustomElementReactionStack> m_customElementReactionStack; |
| 156 Member<ScrollAndScaleEmulator> m_scrollAndScaleEmulator; |
148 | 157 |
149 AtomicString m_overrideEncoding; | 158 AtomicString m_overrideEncoding; |
150 int m_subframeCount; | 159 int m_subframeCount; |
151 }; | 160 }; |
152 | 161 |
153 } // namespace blink | 162 } // namespace blink |
154 | 163 |
155 #endif // FrameHost_h | 164 #endif // FrameHost_h |
OLD | NEW |