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

Unified Diff: components/memory_coordinator/common/client_registry.h

Issue 2286583002: Make cc::SoftwareImageDecodeController, cc::ResourcePool, and cc::StagingBufferPoo… (Closed)
Patch Set: Fixed BUILD.gn's DEPS 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: components/memory_coordinator/common/client_registry.h
diff --git a/components/memory_coordinator/common/client_registry.h b/components/memory_coordinator/common/client_registry.h
index ec5874f15c69f261017c7ec7b6be84da67581f99..dcc0d2377dc6905a21f954d7b45affb6c93a8c73 100644
--- a/components/memory_coordinator/common/client_registry.h
+++ b/components/memory_coordinator/common/client_registry.h
@@ -18,16 +18,21 @@ class MEMORY_COORDINATOR_EXPORT ClientRegistry {
ClientRegistry();
virtual ~ClientRegistry();
+ static ClientRegistry* GetInstance();
+
// Registers/unregisters a client. Does not take ownership of client.
void RegisterClient(MemoryCoordinatorClient* client);
void UnregisterClient(MemoryCoordinatorClient* client);
protected:
+ static void SetInstance(ClientRegistry*);
+
using ClientList = base::ObserverListThreadSafe<MemoryCoordinatorClient>;
ClientList* clients() { return clients_.get(); }
private:
scoped_refptr<ClientList> clients_;
+ static ClientRegistry* instance_;
};
} // namespace memory_coordinator

Powered by Google App Engine
This is Rietveld 408576698