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

Side by Side Diff: Source/core/page/Page.h

Issue 618253002: Revert of Streamline frame detach (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 2 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 | Annotate | Revision Log
« no previous file with comments | « Source/core/loader/FrameLoaderClient.h ('k') | Source/core/page/Page.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2013 Apple Inc. All rights reserv ed. 2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2013 Apple Inc. All rights reserv ed.
3 * Copyright (C) 2008 Torch Mobile Inc. All rights reserved. (http://www.torchmo bile.com/) 3 * Copyright (C) 2008 Torch Mobile Inc. All rights reserved. (http://www.torchmo bile.com/)
4 * 4 *
5 * This library is free software; you can redistribute it and/or 5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Library General Public 6 * modify it under the terms of the GNU Library General Public
7 * License as published by the Free Software Foundation; either 7 * License as published by the Free Software Foundation; either
8 * version 2 of the License, or (at your option) any later version. 8 * version 2 of the License, or (at your option) any later version.
9 * 9 *
10 * This library is distributed in the hope that it will be useful, 10 * This library is distributed in the hope that it will be useful,
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after
127 // depends on this will generally have to be rewritten to propagate any 127 // depends on this will generally have to be rewritten to propagate any
128 // necessary state through all renderer processes for that page and/or 128 // necessary state through all renderer processes for that page and/or
129 // coordinate/rely on the browser process to help dispatch/coordinate work. 129 // coordinate/rely on the browser process to help dispatch/coordinate work.
130 LocalFrame* deprecatedLocalMainFrame() const { return toLocalFrame(m_mainFra me); } 130 LocalFrame* deprecatedLocalMainFrame() const { return toLocalFrame(m_mainFra me); }
131 131
132 void documentDetached(Document*); 132 void documentDetached(Document*);
133 133
134 bool openedByDOM() const; 134 bool openedByDOM() const;
135 void setOpenedByDOM(); 135 void setOpenedByDOM();
136 136
137 void incrementSubframeCount() { ++m_subframeCount; }
138 void decrementSubframeCount() { ASSERT(m_subframeCount); --m_subframeCount; }
139 int subframeCount() const { checkSubframeCountConsistency(); return m_subfra meCount; }
140
137 PageAnimator& animator() { return m_animator; } 141 PageAnimator& animator() { return m_animator; }
138 Chrome& chrome() const { return *m_chrome; } 142 Chrome& chrome() const { return *m_chrome; }
139 AutoscrollController& autoscrollController() const { return *m_autoscrollCon troller; } 143 AutoscrollController& autoscrollController() const { return *m_autoscrollCon troller; }
140 DragCaretController& dragCaretController() const { return *m_dragCaretContro ller; } 144 DragCaretController& dragCaretController() const { return *m_dragCaretContro ller; }
141 DragController& dragController() const { return *m_dragController; } 145 DragController& dragController() const { return *m_dragController; }
142 FocusController& focusController() const { return *m_focusController; } 146 FocusController& focusController() const { return *m_focusController; }
143 ContextMenuController& contextMenuController() const { return *m_contextMenu Controller; } 147 ContextMenuController& contextMenuController() const { return *m_contextMenu Controller; }
144 InspectorController& inspectorController() const { return *m_inspectorContro ller; } 148 InspectorController& inspectorController() const { return *m_inspectorContro ller; }
145 PointerLockController& pointerLockController() const { return *m_pointerLock Controller; } 149 PointerLockController& pointerLockController() const { return *m_pointerLock Controller; }
146 ValidationMessageClient& validationMessageClient() const { return *m_validat ionMessageClient; } 150 ValidationMessageClient& validationMessageClient() const { return *m_validat ionMessageClient; }
(...skipping 27 matching lines...) Expand all
174 void setDeviceScaleFactor(float); 178 void setDeviceScaleFactor(float);
175 void setDeviceColorProfile(const Vector<char>&); 179 void setDeviceColorProfile(const Vector<char>&);
176 void resetDeviceColorProfile(); 180 void resetDeviceColorProfile();
177 181
178 static void allVisitedStateChanged(); 182 static void allVisitedStateChanged();
179 static void visitedStateChanged(LinkHash visitedHash); 183 static void visitedStateChanged(LinkHash visitedHash);
180 184
181 StorageNamespace* sessionStorage(bool optionalCreate = true); 185 StorageNamespace* sessionStorage(bool optionalCreate = true);
182 StorageClient& storageClient() const { return *m_storageClient; } 186 StorageClient& storageClient() const { return *m_storageClient; }
183 187
188 // Don't allow more than a certain number of frames in a page.
189 // This seems like a reasonable upper bound, and otherwise mutually
190 // recursive frameset pages can quickly bring the program to its knees
191 // with exponential growth in the number of frames.
192 static const int maxNumberOfFrames = 1000;
193
184 PageVisibilityState visibilityState() const; 194 PageVisibilityState visibilityState() const;
185 void setVisibilityState(PageVisibilityState, bool); 195 void setVisibilityState(PageVisibilityState, bool);
186 196
187 bool isCursorVisible() const; 197 bool isCursorVisible() const;
188 void setIsCursorVisible(bool isVisible) { m_isCursorVisible = isVisible; } 198 void setIsCursorVisible(bool isVisible) { m_isCursorVisible = isVisible; }
189 199
190 #if ENABLE(ASSERT) 200 #if ENABLE(ASSERT)
191 void setIsPainting(bool painting) { m_isPainting = painting; } 201 void setIsPainting(bool painting) { m_isPainting = painting; }
192 bool isPainting() const { return m_isPainting; } 202 bool isPainting() const { return m_isPainting; }
193 #endif 203 #endif
(...skipping 17 matching lines...) Expand all
211 221
212 void trace(Visitor*); 222 void trace(Visitor*);
213 void willBeDestroyed(); 223 void willBeDestroyed();
214 224
215 protected: 225 protected:
216 PageLifecycleNotifier& lifecycleNotifier(); 226 PageLifecycleNotifier& lifecycleNotifier();
217 227
218 private: 228 private:
219 void initGroup(); 229 void initGroup();
220 230
231 #if ENABLE(ASSERT)
232 void checkSubframeCountConsistency() const;
233 #else
234 void checkSubframeCountConsistency() const { }
235 #endif
236
221 void setTimerAlignmentInterval(double); 237 void setTimerAlignmentInterval(double);
222 238
223 void setNeedsLayoutInAllFrames(); 239 void setNeedsLayoutInAllFrames();
224 240
225 // SettingsDelegate overrides. 241 // SettingsDelegate overrides.
226 virtual void settingsChanged(SettingsDelegate::ChangeType) OVERRIDE; 242 virtual void settingsChanged(SettingsDelegate::ChangeType) OVERRIDE;
227 243
228 PageAnimator m_animator; 244 PageAnimator m_animator;
229 const OwnPtr<AutoscrollController> m_autoscrollController; 245 const OwnPtr<AutoscrollController> m_autoscrollController;
230 const OwnPtr<Chrome> m_chrome; 246 const OwnPtr<Chrome> m_chrome;
(...skipping 23 matching lines...) Expand all
254 mutable RefPtr<PluginData> m_pluginData; 270 mutable RefPtr<PluginData> m_pluginData;
255 271
256 BackForwardClient* m_backForwardClient; 272 BackForwardClient* m_backForwardClient;
257 EditorClient* const m_editorClient; 273 EditorClient* const m_editorClient;
258 SpellCheckerClient* const m_spellCheckerClient; 274 SpellCheckerClient* const m_spellCheckerClient;
259 StorageClient* m_storageClient; 275 StorageClient* m_storageClient;
260 OwnPtrWillBeMember<ValidationMessageClient> m_validationMessageClient; 276 OwnPtrWillBeMember<ValidationMessageClient> m_validationMessageClient;
261 277
262 UseCounter m_useCounter; 278 UseCounter m_useCounter;
263 279
280 int m_subframeCount;
264 bool m_openedByDOM; 281 bool m_openedByDOM;
265 282
266 bool m_tabKeyCyclesThroughElements; 283 bool m_tabKeyCyclesThroughElements;
267 bool m_defersLoading; 284 bool m_defersLoading;
268 285
269 float m_deviceScaleFactor; 286 float m_deviceScaleFactor;
270 287
271 OwnPtr<StorageNamespace> m_sessionStorage; 288 OwnPtr<StorageNamespace> m_sessionStorage;
272 289
273 double m_timerAlignmentInterval; 290 double m_timerAlignmentInterval;
274 291
275 PageVisibilityState m_visibilityState; 292 PageVisibilityState m_visibilityState;
276 293
277 bool m_isCursorVisible; 294 bool m_isCursorVisible;
278 295
279 #if ENABLE(ASSERT) 296 #if ENABLE(ASSERT)
280 bool m_isPainting; 297 bool m_isPainting;
281 #endif 298 #endif
282 299
283 WillBeHeapHashSet<RawPtrWillBeWeakMember<MultisamplingChangedObserver> > m_m ultisamplingChangedObservers; 300 WillBeHeapHashSet<RawPtrWillBeWeakMember<MultisamplingChangedObserver> > m_m ultisamplingChangedObservers;
284 301
285 // A pointer to all the interfaces provided to in-process Frames for this Pa ge. 302 // A pointer to all the interfaces provided to in-process Frames for this Pa ge.
286 // FIXME: Most of the members of Page should move onto FrameHost. 303 // FIXME: Most of the members of Page should move onto FrameHost.
287 OwnPtrWillBeMember<FrameHost> m_frameHost; 304 OwnPtrWillBeMember<FrameHost> m_frameHost;
288 }; 305 };
289 306
290 } // namespace blink 307 } // namespace blink
291 308
292 #endif // Page_h 309 #endif // Page_h
OLDNEW
« no previous file with comments | « Source/core/loader/FrameLoaderClient.h ('k') | Source/core/page/Page.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698