// Copyright 2014 The Chromium Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. module device.mojom; // Responsible for handling the device vibration, if applicable. Desktop devices // currently do not support this but Android does. There are separate // implementations to handle this under vibration_manager_impl.cc. interface VibrationManager { // TODO(mvanouwerkerk): Add something like StructTraits to validate arguments. Vibrate(int64 milliseconds) => (); // Cancels the vibration after the VibrationManager vibrates the device. Cancel() => (); }; // Listens when the VibrationManager implementation calls Vibrate function. // Currently, this mojo connection exists to connect between the RenderFrameHost // and the device directory VibrationManagerImpl in the device service. interface VibrationManagerListener { // Called when VibrationManager calls Vibrate. OnVibrate(); };