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 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
44 namespace blink { | 44 namespace blink { |
45 | 45 |
46 class ChromeClient; | 46 class ChromeClient; |
47 class ConsoleMessageStorage; | 47 class ConsoleMessageStorage; |
48 class EventHandlerRegistry; | 48 class EventHandlerRegistry; |
49 class Page; | 49 class Page; |
50 class PageScaleConstraintsSet; | 50 class PageScaleConstraintsSet; |
51 class Settings; | 51 class Settings; |
52 class UseCounter; | 52 class UseCounter; |
53 class Visitor; | 53 class Visitor; |
| 54 class WebFrameHostScheduler; |
54 | 55 |
55 // FrameHost is the set of global data shared between multiple frames | 56 // FrameHost is the set of global data shared between multiple frames |
56 // and is provided by the embedder to each frame when created. | 57 // and is provided by the embedder to each frame when created. |
57 // FrameHost currently corresponds to the Page object in core/page | 58 // FrameHost currently corresponds to the Page object in core/page |
58 // however the concept of a Page is moving up out of Blink. | 59 // however the concept of a Page is moving up out of Blink. |
59 // In an out-of-process iframe world, a single Page may have | 60 // In an out-of-process iframe world, a single Page may have |
60 // multiple frames in different process, thus Page becomes a | 61 // multiple frames in different process, thus Page becomes a |
61 // browser-level concept and Blink core/ only knows about its LocalFrame (and Fr
ameHost). | 62 // browser-level concept and Blink core/ only knows about its LocalFrame (and Fr
ameHost). |
62 // Separating Page from the rest of core/ through this indirection | 63 // Separating Page from the rest of core/ through this indirection |
63 // allows us to slowly refactor Page without breaking the rest of core. | 64 // allows us to slowly refactor Page without breaking the rest of core. |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
95 // recursive frameset pages can quickly bring the program to its knees | 96 // recursive frameset pages can quickly bring the program to its knees |
96 // with exponential growth in the number of frames. | 97 // with exponential growth in the number of frames. |
97 static const int maxNumberOfFrames = 1000; | 98 static const int maxNumberOfFrames = 1000; |
98 void incrementSubframeCount() { ++m_subframeCount; } | 99 void incrementSubframeCount() { ++m_subframeCount; } |
99 void decrementSubframeCount() { ASSERT(m_subframeCount); --m_subframeCount;
} | 100 void decrementSubframeCount() { ASSERT(m_subframeCount); --m_subframeCount;
} |
100 int subframeCount() const; | 101 int subframeCount() const; |
101 | 102 |
102 void setDefaultPageScaleLimits(float minScale, float maxScale); | 103 void setDefaultPageScaleLimits(float minScale, float maxScale); |
103 void setUserAgentPageScaleConstraints(PageScaleConstraints newConstraints); | 104 void setUserAgentPageScaleConstraints(PageScaleConstraints newConstraints); |
104 | 105 |
| 106 WebFrameHostScheduler* frameHostScheduler() const { return m_frameHostSchedu
ler.get(); } |
| 107 |
| 108 |
105 private: | 109 private: |
106 explicit FrameHost(Page&); | 110 explicit FrameHost(Page&); |
107 | 111 |
108 RawPtrWillBeMember<Page> m_page; | 112 RawPtrWillBeMember<Page> m_page; |
109 const OwnPtrWillBeMember<TopControls> m_topControls; | 113 const OwnPtrWillBeMember<TopControls> m_topControls; |
110 const OwnPtr<PageScaleConstraintsSet> m_pageScaleConstraintsSet; | 114 const OwnPtr<PageScaleConstraintsSet> m_pageScaleConstraintsSet; |
111 const OwnPtrWillBeMember<VisualViewport> m_visualViewport; | 115 const OwnPtrWillBeMember<VisualViewport> m_visualViewport; |
112 const OwnPtrWillBeMember<EventHandlerRegistry> m_eventHandlerRegistry; | 116 const OwnPtrWillBeMember<EventHandlerRegistry> m_eventHandlerRegistry; |
113 const OwnPtrWillBeMember<ConsoleMessageStorage> m_consoleMessageStorage; | 117 const OwnPtrWillBeMember<ConsoleMessageStorage> m_consoleMessageStorage; |
| 118 const OwnPtrWillBeMember<WebFrameHostScheduler> m_frameHostScheduler; |
114 | 119 |
115 AtomicString m_overrideEncoding; | 120 AtomicString m_overrideEncoding; |
116 int m_subframeCount; | 121 int m_subframeCount; |
117 }; | 122 }; |
118 | 123 |
119 } | 124 } |
120 | 125 |
121 #endif // FrameHost_h | 126 #endif // FrameHost_h |
OLD | NEW |