settings

package
v0.0.0-...-683b059 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 23, 2022 License: BSD-3-Clause Imports: 3 Imported by: 0

Documentation

Overview

Package settings implements a library used for communication with Chrome settings. A chrome.TestConn returned by TestAPIConn() with the "settingsPrivate" permission is needed.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DefaultZoom

func DefaultZoom(ctx context.Context, tconn *chrome.TestConn) (float64, error)

DefaultZoom returns the default page zoom factor. Possible values are currently between 0.25 and 5. For a full list, see zoom::kPresetZoomFactors in: https://cs.chromium.org/chromium/src/components/zoom/page_zoom_constants.cc

func NightLightEnabled

func NightLightEnabled(ctx context.Context, c *chrome.TestConn) (bool, error)

NightLightEnabled returns true if Night Light is currently enabled.

func SetDefaultZoom

func SetDefaultZoom(ctx context.Context, tconn *chrome.TestConn, zoom float64) error

SetDefaultZoom sets the page zoom factor. Must be less than 0.001 different than a value in zoom::kPresetZoomFactors. See: https://cs.chromium.org/chromium/src/components/zoom/page_zoom_constants.cc

func SetNightLightEnabled

func SetNightLightEnabled(ctx context.Context, c *chrome.TestConn, enabled bool) error

SetNightLightEnabled enables or disables Night Light.

func SetNightLightSchedule

func SetNightLightSchedule(ctx context.Context, c *chrome.TestConn, schedule NightLightScheduleValue) error

SetNightLightSchedule sets the current Night Light schedule.

func SetTrackpadReverseScrollEnabled

func SetTrackpadReverseScrollEnabled(ctx context.Context, c *chrome.TestConn, enabled bool) error

SetTrackpadReverseScrollEnabled enables/disables trackpad reverse scrolling..

func TrackpadReverseScrollEnabled

func TrackpadReverseScrollEnabled(ctx context.Context, c *chrome.TestConn) (bool, error)

TrackpadReverseScrollEnabled gets current enabled state of trackpad reverse scrolling.

Types

type NightLightScheduleValue

type NightLightScheduleValue uint

NightLightScheduleValue provides available values for the Night Light schedule.

const (
	// NightLightScheduleNever means Night Light is never enabled.
	NightLightScheduleNever NightLightScheduleValue = 0
	// NightLightScheduleSunsetToSunrise means Night Light is enabled at night.
	NightLightScheduleSunsetToSunrise NightLightScheduleValue = 1
	// NightLightScheduleCustom means Night Light has a custom schedule.
	NightLightScheduleCustom NightLightScheduleValue = 2
)

The following constants are from NightLightController::ScheduleType in chromium/src/ash/public/cpp/night_light_controller.h.

func NightLightSchedule

func NightLightSchedule(ctx context.Context, c *chrome.TestConn) (NightLightScheduleValue, error)

NightLightSchedule gets the current Night Light schedule. See the above constants for possible values.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL