本文整理汇总了C++中webcore::Settings::setFormatDetectionAddress方法的典型用法代码示例。如果您正苦于以下问题:C++ Settings::setFormatDetectionAddress方法的具体用法?C++ Settings::setFormatDetectionAddress怎么用?C++ Settings::setFormatDetectionAddress使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类webcore::Settings
的用法示例。
在下文中一共展示了Settings::setFormatDetectionAddress方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: Sync
//.........这里部分代码省略.........
#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);
jlong maxImage = env->GetLongField(obj, gFieldIds->mMaximumDecodedImageSize);
// Since in ImageSourceAndroid.cpp, the image will always not exceed
// MAX_SIZE_BEFORE_SUBSAMPLE, there's no need to pass the max value to
// WebCore, which checks (image_width * image_height * 4) as an
// estimation against the max value, which is done in CachedImage.cpp.
// And there're cases where the decoded image size will not
// exceed the max, but the WebCore estimation will. So the following
// code is commented out to fix those cases.
// if (maxImage == 0)
// maxImage = computeMaxBitmapSizeForCache();
s->setMaximumDecodedImageSize(maxImage);
flag = env->GetBooleanField(obj, gFieldIds->mPrivateBrowsingEnabled);
s->setPrivateBrowsingEnabled(flag);
flag = env->GetBooleanField(obj, gFieldIds->mSyntheticLinksEnabled);
s->setDefaultFormatDetection(flag);
s->setFormatDetectionAddress(flag);
s->setFormatDetectionEmail(flag);
s->setFormatDetectionTelephone(flag);
#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(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(
示例2: Sync
//.........这里部分代码省略.........
#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);
jlong maxImage = env->GetLongField(obj, gFieldIds->mMaximumDecodedImageSize);
// Since in ImageSourceAndroid.cpp, the image will always not exceed
// MAX_SIZE_BEFORE_SUBSAMPLE, there's no need to pass the max value to
// WebCore, which checks (image_width * image_height * 4) as an
// estimation against the max value, which is done in CachedImage.cpp.
// And there're cases where the decoded image size will not
// exceed the max, but the WebCore estimation will. So the following
// code is commented out to fix those cases.
// if (maxImage == 0)
// maxImage = computeMaxBitmapSizeForCache();
s->setMaximumDecodedImageSize(maxImage);
flag = env->GetBooleanField(obj, gFieldIds->mPrivateBrowsingEnabled);
s->setPrivateBrowsingEnabled(flag);
flag = env->GetBooleanField(obj, gFieldIds->mSyntheticLinksEnabled);
s->setDefaultFormatDetection(flag);
s->setFormatDetectionAddress(flag);
s->setFormatDetectionEmail(flag);
s->setFormatDetectionTelephone(flag);
#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);