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

Side by Side Diff: components/memory_coordinator/common/client_registry.cc

Issue 2286583002: Make cc::SoftwareImageDecodeController, cc::ResourcePool, and cc::StagingBufferPoo… (Closed)
Patch Set: Fixed BUILD.gn's DEPS Created 4 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
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "components/memory_coordinator/common/client_registry.h" 5 #include "components/memory_coordinator/common/client_registry.h"
6 6
7 namespace memory_coordinator { 7 namespace memory_coordinator {
8 8
9 ClientRegistry* ClientRegistry::instance_ = nullptr;
10
9 ClientRegistry::ClientRegistry() : clients_(new ClientList) {} 11 ClientRegistry::ClientRegistry() : clients_(new ClientList) {}
10 12
11 ClientRegistry::~ClientRegistry() {} 13 ClientRegistry::~ClientRegistry() {}
12 14
13 void ClientRegistry::RegisterClient(MemoryCoordinatorClient* client) { 15 void ClientRegistry::RegisterClient(MemoryCoordinatorClient* client) {
14 clients_->AddObserver(client); 16 clients_->AddObserver(client);
15 } 17 }
16 18
17 void ClientRegistry::UnregisterClient(MemoryCoordinatorClient* client) { 19 void ClientRegistry::UnregisterClient(MemoryCoordinatorClient* client) {
18 clients_->RemoveObserver(client); 20 clients_->RemoveObserver(client);
19 } 21 }
20 22
23 ClientRegistry* ClientRegistry::GetInstance() {
24 return instance_;
25 }
26
27 void ClientRegistry::SetInstance(ClientRegistry* instance) {
28 instance_ = instance;
29 }
30
21 } // namespace memory_coordinator 31 } // namespace memory_coordinator
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698