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

Unified Diff: Source/platform/MemoryPurgeController.h

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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/core/page/Page.cpp ('k') | Source/platform/MemoryPurgeController.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/platform/MemoryPurgeController.h
diff --git a/Source/platform/MemoryPurgeController.h b/Source/platform/MemoryPurgeController.h
index 77c46cfb2959021c3793c3e031f6107d9f5edc5d..561c0cc2bb8e2ab68591db5e2655dffa5f523073 100644
--- a/Source/platform/MemoryPurgeController.h
+++ b/Source/platform/MemoryPurgeController.h
@@ -41,9 +41,13 @@ public:
// for reducing memory consumption and notifies its clients.
// Since we want to control memory per tab, MemoryPurgeController is owned by
// Page.
-class PLATFORM_EXPORT MemoryPurgeController {
+class PLATFORM_EXPORT MemoryPurgeController final : public NoBaseWillBeGarbageCollected<MemoryPurgeController> {
+ DECLARE_EMPTY_DESTRUCTOR_WILL_BE_REMOVED(MemoryPurgeController);
public:
- MemoryPurgeController();
+ static PassOwnPtrWillBeRawPtr<MemoryPurgeController> create()
+ {
+ return adoptPtrWillBeNoop(new MemoryPurgeController);
+ }
void registerClient(MemoryPurgeClient* client)
{
@@ -63,6 +67,8 @@ public:
DECLARE_TRACE();
private:
+ MemoryPurgeController();
+
void purgeMemory(MemoryPurgeMode);
WillBeHeapHashSet<RawPtrWillBeWeakMember<MemoryPurgeClient>> m_clients;
« no previous file with comments | « Source/core/page/Page.cpp ('k') | Source/platform/MemoryPurgeController.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698