2017-07-28 14:52:15 +02:00
|
|
|
|
/*
|
2019-01-09 11:25:21 +01:00
|
|
|
|
* Copyright (c) 2019 ETH Zürich, Educational Development and Technology (LET)
|
2017-07-28 14:52:15 +02:00
|
|
|
|
*
|
|
|
|
|
* This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
|
|
|
|
*/
|
|
|
|
|
|
2018-02-15 15:42:54 +01:00
|
|
|
|
using System;
|
|
|
|
|
|
2019-09-06 09:39:28 +02:00
|
|
|
|
namespace SafeExamBrowser.Settings.Browser
|
2017-07-28 14:52:15 +02:00
|
|
|
|
{
|
2018-03-06 11:38:12 +01:00
|
|
|
|
/// <summary>
|
2019-09-10 11:53:30 +02:00
|
|
|
|
/// Defines all settings for the browser engine of the application.
|
2018-03-06 11:38:12 +01:00
|
|
|
|
/// </summary>
|
2018-02-15 15:42:54 +01:00
|
|
|
|
[Serializable]
|
|
|
|
|
public class BrowserSettings
|
2017-07-28 14:52:15 +02:00
|
|
|
|
{
|
|
|
|
|
/// <summary>
|
2019-09-10 11:53:30 +02:00
|
|
|
|
/// The settings to be used for additional browser windows.
|
2017-07-28 14:52:15 +02:00
|
|
|
|
/// </summary>
|
2019-09-10 11:53:30 +02:00
|
|
|
|
public BrowserWindowSettings AdditionalWindow { get; set; }
|
2017-07-28 14:52:15 +02:00
|
|
|
|
|
2018-11-08 09:39:52 +01:00
|
|
|
|
/// <summary>
|
2019-01-17 11:12:17 +01:00
|
|
|
|
/// Determines whether the user will be allowed to download configuration files.
|
2018-11-08 09:39:52 +01:00
|
|
|
|
/// </summary>
|
|
|
|
|
public bool AllowConfigurationDownloads { get; set; }
|
|
|
|
|
|
2018-06-21 07:56:25 +02:00
|
|
|
|
/// <summary>
|
2019-01-17 11:12:17 +01:00
|
|
|
|
/// Determines whether the user will be allowed to download files (excluding configuration files).
|
2018-06-21 07:56:25 +02:00
|
|
|
|
/// </summary>
|
|
|
|
|
public bool AllowDownloads { get; set; }
|
|
|
|
|
|
2019-01-15 10:44:35 +01:00
|
|
|
|
/// <summary>
|
2019-01-17 11:12:17 +01:00
|
|
|
|
/// Determines whether the user will be allowed to zoom webpages.
|
2019-01-15 10:44:35 +01:00
|
|
|
|
/// </summary>
|
|
|
|
|
public bool AllowPageZoom { get; set; }
|
|
|
|
|
|
2017-07-28 14:52:15 +02:00
|
|
|
|
/// <summary>
|
2019-01-17 11:12:17 +01:00
|
|
|
|
/// Determines whether popup windows will be opened or not.
|
|
|
|
|
/// </summary>
|
|
|
|
|
public bool AllowPopups { get; set; }
|
|
|
|
|
|
2019-01-11 08:25:40 +01:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// The custom user agent to optionally be used for all requests.
|
|
|
|
|
/// </summary>
|
|
|
|
|
public string CustomUserAgent { get; set; }
|
|
|
|
|
|
2019-09-06 08:13:27 +02:00
|
|
|
|
/// <summary>
|
2019-09-10 11:01:49 +02:00
|
|
|
|
/// The settings to be used for the browser request filter.
|
2019-09-06 08:13:27 +02:00
|
|
|
|
/// </summary>
|
2019-09-10 11:01:49 +02:00
|
|
|
|
public BrowserFilterSettings Filter { get; set; }
|
2019-09-06 08:13:27 +02:00
|
|
|
|
|
2017-07-28 14:52:15 +02:00
|
|
|
|
/// <summary>
|
2019-09-10 11:53:30 +02:00
|
|
|
|
/// The settings to be used for the main browser window.
|
2017-07-28 14:52:15 +02:00
|
|
|
|
/// </summary>
|
2019-09-10 11:53:30 +02:00
|
|
|
|
public BrowserWindowSettings MainWindow { get; set; }
|
2019-01-23 09:37:47 +01:00
|
|
|
|
|
2017-07-31 20:22:53 +02:00
|
|
|
|
/// <summary>
|
2019-01-23 09:37:47 +01:00
|
|
|
|
/// The URL with which the main browser window will be loaded.
|
2017-07-31 20:22:53 +02:00
|
|
|
|
/// </summary>
|
2018-02-15 15:42:54 +01:00
|
|
|
|
public string StartUrl { get; set; }
|
2019-01-11 08:25:40 +01:00
|
|
|
|
|
|
|
|
|
/// <summary>
|
2019-01-17 11:12:17 +01:00
|
|
|
|
/// Determines whether a custom user agent will be used for all requests, see <see cref="CustomUserAgent"/>.
|
2019-01-11 08:25:40 +01:00
|
|
|
|
/// </summary>
|
|
|
|
|
public bool UseCustomUserAgent { get; set; }
|
2019-01-23 09:37:47 +01:00
|
|
|
|
|
|
|
|
|
public BrowserSettings()
|
|
|
|
|
{
|
2019-09-10 11:53:30 +02:00
|
|
|
|
AdditionalWindow = new BrowserWindowSettings();
|
2019-09-10 11:01:49 +02:00
|
|
|
|
Filter = new BrowserFilterSettings();
|
2019-09-10 11:53:30 +02:00
|
|
|
|
MainWindow = new BrowserWindowSettings();
|
2019-01-23 09:37:47 +01:00
|
|
|
|
}
|
2017-07-28 14:52:15 +02:00
|
|
|
|
}
|
|
|
|
|
}
|