2017-07-28 14:52:15 +02:00
|
|
|
|
/*
|
2018-01-16 08:24:00 +01:00
|
|
|
|
* Copyright (c) 2018 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/.
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
using System;
|
|
|
|
|
using System.IO;
|
|
|
|
|
using SafeExamBrowser.Contracts.Configuration.Settings;
|
|
|
|
|
|
2017-08-11 08:28:17 +02:00
|
|
|
|
namespace SafeExamBrowser.Configuration
|
2017-07-28 14:52:15 +02:00
|
|
|
|
{
|
|
|
|
|
public class BrowserSettings : IBrowserSettings
|
|
|
|
|
{
|
|
|
|
|
private ISettings settings;
|
|
|
|
|
|
|
|
|
|
public BrowserSettings(ISettings settings)
|
|
|
|
|
{
|
|
|
|
|
this.settings = settings;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public bool AllowAddressBar => true;
|
|
|
|
|
|
2017-07-31 20:22:53 +02:00
|
|
|
|
public bool AllowBackwardNavigation => true;
|
2017-07-28 14:52:15 +02:00
|
|
|
|
|
2017-07-31 20:22:53 +02:00
|
|
|
|
public bool AllowDeveloperConsole => true;
|
2017-07-28 14:52:15 +02:00
|
|
|
|
|
2017-07-31 20:22:53 +02:00
|
|
|
|
public bool AllowForwardNavigation => true;
|
2017-07-28 14:52:15 +02:00
|
|
|
|
|
2017-07-31 20:22:53 +02:00
|
|
|
|
public bool AllowReloading => true;
|
2017-07-28 14:52:15 +02:00
|
|
|
|
|
|
|
|
|
public string CachePath
|
|
|
|
|
{
|
|
|
|
|
get { return Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData), settings.AppDataFolderName, "Cache"); }
|
|
|
|
|
}
|
|
|
|
|
|
2017-07-31 20:22:53 +02:00
|
|
|
|
public bool FullScreenMode => false;
|
2017-07-28 14:52:15 +02:00
|
|
|
|
|
|
|
|
|
public string LogFile
|
|
|
|
|
{
|
|
|
|
|
get { return Path.Combine(settings.LogFolderPath, $"{settings.RuntimeIdentifier}_Browser.txt"); }
|
|
|
|
|
}
|
2017-07-31 20:22:53 +02:00
|
|
|
|
|
|
|
|
|
public string StartUrl => "www.duckduckgo.com";
|
2017-07-28 14:52:15 +02:00
|
|
|
|
}
|
|
|
|
|
}
|