@types/chrome 0.0.286 → 0.0.287
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- chrome/README.md +1 -1
- chrome/index.d.ts +149 -235
- chrome/package.json +2 -2
chrome/README.md
CHANGED
@@ -8,7 +8,7 @@ This package contains type definitions for chrome (http://developer.chrome.com/e
|
|
8
8
|
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/chrome.
|
9
9
|
|
10
10
|
### Additional Details
|
11
|
-
* Last updated: Tue, 26 Nov 2024
|
11
|
+
* Last updated: Tue, 26 Nov 2024 07:33:59 GMT
|
12
12
|
* Dependencies: [@types/filesystem](https://npmjs.com/package/@types/filesystem), [@types/har-format](https://npmjs.com/package/@types/har-format)
|
13
13
|
|
14
14
|
# Credits
|
chrome/index.d.ts
CHANGED
@@ -9368,21 +9368,33 @@ declare namespace chrome {
|
|
9368
9368
|
////////////////////
|
9369
9369
|
/**
|
9370
9370
|
* Use the system.display API to query display metadata.
|
9371
|
-
* Permissions:
|
9371
|
+
* Permissions: "system.display"
|
9372
9372
|
* @since Chrome 30
|
9373
9373
|
*/
|
9374
9374
|
export namespace system.display {
|
9375
|
-
export
|
9376
|
-
TOP
|
9377
|
-
RIGHT
|
9378
|
-
BOTTOM
|
9379
|
-
LEFT
|
9380
|
-
}
|
9381
|
-
|
9382
|
-
|
9383
|
-
|
9384
|
-
|
9385
|
-
|
9375
|
+
export enum LayoutPosition {
|
9376
|
+
TOP = "top",
|
9377
|
+
RIGHT = "right",
|
9378
|
+
BOTTOM = "bottom",
|
9379
|
+
LEFT = "left",
|
9380
|
+
}
|
9381
|
+
|
9382
|
+
/**
|
9383
|
+
* Mirror mode, i.e. different ways of how a display is mirrored to other displays.
|
9384
|
+
* @since Chrome 65
|
9385
|
+
*/
|
9386
|
+
export enum MirrorMode {
|
9387
|
+
/** Specifies the default mode (extended or unified desktop). */
|
9388
|
+
OFF = "off",
|
9389
|
+
/** Specifies that the default source display will be mirrored to all other displays. */
|
9390
|
+
NORMAL = "normal",
|
9391
|
+
/**
|
9392
|
+
* Specifies that the specified source display will be mirrored to the provided destination displays.
|
9393
|
+
* All other connected displays will be extended.
|
9394
|
+
*/
|
9395
|
+
MIXED = "mixed",
|
9396
|
+
}
|
9397
|
+
|
9386
9398
|
export interface Bounds {
|
9387
9399
|
/** The x-coordinate of the upper-left corner. */
|
9388
9400
|
left: number;
|
@@ -9405,9 +9417,7 @@ declare namespace chrome {
|
|
9405
9417
|
bottom: number;
|
9406
9418
|
}
|
9407
9419
|
|
9408
|
-
/**
|
9409
|
-
* @since Chrome 57
|
9410
|
-
*/
|
9420
|
+
/** @since Chrome 57 */
|
9411
9421
|
export interface Point {
|
9412
9422
|
/** The x-coordinate of the point. */
|
9413
9423
|
x: number;
|
@@ -9415,9 +9425,7 @@ declare namespace chrome {
|
|
9415
9425
|
y: number;
|
9416
9426
|
}
|
9417
9427
|
|
9418
|
-
/**
|
9419
|
-
* @since Chrome 57
|
9420
|
-
*/
|
9428
|
+
/** @since Chrome 57 */
|
9421
9429
|
export interface TouchCalibrationPair {
|
9422
9430
|
/** The coordinates of the display point. */
|
9423
9431
|
displayPoint: Point;
|
@@ -9425,47 +9433,40 @@ declare namespace chrome {
|
|
9425
9433
|
touchPoint: Point;
|
9426
9434
|
}
|
9427
9435
|
|
9428
|
-
/**
|
9429
|
-
* @since Chrome 52
|
9430
|
-
*/
|
9436
|
+
/** @since Chrome 52 */
|
9431
9437
|
export interface DisplayMode {
|
9432
9438
|
/** The display mode width in device independent (user visible) pixels. */
|
9433
9439
|
width: number;
|
9434
|
-
|
9435
9440
|
/** The display mode height in device independent (user visible) pixels. */
|
9436
9441
|
height: number;
|
9437
|
-
|
9438
9442
|
/** The display mode width in native pixels. */
|
9439
9443
|
widthInNativePixels: number;
|
9440
|
-
|
9441
9444
|
/** The display mode height in native pixels. */
|
9442
9445
|
heightInNativePixels: number;
|
9443
|
-
|
9444
9446
|
/**
|
9447
|
+
* True if this mode is interlaced, false if not provided.
|
9448
|
+
* @since Chrome 74
|
9449
|
+
*/
|
9450
|
+
isInterlaced?: boolean;
|
9451
|
+
/**
|
9452
|
+
* The display mode UI scale factor.
|
9445
9453
|
* @deprecated Deprecated since Chrome 70. Use `displayZoomFactor`
|
9446
|
-
* @description The display mode UI scale factor.
|
9447
9454
|
*/
|
9448
|
-
uiScale
|
9449
|
-
|
9455
|
+
uiScale?: number;
|
9450
9456
|
/** The display mode device scale factor. */
|
9451
9457
|
deviceScaleFactor: number;
|
9452
|
-
|
9453
9458
|
/**
|
9454
9459
|
* The display mode refresh rate in hertz.
|
9455
9460
|
* @since Chrome 67
|
9456
9461
|
*/
|
9457
9462
|
refreshRate: number;
|
9458
|
-
|
9459
9463
|
/** True if the mode is the display's native mode. */
|
9460
9464
|
isNative: boolean;
|
9461
|
-
|
9462
9465
|
/** True if the display mode is currently selected. */
|
9463
9466
|
isSelected: boolean;
|
9464
9467
|
}
|
9465
9468
|
|
9466
|
-
/**
|
9467
|
-
* @since Chrome 53
|
9468
|
-
*/
|
9469
|
+
/** @since Chrome 53 */
|
9469
9470
|
export interface DisplayLayout {
|
9470
9471
|
/** The unique identifier of the display. */
|
9471
9472
|
id: string;
|
@@ -9474,17 +9475,14 @@ declare namespace chrome {
|
|
9474
9475
|
/**
|
9475
9476
|
* The layout position of this display relative to the parent.
|
9476
9477
|
* This will be ignored for the root.
|
9477
|
-
* @see enum
|
9478
9478
|
*/
|
9479
|
-
position:
|
9479
|
+
position: `${LayoutPosition}`;
|
9480
9480
|
/** The offset of the display along the connected edge. 0 indicates that the topmost or leftmost corners are aligned. */
|
9481
9481
|
offset: number;
|
9482
9482
|
}
|
9483
9483
|
|
9484
|
-
/**
|
9485
|
-
|
9486
|
-
*/
|
9487
|
-
export interface TouchCalibrationPairs {
|
9484
|
+
/** The pairs of point used to calibrate the display. */
|
9485
|
+
export interface TouchCalibrationPairQuad {
|
9488
9486
|
/** First pair of touch and display point required for touch calibration. */
|
9489
9487
|
pair1: TouchCalibrationPair;
|
9490
9488
|
/** Second pair of touch and display point required for touch calibration. */
|
@@ -9495,49 +9493,38 @@ declare namespace chrome {
|
|
9495
9493
|
pair4: TouchCalibrationPair;
|
9496
9494
|
}
|
9497
9495
|
|
9498
|
-
|
9499
|
-
* Representation of info data to be used in chrome.system.display.setDisplayProperties()
|
9500
|
-
*/
|
9501
|
-
export interface DisplayPropertiesInfo {
|
9496
|
+
export interface DisplayProperties {
|
9502
9497
|
/**
|
9503
|
-
*
|
9504
|
-
* @description
|
9505
|
-
* If set to true, changes the display mode to unified desktop.
|
9498
|
+
* If set to true, changes the display mode to unified desktop (see `enableUnifiedDesktop` for details).
|
9506
9499
|
* If set to false, unified desktop mode will be disabled.
|
9507
9500
|
* This is only valid for the primary display.
|
9508
|
-
* If provided, mirroringSourceId must not be provided and other properties
|
9501
|
+
* If provided, mirroringSourceId must not be provided and other properties will be ignored.
|
9509
9502
|
* This is has no effect if not provided.
|
9510
|
-
* @
|
9503
|
+
* @platform ChromeOS only
|
9511
9504
|
* @since Chrome 59
|
9512
9505
|
*/
|
9513
9506
|
isUnified?: boolean | undefined;
|
9514
|
-
|
9515
9507
|
/**
|
9516
|
-
*
|
9517
|
-
*
|
9518
|
-
*
|
9519
|
-
* @description
|
9520
|
-
* If set and not empty, enables mirroring for this display.
|
9521
|
-
* Otherwise disables mirroring for this display.
|
9522
|
-
* This value should indicate the id of the source display to mirror,
|
9523
|
-
* which must not be the same as the id passed to setDisplayProperties.
|
9508
|
+
* If set and not empty, enables mirroring for this display only.
|
9509
|
+
* Otherwise disables mirroring for all displays.
|
9510
|
+
* This value should indicate the id of the source display to mirror, which must not be the same as the id passed to setDisplayProperties.
|
9524
9511
|
* If set, no other property may be set.
|
9512
|
+
* @platform ChromeOS only
|
9513
|
+
* @deprecated Deprecated since Chrome 68. Use ´setMirrorMode´
|
9525
9514
|
*/
|
9526
9515
|
mirroringSourceId?: string | undefined;
|
9527
|
-
|
9528
9516
|
/**
|
9529
9517
|
* If set to true, makes the display primary.
|
9530
9518
|
* No-op if set to false.
|
9519
|
+
* Note: If set, the display is considered primary for all other properties (i.e. `isUnified` may be set and bounds origin may not).
|
9531
9520
|
*/
|
9532
9521
|
isPrimary?: boolean | undefined;
|
9533
|
-
|
9534
9522
|
/**
|
9535
9523
|
* If set, sets the display's overscan insets to the provided values.
|
9536
9524
|
* Note that overscan values may not be negative or larger than a half of the screen's size.
|
9537
|
-
* Overscan cannot be changed on the internal monitor.
|
9525
|
+
* Overscan cannot be changed on the internal monitor.
|
9538
9526
|
*/
|
9539
9527
|
overscan?: Insets | undefined;
|
9540
|
-
|
9541
9528
|
/**
|
9542
9529
|
* If set, updates the display's rotation.
|
9543
9530
|
* Legal values are [0, 90, 180, 270].
|
@@ -9545,38 +9532,31 @@ declare namespace chrome {
|
|
9545
9532
|
* It's applied after overscan parameter.
|
9546
9533
|
*/
|
9547
9534
|
rotation?: 0 | 90 | 180 | 270 | undefined;
|
9548
|
-
|
9549
9535
|
/**
|
9550
|
-
* If set, updates the display's logical bounds origin along x-axis.
|
9551
|
-
* Applied together with boundsOriginY
|
9552
|
-
*
|
9553
|
-
* so the final bounds origin may be different than the one set.
|
9554
|
-
* The final bounds can be retrieved using getInfo
|
9555
|
-
*
|
9556
|
-
* Note that is also invalid to set bounds origin values if isPrimary is also set
|
9557
|
-
* (as isPrimary parameter is applied first).
|
9536
|
+
* If set, updates the display's logical bounds origin along the x-axis.
|
9537
|
+
* Applied together with `boundsOriginY`.
|
9538
|
+
* Defaults to the current value if not set and `boundsOriginY` is set.
|
9539
|
+
* Note that when updating the display origin, some constraints will be applied, so the final bounds origin may be different than the one set.
|
9540
|
+
* The final bounds can be retrieved using `getInfo`.
|
9541
|
+
* The bounds origin cannot be changed on the primary display.
|
9558
9542
|
*/
|
9559
9543
|
boundsOriginX?: number | undefined;
|
9560
|
-
|
9561
9544
|
/**
|
9562
|
-
* If set, updates the display's logical bounds origin along y-axis.
|
9563
|
-
*
|
9545
|
+
* If set, updates the display's logical bounds origin along the y-axis.
|
9546
|
+
* See documentation for `boundsOriginX` parameter.
|
9564
9547
|
*/
|
9565
9548
|
boundsOriginY?: number | undefined;
|
9566
|
-
|
9567
9549
|
/**
|
9568
9550
|
* If set, updates the display mode to the mode matching this value.
|
9551
|
+
* If other parameters are invalid, this will not be applied.
|
9552
|
+
* If the display mode is invalid, it will not be applied and an error will be set, but other properties will still be applied.
|
9569
9553
|
* @since Chrome 52
|
9570
9554
|
*/
|
9571
9555
|
displayMode?: DisplayMode | undefined;
|
9572
|
-
|
9573
9556
|
/**
|
9574
|
-
* @since Chrome 65
|
9575
|
-
* @description
|
9576
9557
|
* If set, updates the zoom associated with the display.
|
9577
|
-
* This zoom performs re-layout and repaint thus resulting
|
9578
|
-
*
|
9579
|
-
* a pixel by pixel stretch enlargement.
|
9558
|
+
* This zoom performs re-layout and repaint thus resulting in a better quality zoom than just performing a pixel by pixel stretch enlargement.
|
9559
|
+
* @since Chrome 65
|
9580
9560
|
*/
|
9581
9561
|
displayZoomFactor?: number | undefined;
|
9582
9562
|
}
|
@@ -9585,10 +9565,9 @@ declare namespace chrome {
|
|
9585
9565
|
* Options affecting how the information is returned.
|
9586
9566
|
* @since Chrome 59
|
9587
9567
|
*/
|
9588
|
-
export interface
|
9568
|
+
export interface GetInfoFlags {
|
9589
9569
|
/**
|
9590
|
-
* If set to true, only a single DisplayUnitInfo will be returned by getInfo when in unified desktop mode.
|
9591
|
-
* @see enableUnifiedDesktop
|
9570
|
+
* If set to true, only a single `DisplayUnitInfo` will be returned by `getInfo` when in unified desktop mode (see `enableUnifiedDesktop`).
|
9592
9571
|
* @default false
|
9593
9572
|
*/
|
9594
9573
|
singleUnified?: boolean | undefined;
|
@@ -9600,51 +9579,37 @@ declare namespace chrome {
|
|
9600
9579
|
* This state is used to keep existing display when the all displays are disconnected, for example.
|
9601
9580
|
* @since Chrome 117
|
9602
9581
|
*/
|
9603
|
-
export
|
9582
|
+
export enum ActiveState {
|
9583
|
+
ACTIVE = "active",
|
9584
|
+
INACTIVE = "inactive",
|
9585
|
+
}
|
9604
9586
|
|
9605
|
-
|
9606
|
-
export interface DisplayInfo {
|
9587
|
+
export interface DisplayUnitInfo {
|
9607
9588
|
/**
|
9608
9589
|
* Active if the display is detected and used by the system.
|
9609
9590
|
* @since Chrome 117
|
9610
9591
|
*/
|
9611
|
-
activeState:
|
9592
|
+
activeState: `${ActiveState}`;
|
9612
9593
|
/** The unique identifier of the display. */
|
9613
9594
|
id: string;
|
9614
9595
|
/** The user-friendly name (e.g. 'HP LCD monitor'). */
|
9615
9596
|
name: string;
|
9616
9597
|
/**
|
9617
|
-
*
|
9598
|
+
* @platform ChromeOS and Web UI only
|
9618
9599
|
* @since Chrome 67
|
9619
9600
|
*/
|
9620
|
-
edid?:
|
9621
|
-
/**
|
9622
|
-
* 3 character manufacturer code.
|
9623
|
-
*/
|
9624
|
-
manufacturerId: string;
|
9625
|
-
/**
|
9626
|
-
* 2 byte manufacturer-assigned code.
|
9627
|
-
*/
|
9628
|
-
productId: string;
|
9629
|
-
/**
|
9630
|
-
* Year of manufacturer.
|
9631
|
-
*/
|
9632
|
-
yearOfManufacture?: string | undefined;
|
9633
|
-
} | undefined;
|
9601
|
+
edid?: Edid;
|
9634
9602
|
/**
|
9635
|
-
*
|
9636
|
-
*
|
9637
|
-
*
|
9638
|
-
* Currently exposed only on ChromeOS.
|
9639
|
-
* Will be empty string on other platforms.
|
9603
|
+
* Identifier of the display that is being mirrored if mirroring is enabled, otherwise empty.
|
9604
|
+
* This will be set for all displays (including the display being mirrored).
|
9605
|
+
* @platform ChromeOS only
|
9640
9606
|
*/
|
9641
9607
|
mirroringSourceId: string;
|
9642
9608
|
/**
|
9643
|
-
* requires(CrOS) Only available on Chrome OS.
|
9644
9609
|
* Identifiers of the displays to which the source display is being mirrored.
|
9645
|
-
* Empty if no displays are being mirrored.
|
9646
|
-
*
|
9647
|
-
*
|
9610
|
+
* Empty if no displays are being mirrored.
|
9611
|
+
* This must not include `mirroringSourceId`.
|
9612
|
+
* @platform ChromeOS only
|
9648
9613
|
* @since Chrome 64
|
9649
9614
|
*/
|
9650
9615
|
mirroringDestinationIds: string[];
|
@@ -9655,7 +9620,7 @@ declare namespace chrome {
|
|
9655
9620
|
/** True if this display is enabled. */
|
9656
9621
|
isEnabled: boolean;
|
9657
9622
|
/**
|
9658
|
-
* True for all displays when in unified desktop mode
|
9623
|
+
* True for all displays when in unified desktop mode. See documentation for `enableUnifiedDesktop`.
|
9659
9624
|
* @since Chrome 59
|
9660
9625
|
*/
|
9661
9626
|
isUnified: boolean;
|
@@ -9663,24 +9628,37 @@ declare namespace chrome {
|
|
9663
9628
|
dpiX: number;
|
9664
9629
|
/** The number of pixels per inch along the y-axis. */
|
9665
9630
|
dpiY: number;
|
9666
|
-
/** The display's clockwise rotation in degrees relative to the vertical position.
|
9631
|
+
/** The display's clockwise rotation in degrees relative to the vertical position.
|
9632
|
+
* Currently exposed only on ChromeOS. Will be set to 0 on other platforms.
|
9633
|
+
* A value of -1 will be interpreted as auto-rotate when the device is in a physical tablet state.
|
9634
|
+
* @platform ChromeOS only
|
9635
|
+
*/
|
9667
9636
|
rotation: number;
|
9668
9637
|
/** The display's logical bounds. */
|
9669
9638
|
bounds: Bounds;
|
9670
|
-
/**
|
9639
|
+
/**
|
9640
|
+
* The display's insets within its screen's bounds.
|
9641
|
+
* Currently exposed only on ChromeOS. Will be set to empty insets on other platforms.
|
9642
|
+
* @platform ChromeOS only
|
9643
|
+
*/
|
9671
9644
|
overscan: Insets;
|
9672
|
-
/**
|
9645
|
+
/**
|
9646
|
+
* The usable work area of the display within the display bounds.
|
9647
|
+
* The work area excludes areas of the display reserved for OS, for example taskbar and launcher.
|
9648
|
+
*/
|
9673
9649
|
workArea: Bounds;
|
9674
9650
|
/**
|
9675
|
-
* requires(CrOS) Only available on Chrome OS.
|
9676
9651
|
* The list of available display modes.
|
9677
9652
|
* The current mode will have isSelected=true.
|
9678
|
-
* Only available on Chrome OS.
|
9679
9653
|
* Will be set to an empty array on other platforms.
|
9654
|
+
* @platform ChromeOS only
|
9680
9655
|
* @since Chrome 52
|
9681
9656
|
*/
|
9682
9657
|
modes: DisplayMode[];
|
9683
|
-
/**
|
9658
|
+
/**
|
9659
|
+
* True if this display has a touch input device associated with it.
|
9660
|
+
* @since Chrome 57
|
9661
|
+
*/
|
9684
9662
|
hasTouchSupport: boolean;
|
9685
9663
|
/**
|
9686
9664
|
* A list of zoom factor values that can be set for the display.
|
@@ -9695,20 +9673,25 @@ declare namespace chrome {
|
|
9695
9673
|
displayZoomFactor: number;
|
9696
9674
|
}
|
9697
9675
|
|
9676
|
+
/** @since Chrome 67 */
|
9677
|
+
export interface Edid {
|
9678
|
+
/** 3 character manufacturer code. */
|
9679
|
+
manufacturerId: string;
|
9680
|
+
/** 2 byte manufacturer-assigned code. */
|
9681
|
+
productId: string;
|
9682
|
+
/** Year of manufacturer. */
|
9683
|
+
yearOfManufacture: number;
|
9684
|
+
}
|
9685
|
+
|
9698
9686
|
export interface MirrorModeInfo {
|
9699
|
-
/**
|
9700
|
-
|
9701
|
-
* **off**
|
9702
|
-
* Use the default mode (extended or unified desktop).
|
9703
|
-
* **normal**
|
9704
|
-
* The default source display will be mirrored to all other displays.
|
9705
|
-
* **mixed**
|
9706
|
-
* The specified source display will be mirrored to the provided destination displays. All other connected displays will be extended.
|
9707
|
-
*/
|
9708
|
-
mode?: "off" | "normal" | "mixed" | undefined;
|
9687
|
+
/** The mirror mode that should be set. */
|
9688
|
+
mode?: `${MirrorMode}`;
|
9709
9689
|
}
|
9690
|
+
|
9710
9691
|
export interface MirrorModeInfoMixed extends MirrorModeInfo {
|
9692
|
+
/** The mirror mode that should be set. */
|
9711
9693
|
mode: "mixed";
|
9694
|
+
/** The id of the mirroring source display. */
|
9712
9695
|
mirroringSourceId?: string | undefined;
|
9713
9696
|
/** The ids of the mirroring destination displays. */
|
9714
9697
|
mirroringDestinationIds?: string[] | undefined;
|
@@ -9716,116 +9699,71 @@ declare namespace chrome {
|
|
9716
9699
|
|
9717
9700
|
/**
|
9718
9701
|
* Requests the information for all attached display devices.
|
9719
|
-
*
|
9720
|
-
*/
|
9721
|
-
export function getInfo(callback: (info: DisplayInfo[]) => void): void;
|
9722
|
-
/**
|
9723
|
-
* Requests the information for all attached display devices.
|
9724
|
-
* @return The `getInfo` method provides its result via callback or returned as a `Promise` (MV3 only).
|
9725
|
-
*/
|
9726
|
-
export function getInfo(): Promise<DisplayInfo[]>;
|
9727
|
-
/**
|
9728
|
-
* Requests the information for all attached display devices.
|
9729
|
-
* @since Chrome 59
|
9730
|
-
* @param flags Options affecting how the information is returned.
|
9731
|
-
* @param callback The callback to invoke with the results.
|
9732
|
-
*/
|
9733
|
-
export function getInfo(flags: DisplayInfoFlags, callback: (info: DisplayInfo[]) => void): void;
|
9734
|
-
/**
|
9735
|
-
* Requests the information for all attached display devices.
|
9736
|
-
* @since Chrome 59
|
9702
|
+
* Can return its result via Promise in Manifest V3 or later since Chrome 91.
|
9737
9703
|
* @param flags Options affecting how the information is returned.
|
9738
|
-
* @return The `getInfo` method provides its result via callback or returned as a `Promise` (MV3 only).
|
9739
9704
|
*/
|
9740
|
-
export function getInfo(
|
9705
|
+
export function getInfo(callback: (displayInfo: DisplayUnitInfo[]) => void): void;
|
9706
|
+
export function getInfo(flags: GetInfoFlags, callback: (displayInfo: DisplayUnitInfo[]) => void): void;
|
9707
|
+
export function getInfo(): Promise<DisplayUnitInfo[]>;
|
9708
|
+
export function getInfo(flags: GetInfoFlags): Promise<DisplayUnitInfo[]>;
|
9741
9709
|
|
9742
9710
|
/**
|
9743
|
-
*
|
9744
|
-
*
|
9711
|
+
* Requests the layout info for all displays
|
9712
|
+
* Can return its result via Promise in Manifest V3 or later since Chrome 91.
|
9713
|
+
* @platform ChromeOS and Web UI only
|
9745
9714
|
* @since Chrome 53
|
9746
|
-
* @param callback The callback to invoke with the results.
|
9747
9715
|
*/
|
9748
9716
|
export function getDisplayLayout(callback: (layouts: DisplayLayout[]) => void): void;
|
9749
|
-
|
9750
|
-
/**
|
9751
|
-
* requires(CrOS Kiosk apps | WebUI) This is only available to Chrome OS Kiosk apps and Web UI.
|
9752
|
-
* @description Requests the layout info for all displays.
|
9753
|
-
* @since Chrome 53
|
9754
|
-
* @return The getDisplayLayout method provides its result via callback or returned as a Promise (MV3 only).
|
9755
|
-
*/
|
9756
9717
|
export function getDisplayLayout(): Promise<DisplayLayout[]>;
|
9757
9718
|
|
9758
9719
|
/**
|
9759
9720
|
* requires(CrOS Kiosk apps | WebUI) This is only available to Chrome OS Kiosk apps and Web UI.
|
9760
9721
|
* @description
|
9761
|
-
* Updates the properties for the display specified by
|
9762
|
-
* according to the information provided in
|
9763
|
-
* On failure, runtime.lastError will be set.
|
9764
|
-
* @
|
9765
|
-
* @param info The information about display properties that should be changed. A property will be changed only if a new value for it is specified in |info|.
|
9766
|
-
* @return The `setDisplayProperties` method provides its result via callback or returned as a `Promise` (MV3 only). It has no parameters. To find out whether the function succeeded, runtime.lastError should be queried.
|
9767
|
-
*/
|
9768
|
-
export function setDisplayProperties(id: string, info: DisplayPropertiesInfo): Promise<void>;
|
9769
|
-
|
9770
|
-
/**
|
9771
|
-
* requires(CrOS Kiosk apps | WebUI) This is only available to Chrome OS Kiosk apps and Web UI.
|
9772
|
-
* @description
|
9773
|
-
* Updates the properties for the display specified by **id**,
|
9774
|
-
* according to the information provided in **info**.
|
9775
|
-
* On failure, runtime.lastError will be set.
|
9722
|
+
* Updates the properties for the display specified by `id`,
|
9723
|
+
* according to the information provided in `info`.
|
9724
|
+
* On failure, `runtime.lastError` will be set.
|
9725
|
+
* @platform ChromeOS and Web UI only
|
9776
9726
|
* @param id The display's unique identifier.
|
9777
|
-
* @param info The information about display properties that should be changed. A property will be changed only if a new value for it is specified in
|
9778
|
-
* @param [callback] Empty function called when the function finishes. To find out whether the function succeeded, runtime.lastError should be queried.
|
9779
|
-
*/
|
9780
|
-
export function setDisplayProperties(id: string, info: DisplayPropertiesInfo, callback: () => void): void;
|
9781
|
-
|
9782
|
-
/**
|
9783
|
-
* requires(CrOS Kiosk apps | WebUI) This is only available to Chrome OS Kiosk apps and Web UI.
|
9784
|
-
* @description
|
9785
|
-
* Set the layout for all displays.
|
9786
|
-
* Any display not included will use the default layout.
|
9787
|
-
* If a layout would overlap or be otherwise invalid it will be adjusted to a valid layout.
|
9788
|
-
* After layout is resolved, an onDisplayChanged event will be triggered.
|
9789
|
-
* @since Chrome 53
|
9790
|
-
* @param layouts The layout information, required for all displays except the primary display.
|
9791
|
-
* @return The `setDisplayLayout` method provides its result via callback or returned as a `Promise` (MV3 only). It has no parameters. To find out whether the function succeeded, runtime.lastError should be queried.
|
9727
|
+
* @param info The information about display properties that should be changed. A property will be changed only if a new value for it is specified in `info`.
|
9792
9728
|
*/
|
9793
|
-
export function
|
9729
|
+
export function setDisplayProperties(id: string, info: DisplayProperties, callback: () => void): void;
|
9730
|
+
export function setDisplayProperties(id: string, info: DisplayProperties): Promise<void>;
|
9794
9731
|
|
9795
9732
|
/**
|
9796
|
-
* requires(CrOS Kiosk apps | WebUI) This is only available to Chrome OS Kiosk apps and Web UI.
|
9797
|
-
* @description
|
9798
9733
|
* Set the layout for all displays.
|
9799
9734
|
* Any display not included will use the default layout.
|
9800
9735
|
* If a layout would overlap or be otherwise invalid it will be adjusted to a valid layout.
|
9801
9736
|
* After layout is resolved, an onDisplayChanged event will be triggered.
|
9737
|
+
* Can return its result via Promise in Manifest V3 or later since Chrome 91.
|
9738
|
+
* @platform ChromeOS and Web UI only
|
9802
9739
|
* @since Chrome 53
|
9803
9740
|
* @param layouts The layout information, required for all displays except the primary display.
|
9804
|
-
* @param callback Empty function called when the function finishes. To find out whether the function succeeded, runtime.lastError should be queried.
|
9805
9741
|
*/
|
9806
9742
|
export function setDisplayLayout(layouts: DisplayLayout[], callback: () => void): void;
|
9743
|
+
export function setDisplayLayout(layouts: DisplayLayout[]): Promise<void>;
|
9807
9744
|
|
9808
9745
|
/**
|
9809
|
-
* requires(CrOS Kiosk apps | WebUI) This is only available to Chrome OS Kiosk apps and Web UI.
|
9810
|
-
* @description
|
9811
9746
|
* Enables/disables the unified desktop feature.
|
9812
|
-
*
|
9813
|
-
*
|
9747
|
+
* If enabled while mirroring is active, the desktop mode will not change until mirroring is turned off.
|
9748
|
+
* Otherwise, the desktop mode will switch to unified immediately.
|
9814
9749
|
* @since Chrome 46
|
9750
|
+
* @platform ChromeOS and Web UI only
|
9815
9751
|
* @param enabled True if unified desktop should be enabled.
|
9816
9752
|
*/
|
9817
9753
|
export function enableUnifiedDesktop(enabled: boolean): void;
|
9754
|
+
|
9818
9755
|
/**
|
9819
9756
|
* Starts overscan calibration for a display.
|
9820
9757
|
* This will show an overlay on the screen indicating the current overscan insets.
|
9821
|
-
* If overscan calibration for display
|
9758
|
+
* If overscan calibration for display `id` is in progress this will reset calibration.
|
9822
9759
|
* @since Chrome 53
|
9823
9760
|
* @param id The display's unique identifier.
|
9824
9761
|
*/
|
9825
9762
|
export function overscanCalibrationStart(id: string): void;
|
9763
|
+
|
9826
9764
|
/**
|
9827
9765
|
* Adjusts the current overscan insets for a display.
|
9828
|
-
* Typically this should
|
9766
|
+
* Typically this should either move the display along an axis (e.g. left+right have the same value)
|
9829
9767
|
* or scale it along an axis (e.g. top+bottom have opposite values).
|
9830
9768
|
* Each Adjust call is cumulative with previous calls since Start.
|
9831
9769
|
* @since Chrome 53
|
@@ -9849,25 +9787,15 @@ declare namespace chrome {
|
|
9849
9787
|
export function overscanCalibrationComplete(id: string): void;
|
9850
9788
|
|
9851
9789
|
/**
|
9852
|
-
* Displays the native touch calibration UX for the display with
|
9790
|
+
* Displays the native touch calibration UX for the display with `id` as display id.
|
9853
9791
|
* This will show an overlay on the screen with required instructions on how to proceed.
|
9854
|
-
* The callback will be invoked in case of successful
|
9792
|
+
* The callback will be invoked in case of successful calibration only.
|
9855
9793
|
* If the calibration fails, this will throw an error.
|
9794
|
+
* Can return its result via Promise in Manifest V3 or later since Chrome 91.
|
9856
9795
|
* @since Chrome 57
|
9857
9796
|
* @param id The display's unique identifier.
|
9858
|
-
* @param callback Optional callback to inform the caller that the touch calibration has ended. The argument of the callback informs if the calibration was a success or not.
|
9859
9797
|
*/
|
9860
9798
|
export function showNativeTouchCalibration(id: string, callback: (success: boolean) => void): void;
|
9861
|
-
|
9862
|
-
/**
|
9863
|
-
* Displays the native touch calibration UX for the display with **id** as display id.
|
9864
|
-
* This will show an overlay on the screen with required instructions on how to proceed.
|
9865
|
-
* The callback will be invoked in case of successful calibraion only.
|
9866
|
-
* If the calibration fails, this will throw an error.
|
9867
|
-
* @since Chrome 57
|
9868
|
-
* @param id The display's unique identifier.
|
9869
|
-
* @return The `showNativeTouchCalibration` method provides its result via callback or returned as a `Promise` (MV3 only).
|
9870
|
-
*/
|
9871
9799
|
export function showNativeTouchCalibration(id: string): Promise<boolean>;
|
9872
9800
|
|
9873
9801
|
/**
|
@@ -9881,15 +9809,15 @@ declare namespace chrome {
|
|
9881
9809
|
|
9882
9810
|
/**
|
9883
9811
|
* Sets the touch calibration pairs for a display.
|
9884
|
-
* These
|
9885
|
-
* Always call
|
9812
|
+
* These `pairs` would be used to calibrate the touch screen for display with `id` called in startCustomTouchCalibration().
|
9813
|
+
* Always call `startCustomTouchCalibration` before calling this method.
|
9886
9814
|
* If another touch calibration is already in progress this will throw an error.
|
9887
9815
|
* @since Chrome 57
|
9888
9816
|
* @param pairs The pairs of point used to calibrate the display.
|
9889
|
-
* @param bounds Bounds of the display when the touch calibration was performed.
|
9817
|
+
* @param bounds Bounds of the display when the touch calibration was performed. `bounds.left` and `bounds.top` values are ignored.
|
9890
9818
|
* @throws Error
|
9891
9819
|
*/
|
9892
|
-
export function completeCustomTouchCalibration(pairs:
|
9820
|
+
export function completeCustomTouchCalibration(pairs: TouchCalibrationPairQuad, bounds: Bounds): void;
|
9893
9821
|
|
9894
9822
|
/**
|
9895
9823
|
* Resets the touch calibration for the display and brings it back to its default state by clearing any touch calibration data associated with the display.
|
@@ -9899,31 +9827,17 @@ declare namespace chrome {
|
|
9899
9827
|
export function clearTouchCalibration(id: string): void;
|
9900
9828
|
|
9901
9829
|
/**
|
9902
|
-
* requires(CrOS Kiosk app) Chrome OS Kiosk apps only
|
9903
|
-
* @since Chrome 65
|
9904
|
-
* @description
|
9905
9830
|
* Sets the display mode to the specified mirror mode.
|
9906
9831
|
* Each call resets the state from previous calls.
|
9907
|
-
* Calling setDisplayProperties() will fail for the
|
9908
|
-
*
|
9909
|
-
|
9910
|
-
export function setMirrorMode(info: MirrorModeInfo | MirrorModeInfoMixed, callback: () => void): void;
|
9911
|
-
|
9912
|
-
/**
|
9913
|
-
* requires(CrOS Kiosk app) Chrome OS Kiosk apps only
|
9832
|
+
* Calling setDisplayProperties() will fail for the mirroring destination displays.
|
9833
|
+
* @platform ChromeOS and Web UI only
|
9834
|
+
* @param info The information of the mirror mode that should be applied to the display mode.
|
9914
9835
|
* @since Chrome 65
|
9915
|
-
* @description
|
9916
|
-
* Sets the display mode to the specified mirror mode.
|
9917
|
-
* Each call resets the state from previous calls.
|
9918
|
-
* Calling setDisplayProperties() will fail for the
|
9919
|
-
* mirroring destination displays.
|
9920
|
-
* @return The `setMirrorMode` method provides its result via callback or returned as a `Promise` (MV3 only). It has no parameters.
|
9921
9836
|
*/
|
9837
|
+
export function setMirrorMode(info: MirrorModeInfo | MirrorModeInfoMixed, callback: () => void): void;
|
9922
9838
|
export function setMirrorMode(info: MirrorModeInfo | MirrorModeInfoMixed): Promise<void>;
|
9923
9839
|
|
9924
|
-
/**
|
9925
|
-
* Fired when anything changes to the display configuration.
|
9926
|
-
*/
|
9840
|
+
/** Fired when anything changes to the display configuration. */
|
9927
9841
|
export const onDisplayChanged: chrome.events.Event<() => void>;
|
9928
9842
|
}
|
9929
9843
|
|
chrome/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@types/chrome",
|
3
|
-
"version": "0.0.
|
3
|
+
"version": "0.0.287",
|
4
4
|
"description": "TypeScript definitions for chrome",
|
5
5
|
"homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/chrome",
|
6
6
|
"license": "MIT",
|
@@ -94,6 +94,6 @@
|
|
94
94
|
"@types/har-format": "*"
|
95
95
|
},
|
96
96
|
"peerDependencies": {},
|
97
|
-
"typesPublisherContentHash": "
|
97
|
+
"typesPublisherContentHash": "93718a3e0ce89514577fd2476b8b954fad422c79dda8f5cab5509b57e4a7da16",
|
98
98
|
"typeScriptVersion": "5.0"
|
99
99
|
}
|