chromium

Chromium-related functions.

async deltona.chromium.fix_chromium_pwa_icon(config_path: StrPath, app_id: str, icon_src_uri: str, profile: str = 'Default', *, masked: bool = False, monochrome: bool = False) None

Fix a Chromium PWA icon that failed to sync.

Parameters:
config_path : StrPath

Path to the Chromium configuration directory.

app_id : str

App ID of the PWA.

icon_src_uri : str

URI of the icon source.

profile : str

Profile name. Default is 'Default'.

masked : bool

If True, save the icon as a maskable icon. Default is False.

monochrome : bool

If True, save the icon as a monochrome icon. Default is False.

Raises:

ValueError – If the icon is not square.

async deltona.chromium.generate_chrome_user_agent(os: str = 'Windows NT 10.0; Win64; x64') str

Get a Chrome user agent.

Parameters:
os : str

The operating system. Default is 'Windows NT 10.0; Win64; x64'.

Returns:

A Chrome user agent string.

Return type:

str

async deltona.chromium.get_last_chrome_major_version() str

Get last major Chrome version from the profile directory.

Tries the following, in order:

  • Chrome Beta

  • Chrome

  • Chrome Canary

  • Chromium

Returns:

If no Last Version file is found, returns empty string.

Return type:

str

async deltona.chromium.get_latest_chrome_major_version() str

Get the latest Chrome major version.

Returns:

The latest major version number as a string.

Return type:

str