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

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

Issue 551973005: 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
141 PageAnimator& animator() { return m_animator; } 137 PageAnimator& animator() { return m_animator; }
142 Chrome& chrome() const { return *m_chrome; } 138 Chrome& chrome() const { return *m_chrome; }
143 AutoscrollController& autoscrollController() const { return *m_autoscrollCon troller; } 139 AutoscrollController& autoscrollController() const { return *m_autoscrollCon troller; }
144 DragCaretController& dragCaretController() const { return *m_dragCaretContro ller; } 140 DragCaretController& dragCaretController() const { return *m_dragCaretContro ller; }
145 DragController& dragController() const { return *m_dragController; } 141 DragController& dragController() const { return *m_dragController; }
146 FocusController& focusController() const { return *m_focusController; } 142 FocusController& focusController() const { return *m_focusController; }
147 ContextMenuController& contextMenuController() const { return *m_contextMenu Controller; } 143 ContextMenuController& contextMenuController() const { return *m_contextMenu Controller; }
148 InspectorController& inspectorController() const { return *m_inspectorContro ller; } 144 InspectorController& inspectorController() const { return *m_inspectorContro ller; }
149 PointerLockController& pointerLockController() const { return *m_pointerLock Controller; } 145 PointerLockController& pointerLockController() const { return *m_pointerLock Controller; }
150 ValidationMessageClient& validationMessageClient() const { return *m_validat ionMessageClient; } 146 ValidationMessageClient& validationMessageClient() const { return *m_validat ionMessageClient; }
(...skipping 27 matching lines...) Expand all
178 void setDeviceScaleFactor(float); 174 void setDeviceScaleFactor(float);
179 void setDeviceColorProfile(const Vector<char>&); 175 void setDeviceColorProfile(const Vector<char>&);
180 void resetDeviceColorProfile(); 176 void resetDeviceColorProfile();
181 177
182 static void allVisitedStateChanged(); 178 static void allVisitedStateChanged();
183 static void visitedStateChanged(LinkHash visitedHash); 179 static void visitedStateChanged(LinkHash visitedHash);
184 180
185 StorageNamespace* sessionStorage(bool optionalCreate = true); 181 StorageNamespace* sessionStorage(bool optionalCreate = true);
186 StorageClient& storageClient() const { return *m_storageClient; } 182 StorageClient& storageClient() const { return *m_storageClient; }
187 183
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
194 PageVisibilityState visibilityState() const; 184 PageVisibilityState visibilityState() const;
195 void setVisibilityState(PageVisibilityState, bool); 185 void setVisibilityState(PageVisibilityState, bool);
196 186
197 bool isCursorVisible() const; 187 bool isCursorVisible() const;
198 void setIsCursorVisible(bool isVisible) { m_isCursorVisible = isVisible; } 188 void setIsCursorVisible(bool isVisible) { m_isCursorVisible = isVisible; }
199 189
200 #if ENABLE(ASSERT) 190 #if ENABLE(ASSERT)
201 void setIsPainting(bool painting) { m_isPainting = painting; } 191 void setIsPainting(bool painting) { m_isPainting = painting; }
202 bool isPainting() const { return m_isPainting; } 192 bool isPainting() const { return m_isPainting; }
203 #endif 193 #endif
(...skipping 17 matching lines...) Expand all
221 211
222 void trace(Visitor*); 212 void trace(Visitor*);
223 void willBeDestroyed(); 213 void willBeDestroyed();
224 214
225 protected: 215 protected:
226 PageLifecycleNotifier& lifecycleNotifier(); 216 PageLifecycleNotifier& lifecycleNotifier();
227 217
228 private: 218 private:
229 void initGroup(); 219 void initGroup();
230 220
231 #if ENABLE(ASSERT)
232 void checkSubframeCountConsistency() const;
233 #else
234 void checkSubframeCountConsistency() const { }
235 #endif
236
237 void setTimerAlignmentInterval(double); 221 void setTimerAlignmentInterval(double);
238 222
239 void setNeedsLayoutInAllFrames(); 223 void setNeedsLayoutInAllFrames();
240 224
241 // SettingsDelegate overrides. 225 // SettingsDelegate overrides.
242 virtual void settingsChanged(SettingsDelegate::ChangeType) OVERRIDE; 226 virtual void settingsChanged(SettingsDelegate::ChangeType) OVERRIDE;
243 227
244 PageAnimator m_animator; 228 PageAnimator m_animator;
245 const OwnPtr<AutoscrollController> m_autoscrollController; 229 const OwnPtr<AutoscrollController> m_autoscrollController;
246 const OwnPtr<Chrome> m_chrome; 230 const OwnPtr<Chrome> m_chrome;
(...skipping 23 matching lines...) Expand all
270 mutable RefPtr<PluginData> m_pluginData; 254 mutable RefPtr<PluginData> m_pluginData;
271 255
272 BackForwardClient* m_backForwardClient; 256 BackForwardClient* m_backForwardClient;
273 EditorClient* const m_editorClient; 257 EditorClient* const m_editorClient;
274 SpellCheckerClient* const m_spellCheckerClient; 258 SpellCheckerClient* const m_spellCheckerClient;
275 StorageClient* m_storageClient; 259 StorageClient* m_storageClient;
276 OwnPtrWillBeMember<ValidationMessageClient> m_validationMessageClient; 260 OwnPtrWillBeMember<ValidationMessageClient> m_validationMessageClient;
277 261
278 UseCounter m_useCounter; 262 UseCounter m_useCounter;
279 263
280 int m_subframeCount;
281 bool m_openedByDOM; 264 bool m_openedByDOM;
282 265
283 bool m_tabKeyCyclesThroughElements; 266 bool m_tabKeyCyclesThroughElements;
284 bool m_defersLoading; 267 bool m_defersLoading;
285 268
286 float m_deviceScaleFactor; 269 float m_deviceScaleFactor;
287 270
288 OwnPtr<StorageNamespace> m_sessionStorage; 271 OwnPtr<StorageNamespace> m_sessionStorage;
289 272
290 double m_timerAlignmentInterval; 273 double m_timerAlignmentInterval;
291 274
292 PageVisibilityState m_visibilityState; 275 PageVisibilityState m_visibilityState;
293 276
294 bool m_isCursorVisible; 277 bool m_isCursorVisible;
295 278
296 #if ENABLE(ASSERT) 279 #if ENABLE(ASSERT)
297 bool m_isPainting; 280 bool m_isPainting;
298 #endif 281 #endif
299 282
300 WillBeHeapHashSet<RawPtrWillBeWeakMember<MultisamplingChangedObserver> > m_m ultisamplingChangedObservers; 283 WillBeHeapHashSet<RawPtrWillBeWeakMember<MultisamplingChangedObserver> > m_m ultisamplingChangedObservers;
301 284
302 // A pointer to all the interfaces provided to in-process Frames for this Pa ge. 285 // A pointer to all the interfaces provided to in-process Frames for this Pa ge.
303 // FIXME: Most of the members of Page should move onto FrameHost. 286 // FIXME: Most of the members of Page should move onto FrameHost.
304 OwnPtrWillBeMember<FrameHost> m_frameHost; 287 OwnPtrWillBeMember<FrameHost> m_frameHost;
305 }; 288 };
306 289
307 } // namespace blink 290 } // namespace blink
308 291
309 #endif // Page_h 292 #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