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

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

Issue 170603003: Use nullptr_t for RefPtr, PassRefPtr and RawPtr. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Final rebase Created 6 years, 10 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/HistoryController.cpp ('k') | Source/core/page/PointerLockController.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 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
117 , m_editorClient(pageClients.editorClient) 117 , m_editorClient(pageClients.editorClient)
118 , m_validationMessageClient(0) 118 , m_validationMessageClient(0)
119 , m_spellCheckerClient(pageClients.spellCheckerClient) 119 , m_spellCheckerClient(pageClients.spellCheckerClient)
120 , m_storageClient(pageClients.storageClient) 120 , m_storageClient(pageClients.storageClient)
121 , m_subframeCount(0) 121 , m_subframeCount(0)
122 , m_openedByDOM(false) 122 , m_openedByDOM(false)
123 , m_tabKeyCyclesThroughElements(true) 123 , m_tabKeyCyclesThroughElements(true)
124 , m_defersLoading(false) 124 , m_defersLoading(false)
125 , m_pageScaleFactor(1) 125 , m_pageScaleFactor(1)
126 , m_deviceScaleFactor(1) 126 , m_deviceScaleFactor(1)
127 , m_group(0) 127 , m_group(nullptr)
128 , m_timerAlignmentInterval(DOMTimer::visiblePageAlignmentInterval()) 128 , m_timerAlignmentInterval(DOMTimer::visiblePageAlignmentInterval())
129 , m_visibilityState(PageVisibilityStateVisible) 129 , m_visibilityState(PageVisibilityStateVisible)
130 , m_isCursorVisible(true) 130 , m_isCursorVisible(true)
131 #ifndef NDEBUG 131 #ifndef NDEBUG
132 , m_isPainting(false) 132 , m_isPainting(false)
133 #endif 133 #endif
134 , m_frameHost(FrameHost::create(*this)) 134 , m_frameHost(FrameHost::create(*this))
135 { 135 {
136 ASSERT(m_editorClient); 136 ASSERT(m_editorClient);
137 137
138 ASSERT(!allPages().contains(this)); 138 ASSERT(!allPages().contains(this));
139 allPages().add(this); 139 allPages().add(this);
140 140
141 #ifndef NDEBUG 141 #ifndef NDEBUG
142 pageCounter.increment(); 142 pageCounter.increment();
143 #endif 143 #endif
144 } 144 }
145 145
146 Page::~Page() 146 Page::~Page()
147 { 147 {
148 m_mainFrame->setView(0); 148 m_mainFrame->setView(nullptr);
149 clearPageGroup(); 149 clearPageGroup();
150 allPages().remove(this); 150 allPages().remove(this);
151 151
152 for (Frame* frame = mainFrame(); frame; frame = frame->tree().traverseNext() ) { 152 for (Frame* frame = mainFrame(); frame; frame = frame->tree().traverseNext() ) {
153 frame->willDetachFrameHost(); 153 frame->willDetachFrameHost();
154 frame->detachFromFrameHost(); 154 frame->detachFromFrameHost();
155 } 155 }
156 156
157 m_inspectorController->inspectedPageDestroyed(); 157 m_inspectorController->inspectedPageDestroyed();
158 158
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
222 void Page::setOpenedByDOM() 222 void Page::setOpenedByDOM()
223 { 223 {
224 m_openedByDOM = true; 224 m_openedByDOM = true;
225 } 225 }
226 226
227 void Page::clearPageGroup() 227 void Page::clearPageGroup()
228 { 228 {
229 if (!m_group) 229 if (!m_group)
230 return; 230 return;
231 m_group->removePage(this); 231 m_group->removePage(this);
232 m_group = 0; 232 m_group = nullptr;
233 } 233 }
234 234
235 void Page::setGroupType(PageGroupType type) 235 void Page::setGroupType(PageGroupType type)
236 { 236 {
237 clearPageGroup(); 237 clearPageGroup();
238 238
239 switch (type) { 239 switch (type) {
240 case PrivatePageGroup: 240 case PrivatePageGroup:
241 m_group = PageGroup::create(); 241 m_group = PageGroup::create();
242 break; 242 break;
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
280 PluginData::refresh(); 280 PluginData::refresh();
281 281
282 Vector<RefPtr<Frame> > framesNeedingReload; 282 Vector<RefPtr<Frame> > framesNeedingReload;
283 283
284 HashSet<Page*>::iterator end = allPages().end(); 284 HashSet<Page*>::iterator end = allPages().end();
285 for (HashSet<Page*>::iterator it = allPages().begin(); it != end; ++it) { 285 for (HashSet<Page*>::iterator it = allPages().begin(); it != end; ++it) {
286 Page* page = *it; 286 Page* page = *it;
287 287
288 // Clear out the page's plug-in data. 288 // Clear out the page's plug-in data.
289 if (page->m_pluginData) 289 if (page->m_pluginData)
290 page->m_pluginData = 0; 290 page->m_pluginData = nullptr;
291 291
292 if (!reload) 292 if (!reload)
293 continue; 293 continue;
294 294
295 for (Frame* frame = (*it)->mainFrame(); frame; frame = frame->tree().tra verseNext()) { 295 for (Frame* frame = (*it)->mainFrame(); frame; frame = frame->tree().tra verseNext()) {
296 if (frame->document()->containsPlugins()) 296 if (frame->document()->containsPlugins())
297 framesNeedingReload.append(frame); 297 framesNeedingReload.append(frame);
298 } 298 }
299 } 299 }
300 300
(...skipping 255 matching lines...) Expand 10 before | Expand all | Expand 10 after
556 , spellCheckerClient(0) 556 , spellCheckerClient(0)
557 , storageClient(0) 557 , storageClient(0)
558 { 558 {
559 } 559 }
560 560
561 Page::PageClients::~PageClients() 561 Page::PageClients::~PageClients()
562 { 562 {
563 } 563 }
564 564
565 } // namespace WebCore 565 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/core/page/HistoryController.cpp ('k') | Source/core/page/PointerLockController.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698