Ejemplo n.º 1
0
FileTypeProfile::FileTypeProfile(QObject* parent) :
    QQuickWebEngineProfile(parent)
{
    static const QString WEB_ENGINE_USER_AGENT = "Chrome/48.0 (HighFidelityInterface)";
    setHttpUserAgent(WEB_ENGINE_USER_AGENT);

    auto requestInterceptor = new FileTypeRequestInterceptor(this);
    setRequestInterceptor(requestInterceptor);
}
Ejemplo n.º 2
0
HFWebEngineProfile::HFWebEngineProfile(QObject* parent) :
    QQuickWebEngineProfile(parent)
{
    setStorageName(QML_WEB_ENGINE_STORAGE_NAME);

    // we use the HFWebEngineRequestInterceptor to make sure that web requests are authenticated for the interface user
    auto requestInterceptor = new HFWebEngineRequestInterceptor(this);
    setRequestInterceptor(requestInterceptor);
}
Ejemplo n.º 3
0
HFTabletWebEngineProfile::HFTabletWebEngineProfile(QObject* parent) : QQuickWebEngineProfile(parent) {

    static const QString WEB_ENGINE_USER_AGENT = "Mozilla/5.0 (Linux; Android 6.0; Nexus 5 Build/MRA58N) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Mobile Safari/537.36";

    setHttpUserAgent(WEB_ENGINE_USER_AGENT);
    setStorageName(QML_WEB_ENGINE_NAME);

    auto requestInterceptor = new HFTabletWebEngineRequestInterceptor(this);
    setRequestInterceptor(requestInterceptor);
}