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

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

Issue 1335373003: Have a Page's MemoryPurgeController be a separate allocation also. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 3 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/platform/MemoryPurgeController.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 29 matching lines...) Expand all
40 #include "core/layout/TextAutosizer.h" 40 #include "core/layout/TextAutosizer.h"
41 #include "core/page/AutoscrollController.h" 41 #include "core/page/AutoscrollController.h"
42 #include "core/page/ChromeClient.h" 42 #include "core/page/ChromeClient.h"
43 #include "core/page/ContextMenuController.h" 43 #include "core/page/ContextMenuController.h"
44 #include "core/page/DragController.h" 44 #include "core/page/DragController.h"
45 #include "core/page/FocusController.h" 45 #include "core/page/FocusController.h"
46 #include "core/page/PointerLockController.h" 46 #include "core/page/PointerLockController.h"
47 #include "core/page/ValidationMessageClient.h" 47 #include "core/page/ValidationMessageClient.h"
48 #include "core/page/scrolling/ScrollingCoordinator.h" 48 #include "core/page/scrolling/ScrollingCoordinator.h"
49 #include "core/paint/DeprecatedPaintLayer.h" 49 #include "core/paint/DeprecatedPaintLayer.h"
50 #include "platform/MemoryPurgeController.h"
50 #include "platform/graphics/GraphicsLayer.h" 51 #include "platform/graphics/GraphicsLayer.h"
51 #include "platform/plugins/PluginData.h" 52 #include "platform/plugins/PluginData.h"
52 #include "wtf/RefCountedLeakCounter.h" 53 #include "wtf/RefCountedLeakCounter.h"
53 54
54 namespace blink { 55 namespace blink {
55 56
56 DEFINE_DEBUG_ONLY_GLOBAL(WTF::RefCountedLeakCounter, pageCounter, ("Page")); 57 DEFINE_DEBUG_ONLY_GLOBAL(WTF::RefCountedLeakCounter, pageCounter, ("Page"));
57 58
58 // static 59 // static
59 HashSet<Page*>& Page::allPages() 60 HashSet<Page*>& Page::allPages()
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
154 } 155 }
155 156
156 ScrollingCoordinator* Page::scrollingCoordinator() 157 ScrollingCoordinator* Page::scrollingCoordinator()
157 { 158 {
158 if (!m_scrollingCoordinator && m_settings->acceleratedCompositingEnabled()) 159 if (!m_scrollingCoordinator && m_settings->acceleratedCompositingEnabled())
159 m_scrollingCoordinator = ScrollingCoordinator::create(this); 160 m_scrollingCoordinator = ScrollingCoordinator::create(this);
160 161
161 return m_scrollingCoordinator.get(); 162 return m_scrollingCoordinator.get();
162 } 163 }
163 164
165 MemoryPurgeController& Page::memoryPurgeController()
166 {
167 if (!m_memoryPurgeController)
168 m_memoryPurgeController = MemoryPurgeController::create();
169
170 return *m_memoryPurgeController;
171 }
172
164 String Page::mainThreadScrollingReasonsAsText() 173 String Page::mainThreadScrollingReasonsAsText()
165 { 174 {
166 if (ScrollingCoordinator* scrollingCoordinator = this->scrollingCoordinator( )) 175 if (ScrollingCoordinator* scrollingCoordinator = this->scrollingCoordinator( ))
167 return scrollingCoordinator->mainThreadScrollingReasonsAsText(); 176 return scrollingCoordinator->mainThreadScrollingReasonsAsText();
168 177
169 return String(); 178 return String();
170 } 179 }
171 180
172 ClientRectList* Page::nonFastScrollableRects(const LocalFrame* frame) 181 ClientRectList* Page::nonFastScrollableRects(const LocalFrame* frame)
173 { 182 {
(...skipping 376 matching lines...) Expand 10 before | Expand all | Expand 10 after
550 visitor->trace(m_dragController); 559 visitor->trace(m_dragController);
551 visitor->trace(m_focusController); 560 visitor->trace(m_focusController);
552 visitor->trace(m_contextMenuController); 561 visitor->trace(m_contextMenuController);
553 visitor->trace(m_pointerLockController); 562 visitor->trace(m_pointerLockController);
554 visitor->trace(m_scrollingCoordinator); 563 visitor->trace(m_scrollingCoordinator);
555 visitor->trace(m_undoStack); 564 visitor->trace(m_undoStack);
556 visitor->trace(m_mainFrame); 565 visitor->trace(m_mainFrame);
557 visitor->trace(m_validationMessageClient); 566 visitor->trace(m_validationMessageClient);
558 visitor->trace(m_multisamplingChangedObservers); 567 visitor->trace(m_multisamplingChangedObservers);
559 visitor->trace(m_frameHost); 568 visitor->trace(m_frameHost);
569 visitor->trace(m_memoryPurgeController);
560 HeapSupplementable<Page>::trace(visitor); 570 HeapSupplementable<Page>::trace(visitor);
561 #endif 571 #endif
562 visitor->trace(m_memoryPurgeController);
563 PageLifecycleNotifier::trace(visitor); 572 PageLifecycleNotifier::trace(visitor);
564 } 573 }
565 574
566 void Page::willBeDestroyed() 575 void Page::willBeDestroyed()
567 { 576 {
568 RefPtrWillBeRawPtr<Frame> mainFrame = m_mainFrame; 577 RefPtrWillBeRawPtr<Frame> mainFrame = m_mainFrame;
569 578
570 mainFrame->detach(FrameDetachType::Remove); 579 mainFrame->detach(FrameDetachType::Remove);
571 580
572 if (mainFrame->isLocalFrame()) { 581 if (mainFrame->isLocalFrame()) {
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
604 { 613 {
605 } 614 }
606 615
607 Page::PageClients::~PageClients() 616 Page::PageClients::~PageClients()
608 { 617 {
609 } 618 }
610 619
611 template class CORE_TEMPLATE_EXPORT WillBeHeapSupplement<Page>; 620 template class CORE_TEMPLATE_EXPORT WillBeHeapSupplement<Page>;
612 621
613 } // namespace blink 622 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/page/Page.h ('k') | Source/platform/MemoryPurgeController.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698