blob: 8ff3be062a95e8b976b2d6f1c8ea38e8984a3f84 [file] [log] [blame]
// 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 "coordination_unit.mojom";
import "mojo/common/time.mojom";
// A PageSignalReceiver implementation receives page-scoped signal from
// PageSignalGenerator.
// Any interested party that needs to receive page-scoped signal from GRC must
// implement this interface, construct mojo channel to the implementation, and
// pass the interface pointer of mojo channel to PageSignalGenerator through
// PageSignalGenerator::AddReceiver.
interface PageSignalReceiver {
NotifyPageAlmostIdle(CoordinationUnitID cu_id);
SetExpectedTaskQueueingDuration(CoordinationUnitID cu_id,
mojo.common.mojom.TimeDelta duration);
// A PageSignalGenerator implementation will be implemented inside GRC to receive
// signals from Coordination Units, generate page-scoped signals, sends signals
// to PageSignalReceiver implementations.
// There will be only one PageSignalGenerator implementation.
interface PageSignalGenerator {
AddReceiver(PageSignalReceiver receiver);