mirror of
https://github.com/wassname/DefinitelyTyped.git
synced 2026-09-09 11:13:57 +08:00
Added/Updated types /w docs
This commit is contained in:
Vendored
+49
-1
@@ -7213,13 +7213,38 @@ declare module chrome.ttsEngine {
|
||||
////////////////////
|
||||
// Types
|
||||
////////////////////
|
||||
/**
|
||||
* The chrome.types API contains type declarations for Chrome.
|
||||
* @since Chrome 13.
|
||||
*/
|
||||
declare module chrome.types {
|
||||
interface ChromeSettingClearDetails {
|
||||
/**
|
||||
* Optional.
|
||||
* The scope of the ChromeSetting. One of
|
||||
* • regular: setting for the regular profile (which is inherited by the incognito profile if not overridden elsewhere),
|
||||
* • regular_only: setting for the regular profile only (not inherited by the incognito profile),
|
||||
* • incognito_persistent: setting for the incognito profile that survives browser restarts (overrides regular preferences),
|
||||
* • incognito_session_only: setting for the incognito profile that can only be set during an incognito session and is deleted when the incognito session ends (overrides regular and incognito_persistent preferences).
|
||||
*/
|
||||
scope?: string;
|
||||
}
|
||||
|
||||
interface ChromeSettingSetDetails extends ChromeSettingClearDetails {
|
||||
/**
|
||||
* The value of the setting.
|
||||
* Note that every setting has a specific value type, which is described together with the setting. An extension should not set a value of a different type.
|
||||
*/
|
||||
value: any;
|
||||
/**
|
||||
* Optional.
|
||||
* The scope of the ChromeSetting. One of
|
||||
* • regular: setting for the regular profile (which is inherited by the incognito profile if not overridden elsewhere),
|
||||
* • regular_only: setting for the regular profile only (not inherited by the incognito profile),
|
||||
* • incognito_persistent: setting for the incognito profile that survives browser restarts (overrides regular preferences),
|
||||
* • incognito_session_only: setting for the incognito profile that can only be set during an incognito session and is deleted when the incognito session ends (overrides regular and incognito_persistent preferences).
|
||||
*/
|
||||
scope?: string;
|
||||
}
|
||||
|
||||
interface ChromeSettingGetDetails {
|
||||
@@ -7233,8 +7258,21 @@ declare module chrome.types {
|
||||
type DetailsCallback = (details: ChromeSettingGetResultDetails) => void;
|
||||
|
||||
interface ChromeSettingGetResultDetails {
|
||||
/**
|
||||
* One of
|
||||
* • not_controllable: cannot be controlled by any extension
|
||||
* • controlled_by_other_extensions: controlled by extensions with higher precedence
|
||||
* • controllable_by_this_extension: can be controlled by this extension
|
||||
* • controlled_by_this_extension: controlled by this extension
|
||||
*/
|
||||
levelOfControl: string;
|
||||
/** The value of the setting. */
|
||||
value: any;
|
||||
/**
|
||||
* Optional.
|
||||
* Whether the effective value is specific to the incognito session.
|
||||
* This property will only be present if the incognito property in the details parameter of get() was true.
|
||||
*/
|
||||
incognitoSpecific?: boolean;
|
||||
}
|
||||
|
||||
@@ -7244,14 +7282,24 @@ declare module chrome.types {
|
||||
|
||||
/** An interface that allows access to a Chrome browser setting. See accessibilityFeatures for an example. */
|
||||
interface ChromeSetting {
|
||||
|
||||
/**
|
||||
* Sets the value of a setting.
|
||||
* @param details Which setting to change.
|
||||
* @param callback Optional. Called at the completion of the set operation.
|
||||
*/
|
||||
set(details: ChromeSettingSetDetails, callback?: Function): void;
|
||||
/**
|
||||
* Gets the value of a setting.
|
||||
* @param details Which setting to consider.
|
||||
*/
|
||||
get(details: ChromeSettingGetDetails, callback?: DetailsCallback): void;
|
||||
/**
|
||||
* Clears the setting, restoring any default value.
|
||||
* @param details Which setting to clear.
|
||||
* @param callback Optional. Called at the completion of the clear operation.
|
||||
*/
|
||||
clear(details: ChromeSettingClearDetails, callback?: Function): void;
|
||||
/** Fired after the setting changes. */
|
||||
onChange: ChromeSettingChangedEvent;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user