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

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

Issue 115293005: Add a layer of indirection between Frame and Page (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Make GCC happy Created 7 years 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/core/svg/graphics/SVGImage.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, 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 14 matching lines...) Expand all
25 #include "core/dom/StyleEngine.h" 25 #include "core/dom/StyleEngine.h"
26 #include "core/dom/VisitedLinkState.h" 26 #include "core/dom/VisitedLinkState.h"
27 #include "core/editing/Caret.h" 27 #include "core/editing/Caret.h"
28 #include "core/editing/UndoStack.h" 28 #include "core/editing/UndoStack.h"
29 #include "core/events/Event.h" 29 #include "core/events/Event.h"
30 #include "core/events/ThreadLocalEventNames.h" 30 #include "core/events/ThreadLocalEventNames.h"
31 #include "core/fetch/ResourceFetcher.h" 31 #include "core/fetch/ResourceFetcher.h"
32 #include "core/frame/DOMTimer.h" 32 #include "core/frame/DOMTimer.h"
33 #include "core/frame/DOMWindow.h" 33 #include "core/frame/DOMWindow.h"
34 #include "core/frame/Frame.h" 34 #include "core/frame/Frame.h"
35 #include "core/frame/FrameHost.h"
35 #include "core/frame/FrameView.h" 36 #include "core/frame/FrameView.h"
36 #include "core/history/HistoryItem.h" 37 #include "core/history/HistoryItem.h"
37 #include "core/inspector/InspectorController.h" 38 #include "core/inspector/InspectorController.h"
38 #include "core/inspector/InspectorInstrumentation.h" 39 #include "core/inspector/InspectorInstrumentation.h"
39 #include "core/loader/FrameLoader.h" 40 #include "core/loader/FrameLoader.h"
40 #include "core/loader/ProgressTracker.h" 41 #include "core/loader/ProgressTracker.h"
41 #include "core/page/AutoscrollController.h" 42 #include "core/page/AutoscrollController.h"
42 #include "core/page/Chrome.h" 43 #include "core/page/Chrome.h"
43 #include "core/page/ChromeClient.h" 44 #include "core/page/ChromeClient.h"
44 #include "core/page/ContextMenuController.h" 45 #include "core/page/ContextMenuController.h"
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
121 , m_pageScaleFactor(1) 122 , m_pageScaleFactor(1)
122 , m_deviceScaleFactor(1) 123 , m_deviceScaleFactor(1)
123 , m_group(0) 124 , m_group(0)
124 , m_timerAlignmentInterval(DOMTimer::visiblePageAlignmentInterval()) 125 , m_timerAlignmentInterval(DOMTimer::visiblePageAlignmentInterval())
125 , m_visibilityState(PageVisibilityStateVisible) 126 , m_visibilityState(PageVisibilityStateVisible)
126 , m_isCursorVisible(true) 127 , m_isCursorVisible(true)
127 #ifndef NDEBUG 128 #ifndef NDEBUG
128 , m_isPainting(false) 129 , m_isPainting(false)
129 #endif 130 #endif
130 , m_console(PageConsole::create(this)) 131 , m_console(PageConsole::create(this))
132 , m_frameHost(FrameHost::create(*this))
131 { 133 {
132 ASSERT(m_editorClient); 134 ASSERT(m_editorClient);
133 135
134 if (!allPages) 136 if (!allPages)
135 allPages = new HashSet<Page*>; 137 allPages = new HashSet<Page*>;
136 138
137 ASSERT(!allPages->contains(this)); 139 ASSERT(!allPages->contains(this));
138 allPages->add(this); 140 allPages->add(this);
139 141
140 #ifndef NDEBUG 142 #ifndef NDEBUG
141 pageCounter.increment(); 143 pageCounter.increment();
142 #endif 144 #endif
143 } 145 }
144 146
145 Page::~Page() 147 Page::~Page()
146 { 148 {
147 m_mainFrame->setView(0); 149 m_mainFrame->setView(0);
148 clearPageGroup(); 150 clearPageGroup();
149 allPages->remove(this); 151 allPages->remove(this);
150 152
151 for (Frame* frame = mainFrame(); frame; frame = frame->tree().traverseNext() ) { 153 for (Frame* frame = mainFrame(); frame; frame = frame->tree().traverseNext() ) {
152 frame->willDetachPage(); 154 frame->willDetachFrameHost();
153 frame->detachFromPage(); 155 frame->detachFromFrameHost();
154 } 156 }
155 157
156 m_inspectorController->inspectedPageDestroyed(); 158 m_inspectorController->inspectedPageDestroyed();
157 159
158 if (m_scrollingCoordinator) 160 if (m_scrollingCoordinator)
159 m_scrollingCoordinator->pageDestroyed(); 161 m_scrollingCoordinator->pageDestroyed();
160 162
161 #ifndef NDEBUG 163 #ifndef NDEBUG
162 pageCounter.decrement(); 164 pageCounter.decrement();
163 #endif 165 #endif
(...skipping 383 matching lines...) Expand 10 before | Expand all | Expand 10 after
547 , backForwardClient(0) 549 , backForwardClient(0)
548 , spellCheckerClient(0) 550 , spellCheckerClient(0)
549 { 551 {
550 } 552 }
551 553
552 Page::PageClients::~PageClients() 554 Page::PageClients::~PageClients()
553 { 555 {
554 } 556 }
555 557
556 } // namespace WebCore 558 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/core/page/Page.h ('k') | Source/core/svg/graphics/SVGImage.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698