Commit bd8cb5a7 authored by Erik Chen's avatar Erik Chen Committed by Commit Bot

Stabilize crosapi mojoms.

This CL has no intended behavior changes. It stabilizes the crosapi and
hid mojoms, which were intended to be stable but were incorrectly not
marked with the [Stable] tag.

Change-Id: I31d0e67632c7ce7a6a9726539c5449664a0669de
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2417054
Auto-Submit: Erik Chen <erikchen@chromium.org>
Commit-Queue: Greg Kerr <kerrnel@chromium.org>
Reviewed-by: default avatarGreg Kerr <kerrnel@chromium.org>
Cr-Commit-Position: refs/heads/master@{#808063}
parent ec0501c5
...@@ -15,6 +15,7 @@ import "services/device/public/mojom/hid.mojom"; ...@@ -15,6 +15,7 @@ import "services/device/public/mojom/hid.mojom";
// AshChromeService defines the APIs that live in ash-chrome and are // AshChromeService defines the APIs that live in ash-chrome and are
// accessed from lacros-chrome. // accessed from lacros-chrome.
[Stable]
interface AshChromeService { interface AshChromeService {
// Binds the KeystoreService interface for challenging keys. // Binds the KeystoreService interface for challenging keys.
BindKeystoreService@2(pending_receiver<KeystoreService> receiver); BindKeystoreService@2(pending_receiver<KeystoreService> receiver);
...@@ -35,12 +36,14 @@ interface AshChromeService { ...@@ -35,12 +36,14 @@ interface AshChromeService {
// LacrosInitParams is a set of parameters for initialization of lacros-chrome, // LacrosInitParams is a set of parameters for initialization of lacros-chrome,
// which is passed from ash-chrome. // which is passed from ash-chrome.
[Stable]
struct LacrosInitParams { struct LacrosInitParams {
// This is placeholder, so now it is empty. // This is placeholder, so now it is empty.
}; };
// LacrosChromeService defines the APIs that live in lacros-chrome and // LacrosChromeService defines the APIs that live in lacros-chrome and
// are accessed from ash-chrome. // are accessed from ash-chrome.
[Stable]
interface LacrosChromeService { interface LacrosChromeService {
// Ash-chrome can pass initialize parameters via this method. // Ash-chrome can pass initialize parameters via this method.
// The parameters are available on lacros-chrome startup. // The parameters are available on lacros-chrome startup.
......
...@@ -7,12 +7,13 @@ module crosapi.mojom; ...@@ -7,12 +7,13 @@ module crosapi.mojom;
import "chromeos/crosapi/mojom/bitmap.mojom"; import "chromeos/crosapi/mojom/bitmap.mojom";
// A unique identifier and title for a window. // A unique identifier and title for a window.
[Stable]
struct WindowDetails { struct WindowDetails {
// Guaranteed to be unique and never reused. // Guaranteed to be unique and never reused.
uint64 id; uint64 id@0;
// The title of the window in UTF-8 encoding. // The title of the window in UTF-8 encoding.
string title; string title@1;
}; };
// This interface is implemented by ash-chrome. It allows lacros-chrome to query // This interface is implemented by ash-chrome. It allows lacros-chrome to query
...@@ -26,6 +27,7 @@ struct WindowDetails { ...@@ -26,6 +27,7 @@ struct WindowDetails {
// TODO(https://crbug.com/1094460): This is a very simple interface. We will // TODO(https://crbug.com/1094460): This is a very simple interface. We will
// likely want to replace it with a more feature-complete and performant // likely want to replace it with a more feature-complete and performant
// interface in the future. // interface in the future.
[Stable]
interface ScreenManager { interface ScreenManager {
// TODO(https://crbug.com/1094460): We will need to add more methods for // TODO(https://crbug.com/1094460): We will need to add more methods for
// querying screens, windows, etc. Details still TBD. // querying screens, windows, etc. Details still TBD.
......
...@@ -7,6 +7,7 @@ ...@@ -7,6 +7,7 @@
module device.mojom; module device.mojom;
[Stable, Extensible]
enum HidBusType { enum HidBusType {
kHIDBusTypeUSB = 0, kHIDBusTypeUSB = 0,
kHIDBusTypeBluetooth = 1, kHIDBusTypeBluetooth = 1,
...@@ -134,6 +135,7 @@ const uint32 kHIDCollectionTypeUsageModifier = 0x06; ...@@ -134,6 +135,7 @@ const uint32 kHIDCollectionTypeUsageModifier = 0x06;
const uint32 kHIDCollectionTypeVendorMin = 0x80; const uint32 kHIDCollectionTypeVendorMin = 0x80;
const uint32 kHIDCollectionTypeVendorMax = 0xff; const uint32 kHIDCollectionTypeVendorMax = 0xff;
[Stable]
struct HidUsageAndPage { struct HidUsageAndPage {
uint16 usage@0; uint16 usage@0;
uint16 usage_page@1; uint16 usage_page@1;
...@@ -149,6 +151,7 @@ struct HidUsageAndPage { ...@@ -149,6 +151,7 @@ struct HidUsageAndPage {
// See section 6.2.2 of the Device Class Definition for HID for additional // See section 6.2.2 of the Device Class Definition for HID for additional
// information about the HID report descriptor and parser behavior. // information about the HID report descriptor and parser behavior.
// https://www.usb.org/sites/default/files/documents/hid1_11.pdf // https://www.usb.org/sites/default/files/documents/hid1_11.pdf
[Stable]
struct HidReportItem { struct HidReportItem {
// True if the usages for this item are defined by |usage_minimum| and // True if the usages for this item are defined by |usage_minimum| and
// |usage_maximum|. False if the usages for this item are defined by |usages|. // |usage_maximum|. False if the usages for this item are defined by |usages|.
...@@ -237,6 +240,7 @@ struct HidReportItem { ...@@ -237,6 +240,7 @@ struct HidReportItem {
// (bi-directional). When a device requires multiple reports of a single // (bi-directional). When a device requires multiple reports of a single
// category, each report is assigned a unique 8-bit ID. Devices that do not use // category, each report is assigned a unique 8-bit ID. Devices that do not use
// more than one report of any type may omit report IDs. // more than one report of any type may omit report IDs.
[Stable]
struct HidReportDescription { struct HidReportDescription {
// Report ID associated with this report, or zero if the device does not use // Report ID associated with this report, or zero if the device does not use
// report IDs. // report IDs.
...@@ -255,6 +259,7 @@ struct HidReportDescription { ...@@ -255,6 +259,7 @@ struct HidReportDescription {
// See section 6.2.2.6 of the Device Class Definition for HID for more // See section 6.2.2.6 of the Device Class Definition for HID for more
// information about HID collections. // information about HID collections.
// https://www.usb.org/sites/default/files/documents/hid1_11.pdf // https://www.usb.org/sites/default/files/documents/hid1_11.pdf
[Stable]
struct HidCollectionInfo { struct HidCollectionInfo {
// Collection's usage ID. // Collection's usage ID.
HidUsageAndPage usage@0; HidUsageAndPage usage@0;
...@@ -283,6 +288,7 @@ struct HidCollectionInfo { ...@@ -283,6 +288,7 @@ struct HidCollectionInfo {
// single physical device may expose multiple logical devices, for instance a // single physical device may expose multiple logical devices, for instance a
// keyboard/mouse combo device would expose separate logical HID devices for // keyboard/mouse combo device would expose separate logical HID devices for
// keyboard and mouse functionality. // keyboard and mouse functionality.
[Stable]
struct HidDeviceInfo { struct HidDeviceInfo {
// A random GUID assigned to the device during enumeration. The device GUID is // A random GUID assigned to the device during enumeration. The device GUID is
// stable as long as the application is running and the device remains // stable as long as the application is running and the device remains
...@@ -339,6 +345,7 @@ struct HidDeviceInfo { ...@@ -339,6 +345,7 @@ struct HidDeviceInfo {
// A client interface for receiving a notification when HID devices are // A client interface for receiving a notification when HID devices are
// physically connected or disconnected. // physically connected or disconnected.
[Stable]
interface HidManagerClient { interface HidManagerClient {
// Notifies the client that a device is added. // Notifies the client that a device is added.
DeviceAdded@0(HidDeviceInfo device_info); DeviceAdded@0(HidDeviceInfo device_info);
...@@ -351,6 +358,7 @@ interface HidManagerClient { ...@@ -351,6 +358,7 @@ interface HidManagerClient {
// Provides an interface for enumerating available HID devices, registering for // Provides an interface for enumerating available HID devices, registering for
// device connection and disconnection notifications, and opening a connection // device connection and disconnection notifications, and opening a connection
// for reading from and writing to a HID device. // for reading from and writing to a HID device.
[Stable]
interface HidManager { interface HidManager {
// Enumerates available devices and set as a client of HidManager. // Enumerates available devices and set as a client of HidManager.
// The implementation of HidManager guarantees that the returned callback // The implementation of HidManager guarantees that the returned callback
...@@ -384,6 +392,7 @@ interface HidManager { ...@@ -384,6 +392,7 @@ interface HidManager {
// allows a device to define its own packet formats (reports) for sending or // allows a device to define its own packet formats (reports) for sending or
// receiving data. The methods in HidConnection send or receive data and specify // receiving data. The methods in HidConnection send or receive data and specify
// which report is used. // which report is used.
[Stable]
interface HidConnection { interface HidConnection {
// A |report_id| of 0 is returned via callback if report IDs are not // A |report_id| of 0 is returned via callback if report IDs are not
// supported by the device. // supported by the device.
...@@ -403,6 +412,7 @@ interface HidConnection { ...@@ -403,6 +412,7 @@ interface HidConnection {
// A client interface for receiving a notification when input reports are // A client interface for receiving a notification when input reports are
// received. // received.
[Stable]
interface HidConnectionClient { interface HidConnectionClient {
// Notifies the client that an input report was received. A |report_id| of 0 // Notifies the client that an input report was received. A |report_id| of 0
// is passed if report IDs are not used by the device. // is passed if report IDs are not used by the device.
...@@ -419,5 +429,6 @@ interface HidConnectionClient { ...@@ -419,5 +429,6 @@ interface HidConnectionClient {
// itself as a watcher so it can be notified when the connection is closed. This // itself as a watcher so it can be notified when the connection is closed. This
// allows the service to keep track of whether there are open connections for // allows the service to keep track of whether there are open connections for
// the purpose of drawing an indicator icon when a tab is using a HID device. // the purpose of drawing an indicator icon when a tab is using a HID device.
[Stable]
interface HidConnectionWatcher { interface HidConnectionWatcher {
}; };
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment