Chromium Code Reviews| Index: services/resource_coordinator/public/interfaces/coordination_unit.mojom |
| diff --git a/services/resource_coordinator/public/interfaces/coordination_unit.mojom b/services/resource_coordinator/public/interfaces/coordination_unit.mojom |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..921cb03a8c80b859046a2f1e17ecddd8b9e1defc |
| --- /dev/null |
| +++ b/services/resource_coordinator/public/interfaces/coordination_unit.mojom |
| @@ -0,0 +1,34 @@ |
| +// 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 resource_coordinator.mojom; |
| + |
| +import "events.mojom"; |
| + |
| +[Native] |
| +enum CoordinationUnitType; |
| + |
| +[Native] |
|
Ken Rockot(use gerrit already)
2017/04/10 23:58:00
Please don't do this. It's useful if you're conver
|
| +struct CoordinationUnitID; |
| + |
| +struct Policy { |
| + bool use_background_priority; |
| +}; |
| + |
| +interface PolicyCallback { |
| + SetPolicy(Policy policy); |
| +}; |
| + |
| +interface CoordinationUnit { |
| + SendEvent(Event event); |
| + |
| + // Mainly used to force a round-trip to the service over the pipe for |
| + // a specific unit, so we don't have to deal with possibly-not-yet-created |
| + // children in AddChild() |
| + GetID() => (CoordinationUnitID id); |
| + |
| + Duplicate(CoordinationUnit& request); |
| + AddChild(CoordinationUnitID child_id); |
| + SetPolicyCallback(PolicyCallback callback); |
| +}; |