Chromium Code Reviews| Index: services/memory_infra/public/interfaces/memory_infra.mojom |
| diff --git a/services/memory_infra/public/interfaces/memory_infra.mojom b/services/memory_infra/public/interfaces/memory_infra.mojom |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..e2296bcb33fc9bc6be70e1a4a0979267e8ce6d4e |
| --- /dev/null |
| +++ b/services/memory_infra/public/interfaces/memory_infra.mojom |
| @@ -0,0 +1,38 @@ |
| +// 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. |
| + |
| +module memory_infra.mojom; |
| + |
| +enum DumpType { |
| + PERIODIC_INTERVAL, |
| + EXPLICITLY_TRIGGERED, |
| + PEAK_MEMORY_USAGE |
| +}; |
| + |
| +enum LevelOfDetail { |
| + BACKGROUND, |
| + LIGHT, |
| + DETAILED |
| +}; |
| + |
| +struct RequestArgs { |
| + uint64 dump_guid; |
| + DumpType dump_type; |
| + LevelOfDetail level_of_detail; |
| +}; |
| + |
| +// Memory Infra clients implement this interface. There should be at most one |
| +// client per process. |
|
Primiano Tucci (use gerrit)
2017/01/16 15:11:04
maybe expand a bit more saying. When successful, t
chiniforooshan1
2017/01/16 18:14:48
Done.
|
| +interface Client { |
|
Primiano Tucci (use gerrit)
2017/01/16 15:11:04
naming bike-shedding, yay: client may be a bit gen
chiniforooshan1
2017/01/16 18:14:48
Done.
|
| + RequestProcessMemoryDump(RequestArgs args) => |
| + (uint64 dump_guid, bool success); |
| +}; |
| + |
| +// Memory Infra service implements this interface. Clients register themselves |
| +// using the RegisterClient method and suggest a global memory dump using the |
| +// RequestGlobalMemoryDump method. |
| +interface Coordinator { |
| + RegisterClient(Client client); |
| + RequestGlobalMemoryDump(RequestArgs args) => (uint64 dump_guid, bool success); |
| +}; |