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

Side by Side Diff: services/resource_coordinator/public/interfaces/coordination_unit.mojom

Issue 2848053002: Revert of Global Resource Coordinator: Basic service internals (Closed)
Patch Set: Created 3 years, 7 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
(Empty)
1 // Copyright 2017 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 module resource_coordinator.mojom;
6
7 import "events.mojom";
8
9 // Any new type here needs to be mirrored between coordination_unit_types.h and
10 // coordination_unit.mojom, and have mappings between the two defined in
11 // coordination_unit_struct_traits.h/.cc (see comment in coordination_unit_id.h) .
12 enum CoordinationUnitType {
13 kWebContents,
14 kFrame,
15 kNavigation,
16 kProcess,
17 };
18
19 struct CoordinationUnitID {
20 CoordinationUnitType type;
21 int64 id;
22 };
23
24 struct CoordinationPolicy {
25 bool use_background_priority;
26 };
27
28 interface CoordinationPolicyCallback {
29 SetCoordinationPolicy(CoordinationPolicy policy);
30 };
31
32 interface CoordinationUnit {
33 SendEvent(Event event);
34
35 // Mainly used to force a round-trip to the service over the pipe for
36 // a specific unit, so we don't have to deal with possibly-not-yet-created
37 // children in AddChild()
38 GetID() => (CoordinationUnitID id);
39
40 Duplicate(CoordinationUnit& request);
41 // child_id must represent a CU which already exists service-side,
42 // and can't be a direct ascendent or descendent of the current unit.
43 AddChild(CoordinationUnitID child_id);
44 SetCoordinationPolicyCallback(CoordinationPolicyCallback callback);
45 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698