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 ¶
- func DefaultZoom(ctx context.Context, tconn *chrome.TestConn) (float64, error)
- func NightLightEnabled(ctx context.Context, c *chrome.TestConn) (bool, error)
- func SetDefaultZoom(ctx context.Context, tconn *chrome.TestConn, zoom float64) error
- func SetNightLightEnabled(ctx context.Context, c *chrome.TestConn, enabled bool) error
- func SetNightLightSchedule(ctx context.Context, c *chrome.TestConn, schedule NightLightScheduleValue) error
- func SetTrackpadReverseScrollEnabled(ctx context.Context, c *chrome.TestConn, enabled bool) error
- func TrackpadReverseScrollEnabled(ctx context.Context, c *chrome.TestConn) (bool, error)
- type NightLightScheduleValue
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DefaultZoom ¶
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 ¶
NightLightEnabled returns true if Night Light is currently enabled.
func SetDefaultZoom ¶
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 ¶
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 ¶
SetTrackpadReverseScrollEnabled enables/disables 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 ¶
NightLightSchedule gets the current Night Light schedule. See the above constants for possible values.