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

Unified Diff: third_party/WebKit/Source/platform/MemoryCoordinator.h

Issue 2252743002: Revert of Add MemoryCoordinatorClient (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 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
Index: third_party/WebKit/Source/platform/MemoryCoordinator.h
diff --git a/third_party/WebKit/Source/platform/MemoryCoordinator.h b/third_party/WebKit/Source/platform/MemoryCoordinator.h
deleted file mode 100644
index 876764f9ce5c070ccd4eaa53c13d89421e984b73..0000000000000000000000000000000000000000
--- a/third_party/WebKit/Source/platform/MemoryCoordinator.h
+++ /dev/null
@@ -1,56 +0,0 @@
-// Copyright 2015 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef MemoryCoordinator_h
-#define MemoryCoordinator_h
-
-#include "platform/PlatformExport.h"
-#include "platform/heap/Handle.h"
-#include "public/platform/WebMemoryPressureLevel.h"
-#include "wtf/Noncopyable.h"
-
-namespace blink {
-
-class PLATFORM_EXPORT MemoryCoordinatorClient : public GarbageCollectedMixin {
-public:
- virtual ~MemoryCoordinatorClient() { }
-
- // Called when MemoryCoordinator is asked to purge memory.
- virtual void purgeMemory() { }
-
- // TODO(bashi): Deprecating. Remove this when MemoryPressureListener is
- // gone.
- virtual void onMemoryPressure(WebMemoryPressureLevel) { }
-
- DECLARE_VIRTUAL_TRACE();
-};
-
-// MemoryCoordinator listens to some events which could be opportunities
-// for reducing memory consumption and notifies its clients.
-class PLATFORM_EXPORT MemoryCoordinator final {
- WTF_MAKE_NONCOPYABLE(MemoryCoordinator);
-public:
- static MemoryCoordinator& instance();
-
- void registerClient(MemoryCoordinatorClient*);
- void unregisterClient(MemoryCoordinatorClient*);
-
- void purgeMemory();
-
- // TODO(bashi): Deprecating. Remove this when MemoryPressureListener is
- // gone.
- void onMemoryPressure(WebMemoryPressureLevel);
-
- DECLARE_TRACE();
-
-private:
- MemoryCoordinator();
- ~MemoryCoordinator();
-
- HeapHashSet<WeakMember<MemoryCoordinatorClient>> m_clients;
-};
-
-} // namespace blink
-
-#endif // MemoryCoordinator_h
« no previous file with comments | « third_party/WebKit/Source/core/fetch/MemoryCache.cpp ('k') | third_party/WebKit/Source/platform/MemoryCoordinator.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698