| // Copyright 2022 The Chromium Authors |
| // Use of this source code is governed by a BSD-style license that can be |
| // found in the LICENSE file. |
| |
| // Use the <code>chrome.systemLog</code> API to record Chrome system logs from |
| // extensions. |
| [platforms=("chromeos", "lacros"), |
| implemented_in="chrome/browser/chromeos/extensions/system_log/system_log_api.h"] |
| namespace systemLog { |
| callback VoidCallback = void (); |
| |
| // Options for $(ref:add). |
| // |message|: A log message to record. |
| dictionary MessageOptions { |
| DOMString message; |
| }; |
| |
| interface Functions { |
| // Adds a new log record. |
| // |options|: The logging options. |
| // |callback|: A callback to invoke once the log has been added. |
| [supportsPromises] static void add(MessageOptions options, |
| optional VoidCallback callback); |
| }; |
| }; |