LEFT | RIGHT |
1 /* | 1 /* |
2 * Copyright (C) 2010-2016 Apple Inc. All rights reserved. | 2 * Copyright (C) 2010-2016 Apple Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
6 * are met: | 6 * are met: |
7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
86 | 86 |
87 #if WK_API_ENABLED | 87 #if WK_API_ENABLED |
88 static WKWebViewConfiguration *defaultConfiguration() | 88 static WKWebViewConfiguration *defaultConfiguration() |
89 { | 89 { |
90 static WKWebViewConfiguration *configuration; | 90 static WKWebViewConfiguration *configuration; |
91 | 91 |
92 if (!configuration) { | 92 if (!configuration) { |
93 configuration = [[WKWebViewConfiguration alloc] init]; | 93 configuration = [[WKWebViewConfiguration alloc] init]; |
94 configuration.preferences._fullScreenEnabled = YES; | 94 configuration.preferences._fullScreenEnabled = YES; |
95 configuration.preferences._developerExtrasEnabled = YES; | 95 configuration.preferences._developerExtrasEnabled = YES; |
96 configuration.preferences.safeBrowsingEnabled = YES; | 96 configuration.preferences.safeBrowsingEnabled = [SettingsController shar
ed].safeBrowsingEnabled; |
97 | 97 |
98 _WKProcessPoolConfiguration *processConfiguration = [[[_WKProcessPoolCon
figuration alloc] init] autorelease]; | 98 _WKProcessPoolConfiguration *processConfiguration = [[[_WKProcessPoolCon
figuration alloc] init] autorelease]; |
99 processConfiguration.diskCacheSpeculativeValidationEnabled = ![SettingsC
ontroller shared].networkCacheSpeculativeRevalidationDisabled; | 99 processConfiguration.diskCacheSpeculativeValidationEnabled = ![SettingsC
ontroller shared].networkCacheSpeculativeRevalidationDisabled; |
100 if ([SettingsController shared].perWindowWebProcessesDisabled) | 100 if ([SettingsController shared].perWindowWebProcessesDisabled) |
101 processConfiguration.maximumProcessCount = 1; | 101 processConfiguration.maximumProcessCount = 1; |
102 if ([SettingsController shared].processSwapOnNavigationEnabled) | 102 if ([SettingsController shared].processSwapOnNavigationEnabled) |
103 processConfiguration.processSwapsOnNavigation = true; | 103 processConfiguration.processSwapsOnNavigation = true; |
104 if ([SettingsController shared].processSwapOnWindowOpenWithOpenerEnabled
) | 104 if ([SettingsController shared].processSwapOnWindowOpenWithOpenerEnabled
) |
105 processConfiguration.processSwapsOnWindowOpenWithOpener = true; | 105 processConfiguration.processSwapsOnWindowOpenWithOpener = true; |
106 ········ | 106 ········ |
(...skipping 225 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
332 - (IBAction)clearDefaultStoreWebsiteData:(id)sender | 332 - (IBAction)clearDefaultStoreWebsiteData:(id)sender |
333 { | 333 { |
334 [[WKWebsiteDataStore defaultDataStore] removeDataOfTypes:[WKWebsiteDataStore
allWebsiteDataTypes] modifiedSince:[NSDate distantPast] completionHandler:^{ | 334 [[WKWebsiteDataStore defaultDataStore] removeDataOfTypes:[WKWebsiteDataStore
allWebsiteDataTypes] modifiedSince:[NSDate distantPast] completionHandler:^{ |
335 NSLog(@"Did clear default store website data."); | 335 NSLog(@"Did clear default store website data."); |
336 }]; | 336 }]; |
337 } | 337 } |
338 | 338 |
339 #endif | 339 #endif |
340 | 340 |
341 @end | 341 @end |
LEFT | RIGHT |