Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(133)

Side by Side Diff: third_party/WebKit/Source/core/frame/FrameHost.h

Issue 2285253003: Move TopDocumentRootScrollerController to a separate object on FrameHost (Closed)
Patch Set: None Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
116 ConsoleMessageStorage& consoleMessageStorage(); 117 ConsoleMessageStorage& consoleMessageStorage();
117 const ConsoleMessageStorage& consoleMessageStorage() const; 118 const ConsoleMessageStorage& consoleMessageStorage() const;
118 119
120 TopDocumentRootScrollerController& globalRootScrollerController() const;
121
119 DECLARE_TRACE(); 122 DECLARE_TRACE();
120 123
121 // Don't allow more than a certain number of frames in a page. 124 // Don't allow more than a certain number of frames in a page.
122 // This seems like a reasonable upper bound, and otherwise mutually 125 // This seems like a reasonable upper bound, and otherwise mutually
123 // recursive frameset pages can quickly bring the program to its knees 126 // recursive frameset pages can quickly bring the program to its knees
124 // with exponential growth in the number of frames. 127 // with exponential growth in the number of frames.
125 static const int maxNumberOfFrames = 1000; 128 static const int maxNumberOfFrames = 1000;
126 void incrementSubframeCount() { ++m_subframeCount; } 129 void incrementSubframeCount() { ++m_subframeCount; }
127 void decrementSubframeCount() { ASSERT(m_subframeCount); --m_subframeCount; } 130 void decrementSubframeCount() { ASSERT(m_subframeCount); --m_subframeCount; }
128 int subframeCount() const; 131 int subframeCount() const;
129 132
130 void setDefaultPageScaleLimits(float minScale, float maxScale); 133 void setDefaultPageScaleLimits(float minScale, float maxScale);
131 void setUserAgentPageScaleConstraints(const PageScaleConstraints& newConstra ints); 134 void setUserAgentPageScaleConstraints(const PageScaleConstraints& newConstra ints);
132 135
133 private: 136 private:
134 explicit FrameHost(Page&); 137 explicit FrameHost(Page&);
135 138
136 const Member<Page> m_page; 139 const Member<Page> m_page;
137 const Member<TopControls> m_topControls; 140 const Member<TopControls> m_topControls;
138 const std::unique_ptr<PageScaleConstraintsSet> m_pageScaleConstraintsSet; 141 const std::unique_ptr<PageScaleConstraintsSet> m_pageScaleConstraintsSet;
139 const Member<VisualViewport> m_visualViewport; 142 const Member<VisualViewport> m_visualViewport;
140 const Member<OverscrollController> m_overscrollController; 143 const Member<OverscrollController> m_overscrollController;
141 const Member<EventHandlerRegistry> m_eventHandlerRegistry; 144 const Member<EventHandlerRegistry> m_eventHandlerRegistry;
142 const Member<ConsoleMessageStorage> m_consoleMessageStorage; 145 const Member<ConsoleMessageStorage> m_consoleMessageStorage;
146 Member<TopDocumentRootScrollerController> m_globalRootScrollerController;
tdresser 2016/08/30 15:05:30 Should this be const?
bokan 2016/08/30 16:13:39 Done.
143 147
144 AtomicString m_overrideEncoding; 148 AtomicString m_overrideEncoding;
145 int m_subframeCount; 149 int m_subframeCount;
146 }; 150 };
147 151
148 } // namespace blink 152 } // namespace blink
149 153
150 #endif // FrameHost_h 154 #endif // FrameHost_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698