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

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

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/page/Page.h ('k') | Source/web/FrameLoaderClientImpl.h » ('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, 2011, 2012, 2013 Apple Inc. All R ights Reserved. 2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 Apple Inc. All R ights Reserved.
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 * This library is distributed in the hope that it will be useful, 9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after
121 , m_focusController(FocusController::create(this)) 121 , m_focusController(FocusController::create(this))
122 , m_contextMenuController(ContextMenuController::create(this, pageClients.co ntextMenuClient)) 122 , m_contextMenuController(ContextMenuController::create(this, pageClients.co ntextMenuClient))
123 , m_inspectorController(InspectorController::create(this, pageClients.inspec torClient)) 123 , m_inspectorController(InspectorController::create(this, pageClients.inspec torClient))
124 , m_pointerLockController(PointerLockController::create(this)) 124 , m_pointerLockController(PointerLockController::create(this))
125 , m_undoStack(UndoStack::create()) 125 , m_undoStack(UndoStack::create())
126 , m_mainFrame(nullptr) 126 , m_mainFrame(nullptr)
127 , m_backForwardClient(pageClients.backForwardClient) 127 , m_backForwardClient(pageClients.backForwardClient)
128 , m_editorClient(pageClients.editorClient) 128 , m_editorClient(pageClients.editorClient)
129 , m_spellCheckerClient(pageClients.spellCheckerClient) 129 , m_spellCheckerClient(pageClients.spellCheckerClient)
130 , m_storageClient(pageClients.storageClient) 130 , m_storageClient(pageClients.storageClient)
131 , m_subframeCount(0)
132 , m_openedByDOM(false) 131 , m_openedByDOM(false)
133 , m_tabKeyCyclesThroughElements(true) 132 , m_tabKeyCyclesThroughElements(true)
134 , m_defersLoading(false) 133 , m_defersLoading(false)
135 , m_deviceScaleFactor(1) 134 , m_deviceScaleFactor(1)
136 , m_timerAlignmentInterval(DOMTimer::visiblePageAlignmentInterval()) 135 , m_timerAlignmentInterval(DOMTimer::visiblePageAlignmentInterval())
137 , m_visibilityState(PageVisibilityStateVisible) 136 , m_visibilityState(PageVisibilityStateVisible)
138 , m_isCursorVisible(true) 137 , m_isCursorVisible(true)
139 #if ENABLE(ASSERT) 138 #if ENABLE(ASSERT)
140 , m_isPainting(false) 139 , m_isPainting(false)
141 #endif 140 #endif
(...skipping 292 matching lines...) Expand 10 before | Expand all | Expand 10 after
434 if (frame->isLocalFrame() && toLocalFrame(frame)->document()) 433 if (frame->isLocalFrame() && toLocalFrame(frame)->document())
435 toLocalFrame(frame)->document()->didChangeTimerAlignmentInterval(); 434 toLocalFrame(frame)->document()->didChangeTimerAlignmentInterval();
436 } 435 }
437 } 436 }
438 437
439 double Page::timerAlignmentInterval() const 438 double Page::timerAlignmentInterval() const
440 { 439 {
441 return m_timerAlignmentInterval; 440 return m_timerAlignmentInterval;
442 } 441 }
443 442
444 #if ENABLE(ASSERT)
445 void Page::checkSubframeCountConsistency() const
446 {
447 ASSERT(m_subframeCount >= 0);
448
449 int subframeCount = 0;
450 for (Frame* frame = mainFrame(); frame; frame = frame->tree().traverseNext() )
451 ++subframeCount;
452
453 ASSERT(m_subframeCount + 1 == subframeCount);
454 }
455 #endif
456
457 void Page::setVisibilityState(PageVisibilityState visibilityState, bool isInitia lState) 443 void Page::setVisibilityState(PageVisibilityState visibilityState, bool isInitia lState)
458 { 444 {
459 if (m_visibilityState == visibilityState) 445 if (m_visibilityState == visibilityState)
460 return; 446 return;
461 m_visibilityState = visibilityState; 447 m_visibilityState = visibilityState;
462 448
463 if (visibilityState == blink::PageVisibilityStateVisible) 449 if (visibilityState == blink::PageVisibilityStateVisible)
464 setTimerAlignmentInterval(DOMTimer::visiblePageAlignmentInterval()); 450 setTimerAlignmentInterval(DOMTimer::visiblePageAlignmentInterval());
465 else 451 else
466 setTimerAlignmentInterval(DOMTimer::hiddenPageAlignmentInterval()); 452 setTimerAlignmentInterval(DOMTimer::hiddenPageAlignmentInterval());
(...skipping 198 matching lines...) Expand 10 before | Expand all | Expand 10 after
665 , spellCheckerClient(0) 651 , spellCheckerClient(0)
666 , storageClient(0) 652 , storageClient(0)
667 { 653 {
668 } 654 }
669 655
670 Page::PageClients::~PageClients() 656 Page::PageClients::~PageClients()
671 { 657 {
672 } 658 }
673 659
674 } // namespace blink 660 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/page/Page.h ('k') | Source/web/FrameLoaderClientImpl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698