public interface Browser
Modifier and Type | Method and Description |
---|---|
void |
close()
Close browser gracefully.
|
void |
crash()
Crashes browser on the main thread.
|
List<String> |
getBrowserCommandLine()
Returns the command line switches for the browser process if, and only if
--enable-automation is on the commandline.
|
Histogram |
getHistogram(String name)
Get a Chrome histogram by name.
|
Histogram |
getHistogram(String name,
Boolean delta)
Get a Chrome histogram by name.
|
List<Histogram> |
getHistograms()
Get Chrome histograms.
|
List<Histogram> |
getHistograms(String query,
Boolean delta)
Get Chrome histograms.
|
GetVersionResult |
getVersion()
Returns version information.
|
Bounds |
getWindowBounds(Integer windowId)
Get position and size of the browser window.
|
GetWindowForTargetResult |
getWindowForTarget()
Get the browser window that contains the devtools target.
|
GetWindowForTargetResult |
getWindowForTarget(String targetId)
Get the browser window that contains the devtools target.
|
void |
grantPermissions(String origin,
PermissionType permissions)
Grant specific permissions to the given origin and reject all others.
|
void |
grantPermissions(String origin,
PermissionType permissions,
String browserContextId)
Grant specific permissions to the given origin and reject all others.
|
void |
resetPermissions()
Reset all permission management for all origins.
|
void |
resetPermissions(String browserContextId)
Reset all permission management for all origins.
|
void |
setDockTile()
Set dock tile details, platform-specific.
|
void |
setDockTile(String badgeLabel,
String image)
Set dock tile details, platform-specific.
|
void |
setWindowBounds(Integer windowId,
Bounds bounds)
Set position and/or size of the browser window.
|
void grantPermissions(String origin, PermissionType permissions, String browserContextId)
browserContextId
- BrowserContext to override permissions. When omitted, default browser context is used.void resetPermissions(String browserContextId)
browserContextId
- BrowserContext to reset permissions. When omitted, default browser context is used.void close()
void crash()
GetVersionResult getVersion()
List<String> getBrowserCommandLine()
List<Histogram> getHistograms(String query, Boolean delta)
query
- Requested substring in name. Only histograms which have query as a
substring in their name are extracted. An empty or absent query returns
all histograms.delta
- If true, retrieve delta since last call.Histogram getHistogram(String name, Boolean delta)
name
- Requested histogram name.delta
- If true, retrieve delta since last call.Bounds getWindowBounds(Integer windowId)
windowId
- Browser window id.GetWindowForTargetResult getWindowForTarget(String targetId)
targetId
- Devtools agent host id. If called as a part of the session, associated targetId is used.void setWindowBounds(Integer windowId, Bounds bounds)
windowId
- Browser window id.bounds
- New window bounds. The 'minimized', 'maximized' and 'fullscreen' states cannot be combined
with 'left', 'top', 'width' or 'height'. Leaves unspecified fields unchanged.void setDockTile(String badgeLabel, String image)
image
- Png encoded image.void grantPermissions(String origin, PermissionType permissions)
void resetPermissions()
Histogram getHistogram(String name)
name
- Requested histogram name.GetWindowForTargetResult getWindowForTarget()
void setDockTile()
Copyright © 2017, 2019–2019 WebFolder OÜ. All rights reserved.