Skip to content

shared/ipc/shell-contracts

BarItem = v.InferOutput<typeof BarItem>

Defined in: app/src/shared/ipc/shell-contracts.ts:51

A bookmark or folder of the bookmarks bar.


FindState = v.InferOutput<typeof FindState>

Defined in: app/src/shared/ipc/shell-contracts.ts:60

The find bar of the active tab.


ShellState = v.InferOutput<typeof ShellState>

Defined in: app/src/shared/ipc/shell-contracts.ts:83

Everything the shell renders.


TabProblem = v.InferOutput<typeof TabProblem>

Defined in: app/src/shared/ipc/shell-contracts.ts:18

Why a tab shows no page.


TabView = v.InferOutput<typeof TabView>

Defined in: app/src/shared/ipc/shell-contracts.ts:34

One tab as the shell displays it.

const ActivateTab: RequestContract<{ tabId: string; }, null>

Defined in: app/src/shared/ipc/shell-contracts.ts:114

Shows a tab.


const BarItem: 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.


const CloseTab: RequestContract<{ tabId: string; }, null>

Defined in: app/src/shared/ipc/shell-contracts.ts:122

Closes a tab.


const Done: NullSchema<undefined>

Defined in: app/src/shared/ipc/shell-contracts.ts:10

A response without a payload.


const Empty: StrictObjectSchema<{ }, undefined>

Defined in: app/src/shared/ipc/shell-contracts.ts:8

A request without a payload.


const FindState: 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.


const GetShellState: 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.


const NavigateTab: 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.


const OpenTab: 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.


const SetShellInsets: 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.


const ShellCommand: 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.


const shellRequests: readonly RequestContract<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.


const ShellState: 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.


const ShellStateChanged: 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.


const TabAction: 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.


const TabId: SchemaWithPipe<readonly [StringSchema<undefined>, RegexAction<string, undefined>]>

Defined in: app/src/shared/ipc/shell-contracts.ts:6

The id of a tab.


const TabProblem: 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.


const TabView: 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 %.