Introduction
Installation
Guides
- Engine
- Profile
- Browser
- BrowserView
- Navigation
- Content
- Context menu
- DOM
- JavaScript
- Pop-ups
- Dialogs
- Downloads
- Chrome extensions
- Network
- Cache
- Cookies
- Proxy
- Authentication
- Permissions
- Plugins
- Printing
- Passwords
- User data profiles
- Credit cards
- Media
- Zoom
- Spell checker
- Deployment
- Chromium
Troubleshooting
- Logging
- Common exceptions
- Application does not terminate
- Video does not play
- Cannot sign in to Google account
- User data is not stored
- Color scheme
- Startup failure
- Slow startup on Windows
- Unresponsive .NET Application
- Unexpected Chromium process termination
- Unexpected behavior
- Windows 7/8/8.1 end of support
Migration
Permissions
This guide shows how to grant or deny permissions for websites.
It is possible to handle the case when a web page requests a permission, for example, to enable geolocation. These permissions can be granted or denied by setting up a permission handler. See the code sample below:
// Grant all permissions.
engine.Profiles.Default.Permissions.RequestPermissionHandler =
new Handler<RequestPermissionParameters, RequestPermissionResponse>(p =>
{
return RequestPermissionResponse.Grant();
});
' Grant all permissions.
engine.Profiles.Default.Permissions.RequestPermissionHandler =
New Handler(Of RequestPermissionParameters, RequestPermissionResponse)(Function(p)
Return RequestPermissionResponse.Grant()
End Function)
You can also grant a specific permission only:
// Grant Geolocation permission.
engine.Profiles.Default.Permissions.RequestPermissionHandler =
new Handler<RequestPermissionParameters, RequestPermissionResponse>(p =>
{
if(p.Type == PermissionType.Geolocation)
{
return RequestPermissionResponse.Grant();
}
return RequestPermissionResponse.Deny();
});
' Grant Geolocation permission.
engine.Profiles.Default.Permissions.RequestPermissionHandler =
New Handler(Of RequestPermissionParameters, RequestPermissionResponse)(Function(p)
If p.Type = PermissionType.Geolocation Then
Return RequestPermissionResponse.Grant()
End If
Return RequestPermissionResponse.Deny()
End Function)