本文整理汇总了C++中webcore::Settings::setUseCache方法的典型用法代码示例。如果您正苦于以下问题:C++ Settings::setUseCache方法的具体用法?C++ Settings::setUseCache怎么用?C++ Settings::setUseCache使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类webcore::Settings
的用法示例。
在下文中一共展示了Settings::setUseCache方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: apply
void WebSettingsPrivate::apply(int setting, bool global)
{
if (isGlobal()) {
// Cycle through the page settings and apply the defaults
for (size_t i = 0; i < m_pageSettings.size(); ++i)
m_pageSettings.at(i)->apply(setting, global);
} else {
// Apply the WebCore::Settings to this page's settings
WebCoreSettingsState* webcoreSettingsState = global ? WebSettings::pageGroupSettings(m_webCoreSettingsState->pageGroupName)->d->m_webCoreSettingsState : m_webCoreSettingsState;
WebCore::Settings* settings = getSettings(m_page);
if (setting == AllSettings || setting == IsXSSAuditorEnabled)
settings->setXSSAuditorEnabled(webcoreSettingsState->xssAuditorEnabled);
if (setting == AllSettings || setting == LoadsImagesAutomatically)
settings->setLoadsImagesAutomatically(webcoreSettingsState->loadsImagesAutomatically);
if (setting == AllSettings || setting == ShouldDrawBorderWhileLoadingImages)
settings->setShouldDrawBorderWhileLoadingImages(webcoreSettingsState->shouldDrawBorderWhileLoadingImages);
if (setting == AllSettings || setting == IsJavaScriptEnabled)
settings->setJavaScriptEnabled(webcoreSettingsState->isJavaScriptEnabled);
if (setting == AllSettings || setting == DefaultFixedFontSize)
settings->setDefaultFixedFontSize(webcoreSettingsState->defaultFixedFontSize);
if (setting == AllSettings || setting == DefaultFontSize)
settings->setDefaultFontSize(webcoreSettingsState->defaultFontSize);
if (setting == AllSettings || setting == MinimumFontSize)
settings->setMinimumFontSize(webcoreSettingsState->minimumFontSize);
if (setting == AllSettings || setting == SerifFontFamily)
settings->setSerifFontFamily(webcoreSettingsState->serifFontFamily);
if (setting == AllSettings || setting == FixedFontFamily)
settings->setFixedFontFamily(webcoreSettingsState->fixedFontFamily);
if (setting == AllSettings || setting == SansSerifFontFamily)
settings->setSansSerifFontFamily(webcoreSettingsState->sansSerifFontFamily);
if (setting == AllSettings || setting == StandardFontFamily)
settings->setStandardFontFamily(webcoreSettingsState->standardFontFamily);
if (setting == AllSettings || setting == CanJavaScriptOpenWindowsAutomatically)
settings->setJavaScriptCanOpenWindowsAutomatically(webcoreSettingsState->canJavaScriptOpenWindowsAutomatically);
if (setting == AllSettings || setting == ArePluginsEnabled)
settings->setPluginsEnabled(webcoreSettingsState->arePluginsEnabled);
if (setting == AllSettings || setting == DefaultTextEncodingName)
settings->setDefaultTextEncodingName(webcoreSettingsState->defaultTextEncodingName);
if (setting == AllSettings || setting == UserStyleSheet)
settings->setUserStyleSheetLocation(webcoreSettingsState->userStyleSheet);
if (setting == AllSettings || setting == FirstScheduledLayoutDelay)
settings->setFirstScheduledLayoutDelay(webcoreSettingsState->firstScheduledLayoutDelay);
if (setting == AllSettings || setting == UseWebKitCache)
settings->setUseCache(webcoreSettingsState->useWebKitCache);
#if ENABLE(DATABASE)
if (setting == AllSettings || setting == LocalStoragePath)
settings->setLocalStorageDatabasePath(webcoreSettingsState->localStoragePath);
if (setting == AllSettings || setting == IsDatabasesEnabled) {
WebCore::Database::setIsAvailable(webcoreSettingsState->isDatabasesEnabled);
WebCore::DatabaseSync::setIsAvailable(webcoreSettingsState->isDatabasesEnabled);
}
if (setting == AllSettings || setting == IsLocalStorageEnabled)
settings->setLocalStorageEnabled(webcoreSettingsState->isLocalStorageEnabled);
if (setting == AllSettings || setting == IsOfflineWebApplicationCacheEnabled)
settings->setOfflineWebApplicationCacheEnabled(webcoreSettingsState->isOfflineWebApplicationCacheEnabled);
if (setting == AllSettings || setting == LocalStorageQuota)
getGroupSettings(m_page)->setLocalStorageQuotaBytes(webcoreSettingsState->localStorageQuota);
if (setting == AllSettings || setting == IsFrameFlatteningEnabled)
settings->setFrameFlatteningEnabled(webcoreSettingsState->isFrameFlatteningEnabled);
#endif
// These are *NOT* exposed via the API so just always set them if this
// is global and we're setting all the settings...
if (setting == AllSettings && global) {
settings->setJavaEnabled(webcoreSettingsState->isJavaEnabled);
}
// Apply the Olympia settings to this page's settings
OlympiaSettingsState* olympiaSettingsState = global ? WebSettings::pageGroupSettings(m_webCoreSettingsState->pageGroupName)->d->m_olympiaSettingsState : m_olympiaSettingsState;
if (setting == AllSettings || setting == UserAgentString)
m_olympiaSettingsState->userAgentString = olympiaSettingsState->userAgentString;
if (setting == AllSettings || setting == IsZoomToFitOnLoad)
m_olympiaSettingsState->isZoomToFitOnLoad = olympiaSettingsState->isZoomToFitOnLoad;
if (setting == AllSettings || setting == IsScrollbarsEnabled)
//.........这里部分代码省略.........