| Index: services/blamer/shared_memory_heap_registry.h
|
| diff --git a/services/blamer/shared_memory_heap_registry.h b/services/blamer/shared_memory_heap_registry.h
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..8e97651825d7669aa4983c6615c3d647b70ca00b
|
| --- /dev/null
|
| +++ b/services/blamer/shared_memory_heap_registry.h
|
| @@ -0,0 +1,39 @@
|
| +// Copyright 2017 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 SERVICES_BLAMER_SHARED_MEMORY_HEAP_REGISTRY_H_
|
| +#define SERVICES_BLAMER_SHARED_MEMORY_HEAP_REGISTRY_H_
|
| +
|
| +#include "mojo/public/cpp/bindings/interface_request.h"
|
| +#include "mojo/public/cpp/bindings/strong_binding.h"
|
| +#include "services/blamer/public/interfaces/shared_memory_heap_registry.mojom.h"
|
| +#include "services/service_manager/public/cpp/connection.h"
|
| +#include "services/service_manager/public/cpp/service_context_ref.h"
|
| +
|
| +namespace blamer {
|
| +
|
| +// This is the implementation of a SharedMemoryHeap that lives in the process
|
| +// hosting the blamer service. It receives notifications of shared memory slabs
|
| +// allocated by remote blamer heaps.
|
| +class SharedMemoryHeapRegistry : public mojom::SharedMemoryHeapRegistry {
|
| + public:
|
| + SharedMemoryHeapRegistry(
|
| + service_manager::ServiceContextRefFactory* service_ref_factory);
|
| + ~SharedMemoryHeapRegistry() override;
|
| +
|
| + static void Create(
|
| + service_manager::ServiceContextRefFactory* service_ref_factory,
|
| + blamer::mojom::SharedMemoryHeapRegistryRequest request);
|
| + void RegisterSlab(mojom::SharedMemoryHeapSlabPtr slab) override;
|
| +
|
| + private:
|
| + service_manager::ServiceContextRefFactory* service_ref_factory_;
|
| + std::unique_ptr<service_manager::ServiceContextRef> service_ref_;
|
| +
|
| + DISALLOW_COPY_AND_ASSIGN(SharedMemoryHeapRegistry);
|
| +};
|
| +
|
| +} // namespace blamer
|
| +
|
| +#endif // SERVICES_BLAMER_SHARED_MEMORY_HEAP_REGISTRY_H_
|
|
|