blob: 92ba0dd017c012bad15b9c61a340568fe978ec4b [file] [log] [blame]
// Copyright 2019 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;
import "ui/display/mojom/display.mojom";
// A struct containing information about the set of connected displays.
struct Displays {
array<display.mojom.Display> displays; // The list of connected displays.
int64 internal_id; // The internal display id or kInvalidDisplayId if none.
int64 primary_id; // The primary display id or kInvalidDisplayId if none.
};
// An enum representing the presence of multiple displays, or an error state.
enum MultipleDisplays {
kFalse, // 0 or 1 displays are connected.
kTrue, // 2 or more displays are connected.
kError, // The display count is unavailable or access is denied.
};
// An interface enabling renderers to request information about screens
// connected to the device from the browser process.
interface ScreenEnumeration {
// Returns information about the connected displays, or null if an error
// occurred (e.g. display information is unavailable or access is denied).
GetDisplays() => (Displays? result);
// Returns information about the presence of multiple displays.
HasMultipleDisplays() => (MultipleDisplays result);
};