blob: 3b36a6a175e2b8d0fd45f63fa10cc343099f3ef4 [file] [log] [blame]
// Copyright 2018 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 blink.mojom;
// Implementation of the proposed "Idle Detection API".
//
// Proposal: https://github.com/inexorabletash/idle-detection
enum IdleState {
ACTIVE,
IDLE,
LOCKED
};
interface IdleMonitor {
Update(IdleState state);
};
interface IdleManager {
// Register an IdleMonitor instance. When registered, it will return the
// initial state. It will be notified by calls to Update() per the threshold
// registered for this instance. It can be unregistered by simply closing
// the pipe.
AddMonitor(uint32 threshold, IdleMonitor monitor) => (IdleState state);
};