本文整理汇总了C++中webcore::Settings::setEditableLinkBehavior方法的典型用法代码示例。如果您正苦于以下问题:C++ Settings::setEditableLinkBehavior方法的具体用法?C++ Settings::setEditableLinkBehavior怎么用?C++ Settings::setEditableLinkBehavior使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类webcore::Settings
的用法示例。
在下文中一共展示了Settings::setEditableLinkBehavior方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: Sync
//.........这里部分代码省略.........
#if ENABLE(DATABASE)
flag = env->GetBooleanField(obj, gFieldIds->mDatabaseEnabled);
WebCore::Database::setIsAvailable(flag);
flag = env->GetBooleanField(obj, gFieldIds->mDatabasePathHasBeenSet);
if (flag) {
// If the user has set the database path, sync it to the DatabaseTracker.
str = (jstring)env->GetObjectField(obj, gFieldIds->mDatabasePath);
if (str) {
String path = jstringToWtfString(env, str);
DatabaseTracker::tracker().setDatabaseDirectoryPath(path);
// This database is created when the first HTML5 Database object is
// instantiated. If the file doesn't exist, we create it and set its
// permissions. The filename must match that in
// DatabaseTracker.cpp.
String filename = SQLiteFileSystem::appendDatabaseFileNameToPath(path, "Databases.db");
int fd = open(filename.utf8().data(), O_CREAT | O_EXCL, permissionFlags660);
if (fd >= 0)
close(fd);
}
}
#endif
#if ENABLE(FILE_SYSTEM)
flag = env->GetBooleanField(obj, gFieldIds->mFilesystemEnabled);
flag = env->GetBooleanField(obj, gFieldIds->mFileSystemPathHasBeenSet);
if (flag) {
// If the user has set the filesystem path, sync it to the LocalFileSystem.
str = (jstring)env->GetObjectField(obj, gFieldIds->mFileSystemPath);
if (str) {
String path = jstringToWtfString(env, str);
LocalFileSystem::localFileSystem().initializeLocalFileSystem(path);
}
}
#endif
// Samsung Change - HTML5 Web Notification >>
#if ENABLE(NOTIFICATIONS)
flag = env->GetBooleanField(obj, gFieldIds->mWebnotificationEnabled);
//flag = env->GetBooleanField(obj, gFieldIds->mFileSystemPathHasBeenSet);
//if (flag) {
// If the user has set the Web notification path, sync it to the NotificationPresenterImpl.
str = (jstring)env->GetObjectField(obj, gFieldIds->mWebnotificationDatabasePath);
if (str) {
String path = jstringToWtfString(env, str);
NotificationPresenterImpl::setDatabasePath(path);
}
// ALWAYS ON = 0
// ON_DEMAND = 1
// OFF = 2
jobject notificationState = env->GetObjectField(obj, gFieldIds->mNotificationState);
int notifystate = env->CallIntMethod(notificationState, gFieldIds->mOrdinal);
NotificationPresenterImpl::setSettingsValue(notifystate);
//s->setPluginsEnabled(state < 2);
//}
#endif
// Samsung Change - HTML5 Web Notification <<
#if ENABLE(DOM_STORAGE)
flag = env->GetBooleanField(obj, gFieldIds->mDomStorageEnabled);
s->setLocalStorageEnabled(flag);
str = (jstring)env->GetObjectField(obj, gFieldIds->mDatabasePath);
if (str) {
WTF::String localStorageDatabasePath = jstringToWtfString(env,str);
if (localStorageDatabasePath.length()) {
localStorageDatabasePath = WebCore::pathByAppendingComponent(
localStorageDatabasePath, "localstorage");
// We need 770 for folders
mkdir(localStorageDatabasePath.utf8().data(),
permissionFlags660 | S_IXUSR | S_IXGRP);
s->setLocalStorageDatabasePath(localStorageDatabasePath);
}
}
#endif
//SISO_HTMLComposer Start
flag = env->GetBooleanField(obj, gFieldIds->mEditableSupport);
if(flag)
s->setEditableLinkBehavior(WebCore::EditableLinkNeverLive);
s->setEditableSupportEnabled(flag);
flag = env->GetBooleanField(obj, gFieldIds->mDisableAnimation);
s->setDisableAnimation(flag);
flag = env->GetBooleanField(obj, gFieldIds->mHighResolutionDevice);
s->setHighResolutionDevice(flag);
//SISO_HTMLComposer End
//SAMSUNG ADVANCED TEXT SELECTION - BEGIN
flag = env->GetBooleanField(obj, gFieldIds->mAdvanceTextSelection);
s->setAdvancedSelectionEnabled(flag);
jlong color = env->GetLongField(obj, gFieldIds->mAdvanceSelectionBgColor);
if (-1 != color) {
int r = ((color & 0x00FF0000) >> 16);
int g = ((color & 0x0000FF00) >> 8);
int b = (color & 0x000000FF);
s->setAdvancedSelectionBgColor(r, g, b);
}
示例2: Sync
//.........这里部分代码省略.........
if (path.length() && WebCore::cacheStorage().cacheDirectory().isNull()) {
WebCore::cacheStorage().setCacheDirectory(path);
// This database is created on the first load. If the file
// doesn't exist, we create it and set its permissions. The
// filename must match that in ApplicationCacheStorage.cpp.
String filename = pathByAppendingComponent(path, "ApplicationCache.db");
int fd = open(filename.utf8().data(), O_CREAT | O_EXCL, permissionFlags660);
if (fd >= 0)
close(fd);
}
}
jlong maxsize = env->GetIntField(obj, gFieldIds->mAppCacheMaxSize);
WebCore::cacheStorage().setMaximumSize(maxsize);
#endif
flag = env->GetBooleanField(obj, gFieldIds->mJavaScriptCanOpenWindowsAutomatically);
s->setJavaScriptCanOpenWindowsAutomatically(flag);
#ifdef ANDROID_LAYOUT
flag = env->GetBooleanField(obj, gFieldIds->mUseWideViewport);
s->setUseWideViewport(flag);
#endif
#ifdef ANDROID_MULTIPLE_WINDOWS
flag = env->GetBooleanField(obj, gFieldIds->mSupportMultipleWindows);
s->setSupportMultipleWindows(flag);
#endif
flag = env->GetBooleanField(obj, gFieldIds->mShrinksStandaloneImagesToFit);
s->setShrinksStandaloneImagesToFit(flag);
#if ENABLE(DATABASE)
flag = env->GetBooleanField(obj, gFieldIds->mDatabaseEnabled);
s->setDatabasesEnabled(flag);
flag = env->GetBooleanField(obj, gFieldIds->mDatabasePathHasBeenSet);
if (flag) {
// If the user has set the database path, sync it to the DatabaseTracker.
str = (jstring)env->GetObjectField(obj, gFieldIds->mDatabasePath);
if (str) {
String path = to_string(env, str);
WebCore::DatabaseTracker::tracker().setDatabaseDirectoryPath(path);
// This database is created when the first HTML5 Database object is
// instantiated. If the file doesn't exist, we create it and set its
// permissions. The filename must match that in
// DatabaseTracker.cpp.
String filename = SQLiteFileSystem::appendDatabaseFileNameToPath(path, "Databases.db");
int fd = open(filename.utf8().data(), O_CREAT | O_EXCL, permissionFlags660);
if (fd >= 0)
close(fd);
}
}
#endif
#if ENABLE(DOM_STORAGE)
flag = env->GetBooleanField(obj, gFieldIds->mDomStorageEnabled);
s->setLocalStorageEnabled(flag);
str = (jstring)env->GetObjectField(obj, gFieldIds->mDatabasePath);
if (str) {
WebCore::String localStorageDatabasePath = to_string(env,str);
if (localStorageDatabasePath.length()) {
localStorageDatabasePath = WebCore::pathByAppendingComponent(
localStorageDatabasePath, "localstorage");
// We need 770 for folders
mkdir(localStorageDatabasePath.utf8().data(),
permissionFlags660 | S_IXUSR | S_IXGRP);
s->setLocalStorageDatabasePath(localStorageDatabasePath);
}
}
#endif
//SISO_HTMLCOMPOSER begin
flag = env->GetBooleanField(obj, gFieldIds->mEditableSupport);
if(flag)
s->setEditableLinkBehavior(WebCore::EditableLinkNeverLive);
s->setEditableSupportEnabled(flag);
///////SISO_HTMLCOMPOSER end
flag = env->GetBooleanField(obj, gFieldIds->mGeolocationEnabled);
GeolocationPermissions::setAlwaysDeny(!flag);
str = (jstring)env->GetObjectField(obj, gFieldIds->mGeolocationDatabasePath);
if (str) {
WebCore::String path = to_string(env, str);
GeolocationPermissions::setDatabasePath(path);
WebCore::GeolocationPositionCache::setDatabasePath(path);
// This database is created when the first Geolocation object is
// instantiated. If the file doesn't exist, we create it and set its
// permissions. The filename must match that in
// GeolocationPositionCache.cpp.
WebCore::String filename = WebCore::SQLiteFileSystem::appendDatabaseFileNameToPath(
path, "CachedGeoposition.db");
int fd = open(filename.utf8().data(), O_CREAT | O_EXCL, permissionFlags660);
if (fd >= 0)
close(fd);
}
size = env->GetIntField(obj, gFieldIds->mPageCacheCapacity);
if (size > 0) {
s->setUsesPageCache(true);
WebCore::pageCache()->setCapacity(size);
} else
s->setUsesPageCache(false);
}