shared/ipc/shell-contracts
Type Aliases
Section titled “Type Aliases”BarItem
Section titled “BarItem”BarItem =
v.InferOutput<typeofBarItem>
Defined in: app/src/shared/ipc/shell-contracts.ts:51
A bookmark or folder of the bookmarks bar.
FindState
Section titled “FindState”FindState =
v.InferOutput<typeofFindState>
Defined in: app/src/shared/ipc/shell-contracts.ts:60
The find bar of the active tab.
ShellState
Section titled “ShellState”ShellState =
v.InferOutput<typeofShellState>
Defined in: app/src/shared/ipc/shell-contracts.ts:83
Everything the shell renders.
TabProblem
Section titled “TabProblem”TabProblem =
v.InferOutput<typeofTabProblem>
Defined in: app/src/shared/ipc/shell-contracts.ts:18
Why a tab shows no page.
TabView
Section titled “TabView”TabView =
v.InferOutput<typeofTabView>
Defined in: app/src/shared/ipc/shell-contracts.ts:34
One tab as the shell displays it.
Variables
Section titled “Variables”ActivateTab
Section titled “ActivateTab”
constActivateTab:RequestContract<{tabId:string; },null>
Defined in: app/src/shared/ipc/shell-contracts.ts:114
Shows a tab.
BarItem
Section titled “BarItem”
constBarItem:StrictObjectSchema<{id:NumberSchema<undefined>;title:StringSchema<undefined>;url:NullableSchema<StringSchema<undefined>,undefined>; },undefined>
Defined in: app/src/shared/ipc/shell-contracts.ts:51
A bookmark or folder of the bookmarks bar; folders have no address.
CloseTab
Section titled “CloseTab”
constCloseTab:RequestContract<{tabId:string; },null>
Defined in: app/src/shared/ipc/shell-contracts.ts:122
Closes a tab.
constDone:NullSchema<undefined>
Defined in: app/src/shared/ipc/shell-contracts.ts:10
A response without a payload.
constEmpty:StrictObjectSchema<{ },undefined>
Defined in: app/src/shared/ipc/shell-contracts.ts:8
A request without a payload.
FindState
Section titled “FindState”
constFindState:StrictObjectSchema<{active:SchemaWithPipe<readonly [NumberSchema<undefined>,IntegerAction<number,undefined>,MinValueAction<number,0,undefined>]>;matches:SchemaWithPipe<readonly [NumberSchema<undefined>,IntegerAction<number,undefined>,MinValueAction<number,0,undefined>]>;query:SchemaWithPipe<readonly [StringSchema<undefined>,MaxLengthAction<string,1000,undefined>]>; },undefined>
Defined in: app/src/shared/ipc/shell-contracts.ts:60
The find bar of the active tab: what it looks for, the current match and their number.
GetShellState
Section titled “GetShellState”
constGetShellState:RequestContract<{ }, {activeTabId:string|null;bookmarksBar:object[] |null;downloads: {active:number;progress:number|null; } |null;find: {active:number;matches:number;query:string; } |null;private:boolean;tabs:object[];tabStrip:"left"|"top"|"bottom"|"right"; }>
Defined in: app/src/shared/ipc/shell-contracts.ts:98
Returns the current state; the shell calls it once at startup.
NavigateTab
Section titled “NavigateTab”
constNavigateTab:RequestContract<{input:string;tabId:string; },null>
Defined in: app/src/shared/ipc/shell-contracts.ts:130
Navigates a tab to what the user typed in the address bar.
OpenTab
Section titled “OpenTab”
constOpenTab:RequestContract<{input?:string; }, {tabId:string; }>
Defined in: app/src/shared/ipc/shell-contracts.ts:106
Opens a new tab, optionally with a URL or search input.
SetShellInsets
Section titled “SetShellInsets”
constSetShellInsets:RequestContract<{bottom:number;left:number;right:number;top:number; },null>
Defined in: app/src/shared/ipc/shell-contracts.ts:152
Space the shell occupies at the window edges, in CSS pixels; web content fills the rest.
ShellCommand
Section titled “ShellCommand”
constShellCommand:EventContract<"omnibox.focus"|"find.focus"|"downloads.open">
Defined in: app/src/shared/ipc/shell-contracts.ts:173
Asks the shell to run a UI command, such as focusing the address bar after a shortcut.
shellRequests
Section titled “shellRequests”
constshellRequests: readonlyRequestContract<unknown,unknown>[]
Defined in: app/src/shared/ipc/shell-contracts.ts:183
The request contracts of the shell that its first paint needs; the others are in
shell-later-contracts.ts.
ShellState
Section titled “ShellState”
constShellState:StrictObjectSchema<{activeTabId:NullableSchema<SchemaWithPipe<readonly [StringSchema<undefined>,RegexAction<string,undefined>]>,undefined>;bookmarksBar:NullableSchema<ArraySchema<StrictObjectSchema<{id:NumberSchema<undefined>;title:StringSchema<undefined>;url:NullableSchema<StringSchema<undefined>,undefined>; },undefined>,undefined>,undefined>;downloads:NullableSchema<StrictObjectSchema<{active:SchemaWithPipe<readonly [NumberSchema<undefined>,IntegerAction<number,undefined>,MinValueAction<number,0,undefined>]>;progress:NullableSchema<SchemaWithPipe<readonly [NumberSchema<undefined>,MinValueAction<number,0,undefined>,MaxValueAction<number,1,undefined>]>,undefined>; },undefined>,undefined>;find:NullableSchema<StrictObjectSchema<{active:SchemaWithPipe<readonly [NumberSchema<undefined>,IntegerAction<number,undefined>,MinValueAction<number,0,undefined>]>;matches:SchemaWithPipe<readonly [NumberSchema<undefined>,IntegerAction<number,undefined>,MinValueAction<number,0,undefined>]>;query:SchemaWithPipe<readonly [StringSchema<undefined>,MaxLengthAction<string,1000,undefined>]>; },undefined>,undefined>;private:BooleanSchema<undefined>;tabs:ArraySchema<StrictObjectSchema<{blocked:SchemaWithPipe<readonly [NumberSchema<undefined>,IntegerAction<number,undefined>,MinValueAction<number,0,undefined>]>;blocking:PicklistSchema<["on","off","none","failed"],undefined>;bookmarked:BooleanSchema<undefined>;canGoBack:BooleanSchema<undefined>;canGoForward:BooleanSchema<undefined>;id:SchemaWithPipe<readonly [StringSchema<undefined>,RegexAction<string,undefined>]>;loading:BooleanSchema<undefined>;problem:NullableSchema<StrictObjectSchema<{code:SchemaWithPipe<readonly [StringSchema<…>,RegexAction<…, …>]>;kind:PicklistSchema<["error","certificate","crashed"],undefined>;proceed:BooleanSchema<undefined>;url:SchemaWithPipe<readonly [StringSchema<…>,MaxLengthAction<…, …, …>]>; },undefined>,undefined>;title:StringSchema<undefined>;url:StringSchema<undefined>;zoom:SchemaWithPipe<readonly [NumberSchema<undefined>,MinValueAction<number,0.25,undefined>,MaxValueAction<number,5,undefined>]>; },undefined>,undefined>;tabStrip:PicklistSchema<readonly ["top","bottom","left","right"],undefined>; },undefined>
Defined in: app/src/shared/ipc/shell-contracts.ts:83
Everything the shell renders. Sent as a whole after changes, at most once per frame.
bookmarksBar is null while the bookmarks bar is hidden, find while the find bar is
closed, and downloads until the browser downloaded something; private tells whether
the window is a private window.
ShellStateChanged
Section titled “ShellStateChanged”
constShellStateChanged:EventContract<{activeTabId:string|null;bookmarksBar:object[] |null;downloads: {active:number;progress:number|null; } |null;find: {active:number;matches:number;query:string; } |null;private:boolean;tabs:object[];tabStrip:"left"|"top"|"bottom"|"right"; }>
Defined in: app/src/shared/ipc/shell-contracts.ts:166
Sent to the shell when its state changed.
TabAction
Section titled “TabAction”
constTabAction:RequestContract<{action:"back"|"forward"|"reload"|"stop";tabId:string; },null>
Defined in: app/src/shared/ipc/shell-contracts.ts:141
History and loading actions of a tab.
constTabId:SchemaWithPipe<readonly [StringSchema<undefined>,RegexAction<string,undefined>]>
Defined in: app/src/shared/ipc/shell-contracts.ts:6
The id of a tab.
TabProblem
Section titled “TabProblem”
constTabProblem:StrictObjectSchema<{code:SchemaWithPipe<readonly [StringSchema<undefined>,RegexAction<string,undefined>]>;kind:PicklistSchema<["error","certificate","crashed"],undefined>;proceed:BooleanSchema<undefined>;url:SchemaWithPipe<readonly [StringSchema<undefined>,MaxLengthAction<string,8192,undefined>]>; },undefined>
Defined in: app/src/shared/ipc/shell-contracts.ts:18
Why a tab shows no page: it could not be loaded (error), the certificate of its site is
not trusted (certificate), or its renderer is gone (crashed). code is Chromium’s
name for the cause, such as ERR_CONNECTION_REFUSED; proceed tells whether the user
may continue to the page after the warning.
TabView
Section titled “TabView”
constTabView:StrictObjectSchema<{blocked:SchemaWithPipe<readonly [NumberSchema<undefined>,IntegerAction<number,undefined>,MinValueAction<number,0,undefined>]>;blocking:PicklistSchema<["on","off","none","failed"],undefined>;bookmarked:BooleanSchema<undefined>;canGoBack:BooleanSchema<undefined>;canGoForward:BooleanSchema<undefined>;id:SchemaWithPipe<readonly [StringSchema<undefined>,RegexAction<string,undefined>]>;loading:BooleanSchema<undefined>;problem:NullableSchema<StrictObjectSchema<{code:SchemaWithPipe<readonly [StringSchema<undefined>,RegexAction<string,undefined>]>;kind:PicklistSchema<["error","certificate","crashed"],undefined>;proceed:BooleanSchema<undefined>;url:SchemaWithPipe<readonly [StringSchema<undefined>,MaxLengthAction<string,8192,undefined>]>; },undefined>,undefined>;title:StringSchema<undefined>;url:StringSchema<undefined>;zoom:SchemaWithPipe<readonly [NumberSchema<undefined>,MinValueAction<number,0.25,undefined>,MaxValueAction<number,5,undefined>]>; },undefined>
Defined in: app/src/shared/ipc/shell-contracts.ts:34
One tab as the shell displays it. blocked counts the requests that the content blocker
blocked on the current page; blocking tells whether the blocker works on the page, with
none for pages it never touches; bookmarked tells whether the page has a bookmark;
problem why the tab shows no page, which the shell then shows in its place;
zoom the zoom factor of the page, 1 for 100 %.