本文整理汇总了C++中WebPreferences类的典型用法代码示例。如果您正苦于以下问题:C++ WebPreferences类的具体用法?C++ WebPreferences怎么用?C++ WebPreferences使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了WebPreferences类的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。
示例1: init
void WebIconDatabase::init()
{
WebPreferences* standardPrefs = WebPreferences::sharedStandardPreferences();
bool enabled = standardPrefs->iconDatabaseEnabled();
// if (!enabled) {
// LOG_ERROR("Unable to get icon database enabled preference");
// }
iconDatabase()->setEnabled(!!enabled);
iconDatabase()->setClient(this);
String databasePath = standardPrefs->iconDatabaseLocation();
// if (prefDatabasePath == String())
// LOG_ERROR("Unable to get icon database location preference");
if (databasePath.isEmpty()) {
databasePath = homeDirectoryPath();
/*if (prefDatabasePath.isEmpty())
LOG_ERROR("Failed to construct default icon database path");*/
}
bool ret = iconDatabase()->open(databasePath);
/*if (!ret)
LOG_ERROR("Failed to open icon database path");*/
}
开发者ID:jackiekaon,项目名称:owb-mirror,代码行数:25,代码来源:WebIconDatabase.cpp
示例2: getInstanceForIdentifier
HRESULT STDMETHODCALLTYPE WebPreferences::initWithIdentifier(
/* [in] */ BSTR anIdentifier,
/* [retval][out] */ IWebPreferences** preferences)
{
WebPreferences *instance = getInstanceForIdentifier(anIdentifier);
if (instance) {
*preferences = instance;
instance->AddRef();
return S_OK;
}
load();
*preferences = this;
AddRef();
if (anIdentifier) {
m_identifier = anIdentifier;
setInstance(this, m_identifier);
}
this->postPreferencesChangesNotification();
return S_OK;
}
开发者ID:flwh,项目名称:Alcatel_OT_985_kernel,代码行数:25,代码来源:WebPreferences.cpp
示例3: PLATFORM
void WebFrameLoaderClient::setTitle(const String& title, const KURL& url)
{
#if PLATFORM(AMIGAOS4)
if (!m_webFrame->parentFrame()) {
BalWidget* viewWindow = m_webFrame->webView()->viewWindow();
if (viewWindow && viewWindow->window) {
extern char* utf8ToAmiga(const char* utf8);
char *titlestr = utf8ToAmiga(title.utf8().data());
if (titlestr && titlestr[0])
snprintf(viewWindow->title, sizeof(viewWindow->title), viewWindow->clickTabNode ? "%s" : "OWB: %s", titlestr);
else
strcpy(viewWindow->title, "Origyn Web Browser");
free(titlestr);
if (amigaConfig.tabs) {
IIntuition->SetGadgetAttrs(viewWindow->gad_clicktab, viewWindow->window, NULL,
CLICKTAB_Labels, ~0,
TAG_DONE);
IClickTab->SetClickTabNodeAttrs(viewWindow->clickTabNode, TNA_Text, viewWindow->title, TAG_DONE);
IIntuition->RefreshSetGadgetAttrs(viewWindow->gad_clicktab, viewWindow->window, NULL,
CLICKTAB_Labels, viewWindow->clickTabList,
TAG_DONE);
}
else
IIntuition->SetWindowTitles(viewWindow->window, viewWindow->title, (STRPTR)~0UL);
CString urlLatin1 = url.prettyURL().latin1();
const char *urlstr = urlLatin1.data();
if (urlstr && urlstr[0] && viewWindow->gad_url) {
snprintf(viewWindow->url, sizeof(viewWindow->url), "%s", urlstr);
if (ILayout->SetPageGadgetAttrs(viewWindow->gad_url, viewWindow->page,
viewWindow->window, NULL,
STRINGA_TextVal, viewWindow->url,
TAG_DONE))
ILayout->RefreshPageGadget(viewWindow->gad_url, viewWindow->page, viewWindow->window, NULL);
}
}
}
#endif
bool privateBrowsingEnabled = false;
WebPreferences* preferences = m_webFrame->webView()->preferences();
if (preferences)
privateBrowsingEnabled = preferences->privateBrowsingEnabled();
if (privateBrowsingEnabled)
return;
// update title in global history
WebHistory* history = webHistory();
if (!history)
return;
WebHistoryItem* item = history->itemForURL(url.string());
if (!item)
return;
item->setTitle(title.utf8().data());
}
开发者ID:jackiekaon,项目名称:owb-mirror,代码行数:60,代码来源:WebFrameLoaderClient.cpp
示例4: tabsToLinks
bool WebChromeClient::tabsToLinks() const
{
bool enabled = false;
WebPreferences* preferences = m_webView->preferences();
return preferences->tabsToLinks();
}
开发者ID:jackiekaon,项目名称:owb-mirror,代码行数:7,代码来源:WebChromeClient.cpp
示例5: webKitSettingsConstructed
static void webKitSettingsConstructed(GObject* object)
{
G_OBJECT_CLASS(webkit_settings_parent_class)->constructed(object);
WebPreferences* prefs = WEBKIT_SETTINGS(object)->priv->preferences.get();
ExperimentalFeatures features;
bool regionBasedColumnsEnabled = features.isEnabled(ExperimentalFeatures::RegionBasedColumns);
if (prefs->regionBasedColumnsEnabled() != regionBasedColumnsEnabled)
prefs->setRegionBasedColumnsEnabled(regionBasedColumnsEnabled);
}
开发者ID:mapbased,项目名称:phantomjs,代码行数:10,代码来源:WebKitSettings.cpp
示例6: didPerformFirstNavigation
void WebFrame::didPerformFirstNavigation() const
{
WebPreferences* preferences = d->webView->preferences();
if(!preferences)
return;
bool automaticallyDetectsCacheModel = preferences->automaticallyDetectsCacheModel();
WebCacheModel cacheModel = preferences->cacheModel();
if (automaticallyDetectsCacheModel && cacheModel < WebCacheModelDocumentBrowser)
preferences->setCacheModel(WebCacheModelDocumentBrowser);
}
开发者ID:jackiekaon,项目名称:owb-mirror,代码行数:13,代码来源:WebFrame.cpp
示例7: init
void WebIconDatabase::init()
{
WebPreferences* standardPrefs = WebPreferences::sharedStandardPreferences();
BOOL enabled = FALSE;
if (FAILED(standardPrefs->iconDatabaseEnabled(&enabled))) {
enabled = FALSE;
LOG_ERROR("Unable to get icon database enabled preference");
}
iconDatabase()->setEnabled(!!enabled);
if (!(!!enabled))
return;
startUpIconDatabase();
}
开发者ID:325116067,项目名称:semc-qsd8x50,代码行数:14,代码来源:WebIconDatabase.cpp
示例8: PLATFORM
void WebFrameLoaderClient::setTitle(const String& title, const KURL& url)
{
#if PLATFORM(AMIGAOS4)
if (!m_webFrame->parentFrame()) {
BalWidget* viewWindow = m_webFrame->webView()->viewWindow();
if (viewWindow && viewWindow->window) {
CString titleLatin1 = title.latin1();
const char *titlestr = titleLatin1.data();
if (titlestr && titlestr[0])
snprintf(viewWindow->title, sizeof(viewWindow->title), "OWB: %s", titlestr);
else
strcpy(viewWindow->title, "Origyn Web Browser");
IIntuition->SetWindowTitles(viewWindow->window, viewWindow->title, (STRPTR)~0UL);
CString urlLatin1 = url.prettyURL().latin1();
const char *urlstr = urlLatin1.data();
if (urlstr && urlstr[0] && viewWindow->gad_url) {
snprintf(viewWindow->url, sizeof(viewWindow->url), "%s", urlstr);
IIntuition->RefreshSetGadgetAttrs(viewWindow->gad_url, viewWindow->window, NULL,
STRINGA_TextVal, viewWindow->url,
TAG_DONE);
}
}
}
#endif
bool privateBrowsingEnabled = false;
WebPreferences* preferences = m_webFrame->webView()->preferences();
if (preferences)
privateBrowsingEnabled = preferences->privateBrowsingEnabled();
if (privateBrowsingEnabled)
return;
// update title in global history
WebHistory* history = webHistory();
if (!history)
return;
WebHistoryItem* item = history->itemForURL(url.string());
if (!item)
return;
item->setTitle(title);
}
开发者ID:jackiekaon,项目名称:owb-mirror,代码行数:43,代码来源:WebFrameLoaderClient.cpp
示例9: setTitle
void WebFrameLoaderClient::setTitle(const String& title, const KURL& url)
{
bool privateBrowsingEnabled = false;
WebPreferences* preferences = m_webFrame->webView()->preferences();
if (preferences)
privateBrowsingEnabled = preferences->privateBrowsingEnabled();
if (privateBrowsingEnabled)
return;
// update title in global history
WebHistory* history = webHistory();
if (!history)
return;
WebHistoryItem* item = history->itemForURL(url.string());
if (!item)
return;
item->setTitle(title);
}
开发者ID:acss,项目名称:owb-mirror,代码行数:20,代码来源:WebFrameLoaderClient.cpp
示例10: startUpIconDatabase
void WebIconDatabase::startUpIconDatabase()
{
WebPreferences* standardPrefs = WebPreferences::sharedStandardPreferences();
iconDatabase().setClient(this);
BString prefDatabasePath;
if (FAILED(standardPrefs->iconDatabaseLocation(&prefDatabasePath)))
LOG_ERROR("Unable to get icon database location preference");
String databasePath(prefDatabasePath, SysStringLen(prefDatabasePath));
if (databasePath.isEmpty()) {
databasePath = localUserSpecificStorageDirectory();
if (databasePath.isEmpty())
LOG_ERROR("Failed to construct default icon database path");
}
if (!iconDatabase().open(databasePath, WebCore::IconDatabase::defaultDatabaseFilename()))
LOG_ERROR("Failed to open icon database path");
}
开发者ID:3163504123,项目名称:phantomjs,代码行数:21,代码来源:WebIconDatabase.cpp
示例11: WebPreferences
WebPreferences* WebPreferences::createInstance()
{
WebPreferences* instance = new WebPreferences();
instance->AddRef();
return instance;
}
开发者ID:flwh,项目名称:Alcatel_OT_985_kernel,代码行数:6,代码来源:WebPreferences.cpp
注:本文中的WebPreferences类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论