Beispiel #1
0
static bool setToDefaultPreferences()
{
    HRESULT hr = gStandardPreferences->QueryInterface(IID_IWebPreferencesPrivate, reinterpret_cast<void**>(&gPrefsPrivate.GetInterfacePtr()));
    if (!SUCCEEDED(hr))
        return false;

#if USE(CG)
    gStandardPreferences->setAVFoundationEnabled(TRUE);
    gPrefsPrivate->setAcceleratedCompositingEnabled(TRUE);
#endif

    gPrefsPrivate->setFullScreenEnabled(TRUE);
    gPrefsPrivate->setShowDebugBorders(FALSE);
    gPrefsPrivate->setShowRepaintCounter(FALSE);

    gStandardPreferences->setLoadsImagesAutomatically(TRUE);
    gPrefsPrivate->setAuthorAndUserStylesEnabled(TRUE);
    gStandardPreferences->setJavaScriptEnabled(TRUE);
    gPrefsPrivate->setAllowUniversalAccessFromFileURLs(FALSE);
    gPrefsPrivate->setAllowFileAccessFromFileURLs(TRUE);

    gPrefsPrivate->setDeveloperExtrasEnabled(TRUE);

    return true;
}