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

Unified Diff: services/memory_infra/public/interfaces/memory_infra.mojom

Issue 2621143002: memory-infra: Introduce mojo interfaces and service stubs (Closed)
Patch Set: Created 3 years, 11 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: 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..0cafeb9747a772c51b88a67d519265eb4a4e1dad
--- /dev/null
+++ b/services/memory_infra/public/interfaces/memory_infra.mojom
@@ -0,0 +1,40 @@
+// 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,
+ LAST = PEAK_MEMORY_USAGE
+};
+
+enum LevelOfDetail {
+ FIRST,
+ BACKGROUND = FIRST,
+ LIGHT,
+ DETAILED,
+ LAST = 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.
+interface Client {
+ RequestLocalMemoryDump(RequestArgs args) => (uint64 dump_guid, bool success);
ssid 2017/01/11 00:13:25 I'd prefer Process over Local here since the name
chiniforooshan1 2017/01/11 16:07:44 Done.
+};
+
+// 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);
+};

Powered by Google App Engine
This is Rietveld 408576698