Commit 3af9b01d authored by andersca@apple.com's avatar andersca@apple.com

Add a WKProcessClassConfiguration class

https://bugs.webkit.org/show_bug.cgi?id=127378
<rdar://problem/15875413>

Reviewed by Dan Bernstein.

* UIProcess/API/Cocoa/WKProcessClassConfiguration.h: Added.
* UIProcess/API/Cocoa/WKProcessClassConfiguration.mm: Added.
(-[WKProcessClassConfiguration copyWithZone:]):
* UIProcess/API/Cocoa/WKProcessClassConfigurationPrivate.h: Added.
* WebKit2.xcodeproj/project.pbxproj:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@162487 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 6cdf1d0f
2014-01-21 Anders Carlsson <andersca@apple.com>
Add a WKProcessClassConfiguration class
https://bugs.webkit.org/show_bug.cgi?id=127378
<rdar://problem/15875413>
Reviewed by Dan Bernstein.
* UIProcess/API/Cocoa/WKProcessClassConfiguration.h: Added.
* UIProcess/API/Cocoa/WKProcessClassConfiguration.mm: Added.
(-[WKProcessClassConfiguration copyWithZone:]):
* UIProcess/API/Cocoa/WKProcessClassConfigurationPrivate.h: Added.
* WebKit2.xcodeproj/project.pbxproj:
2014-01-21 Tim Horton <timothy_horton@apple.com>
Make ViewGestureController Obj-C++
......
/*
* Copyright (C) 2014 Apple Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
* THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
* THE POSSIBILITY OF SUCH DAMAGE.
*/
#import <Foundation/Foundation.h>
#import <WebKit2/WKFoundation.h>
#if WK_API_ENABLED
/*! A WKProcessClassConfiguration is used to characterize a class of Web Content processes.
@helps Contains properties used to configure a @link WKProcessClass @/link.
*/
WK_API_CLASS
@interface WKProcessClassConfiguration : NSObject <NSCopying>
/*! @abstract The maximum number of Web Content processes of the class that may exist at any time.
@discussion When the number of Web Content processes of the class reaches this value, one of the
existing processes will be used for any new @link WKWebView @/link configured to use the
same class.
A value of 0 means that WebKit will automatically choose a maximum. This is the default.
*/
@property (nonatomic) NSUInteger maximumProcessCount;
@end
#endif
/*
* Copyright (C) 2014 Apple Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
* THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
* THE POSSIBILITY OF SUCH DAMAGE.
*/
#include "config.h"
#include "WKProcessClassConfigurationPrivate.h"
@implementation WKProcessClassConfiguration
- (id)copyWithZone:(NSZone *)zone
{
WKProcessClassConfiguration *configuration = [[[self class] allocWithZone:zone] init];
configuration.maximumProcessCount = self.maximumProcessCount;
configuration._injectedBundleURL = self._injectedBundleURL;
return configuration;
}
@end
/*
* Copyright (C) 2014 Apple Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
* THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
* THE POSSIBILITY OF SUCH DAMAGE.
*/
#import <WebKit2/WKProcessClassConfiguration.h>
#if WK_API_ENABLED
@interface WKProcessClassConfiguration (WKPrivate)
/*! @abstract The location of a bundle that will be loaded into Web Content processes of the
class.
*/
@property (nonatomic, copy, setter=_setInjectedBundleURL:) NSURL *_injectedBundleURL;
@end
#endif
......@@ -152,6 +152,9 @@
1A3EED0F161A535400AEB4F5 /* MessageReceiverMap.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A3EED0D161A535300AEB4F5 /* MessageReceiverMap.h */; };
1A3EED12161A53D600AEB4F5 /* MessageReceiver.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A3EED11161A53D600AEB4F5 /* MessageReceiver.h */; };
1A433F0D113C53DD00FACDE9 /* WebErrors.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A433F0C113C53DD00FACDE9 /* WebErrors.h */; };
1A43E829188F3CDC009E4D30 /* WKProcessClassConfiguration.mm in Sources */ = {isa = PBXBuildFile; fileRef = 1A43E827188F3CDC009E4D30 /* WKProcessClassConfiguration.mm */; };
1A43E82A188F3CDC009E4D30 /* WKProcessClassConfiguration.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A43E828188F3CDC009E4D30 /* WKProcessClassConfiguration.h */; settings = {ATTRIBUTES = (Public, ); }; };
1A43E82C188F3CF5009E4D30 /* WKProcessClassConfigurationPrivate.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A43E82B188F3CF5009E4D30 /* WKProcessClassConfigurationPrivate.h */; settings = {ATTRIBUTES = (Private, ); }; };
1A445B9F184D5FB5004B3414 /* WKContextInjectedBundleClient.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A445B9E184D5FB5004B3414 /* WKContextInjectedBundleClient.h */; settings = {ATTRIBUTES = (Private, ); }; };
1A445BA1184D5FC1004B3414 /* WKContextHistoryClient.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A445BA0184D5FC1004B3414 /* WKContextHistoryClient.h */; settings = {ATTRIBUTES = (Private, ); }; };
1A445BA3184D5FCF004B3414 /* WKContextDownloadClient.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A445BA2184D5FCF004B3414 /* WKContextDownloadClient.h */; settings = {ATTRIBUTES = (Private, ); }; };
......@@ -561,7 +564,7 @@
37C4E9F6131C6E7E0029BD5A /* config.h in Headers */ = {isa = PBXBuildFile; fileRef = B396EA5512E0ED2D00F4FEB7 /* config.h */; };
37D0B5C61845218400F6CE7D /* WKErrorRecoveryAttempting.h in Headers */ = {isa = PBXBuildFile; fileRef = 37D0B5C51845218400F6CE7D /* WKErrorRecoveryAttempting.h */; settings = {ATTRIBUTES = (Private, ); }; };
37D0B5C81845232700F6CE7D /* WKErrorRecoveryAttempting.m in Sources */ = {isa = PBXBuildFile; fileRef = 37D0B5C71845232700F6CE7D /* WKErrorRecoveryAttempting.m */; };
37DFA7001810BB92001F4A9F /* WKFoundation.h in Headers */ = {isa = PBXBuildFile; fileRef = 37DFA6FF1810BB92001F4A9F /* WKFoundation.h */; settings = {ATTRIBUTES = (Private, ); }; };
37DFA7001810BB92001F4A9F /* WKFoundation.h in Headers */ = {isa = PBXBuildFile; fileRef = 37DFA6FF1810BB92001F4A9F /* WKFoundation.h */; settings = {ATTRIBUTES = (Public, ); }; };
37F623B812A57B6200E3FDF6 /* WKFindOptions.h in Headers */ = {isa = PBXBuildFile; fileRef = 37F623B712A57B6200E3FDF6 /* WKFindOptions.h */; settings = {ATTRIBUTES = (Private, ); }; };
37F90DE31376560E0051CF68 /* HTTPCookieAcceptPolicy.h in Headers */ = {isa = PBXBuildFile; fileRef = F638954F133BEF38008941D5 /* HTTPCookieAcceptPolicy.h */; };
37FC19471850FBF2008CFA47 /* WKBrowsingContextLoadDelegatePrivate.h in Headers */ = {isa = PBXBuildFile; fileRef = 37FC19461850FBF2008CFA47 /* WKBrowsingContextLoadDelegatePrivate.h */; settings = {ATTRIBUTES = (Private, ); }; };
......@@ -1763,6 +1766,9 @@
1A3EED0D161A535300AEB4F5 /* MessageReceiverMap.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MessageReceiverMap.h; sourceTree = "<group>"; };
1A3EED11161A53D600AEB4F5 /* MessageReceiver.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MessageReceiver.h; sourceTree = "<group>"; };
1A433F0C113C53DD00FACDE9 /* WebErrors.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebErrors.h; sourceTree = "<group>"; };
1A43E827188F3CDC009E4D30 /* WKProcessClassConfiguration.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = WKProcessClassConfiguration.mm; sourceTree = "<group>"; };
1A43E828188F3CDC009E4D30 /* WKProcessClassConfiguration.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WKProcessClassConfiguration.h; sourceTree = "<group>"; };
1A43E82B188F3CF5009E4D30 /* WKProcessClassConfigurationPrivate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WKProcessClassConfigurationPrivate.h; sourceTree = "<group>"; };
1A445B9E184D5FB5004B3414 /* WKContextInjectedBundleClient.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WKContextInjectedBundleClient.h; sourceTree = "<group>"; };
1A445BA0184D5FC1004B3414 /* WKContextHistoryClient.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WKContextHistoryClient.h; sourceTree = "<group>"; };
1A445BA2184D5FCF004B3414 /* WKContextDownloadClient.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WKContextDownloadClient.h; sourceTree = "<group>"; };
......@@ -4202,6 +4208,9 @@
isa = PBXGroup;
children = (
1A43E826188F38E2009E4D30 /* Deprecated */,
1A43E828188F3CDC009E4D30 /* WKProcessClassConfiguration.h */,
1A43E827188F3CDC009E4D30 /* WKProcessClassConfiguration.mm */,
1A43E82B188F3CF5009E4D30 /* WKProcessClassConfigurationPrivate.h */,
);
path = Cocoa;
sourceTree = "<group>";
......@@ -6059,7 +6068,9 @@
7CA254EB182993CE00FC8A41 /* WKBrowsingContextPolicyDelegate.h in Headers */,
37C4C08718149C5B003688B9 /* WKBackForwardListItem.h in Headers */,
1F335BC0185B84F0001A201A /* WKWebProcessPlugInLoadDelegate.h in Headers */,
1A43E82C188F3CF5009E4D30 /* WKProcessClassConfigurationPrivate.h in Headers */,
1F7506B41859164C00EC0FF7 /* WKWebProcessPlugInScriptWorld.h in Headers */,
1A43E82A188F3CDC009E4D30 /* WKProcessClassConfiguration.h in Headers */,
1F7506B31859164500EC0FF7 /* WKWebProcessPlugInNodeHandle.h in Headers */,
377EAD4517E2C51A002D193D /* WKDeclarationSpecifiers.h in Headers */,
1FB00AC7185F76460019142E /* WKWebProcessPlugInPageGroup.h in Headers */,
......@@ -7479,6 +7490,7 @@
2DA944A21884E4F000ED86DB /* WebPlatformTouchPointIOS.cpp in Sources */,
2D28F3E51885CCC1004B9EAE /* WebDatabaseManagerIOS.mm in Sources */,
51B15A8413843A3900321AD8 /* EnvironmentUtilities.cpp in Sources */,
1A43E829188F3CDC009E4D30 /* WKProcessClassConfiguration.mm in Sources */,
1A7C6CDA1378950800B9C04D /* EnvironmentVariables.cpp in Sources */,
1AA575FA1496B52600A4EE06 /* EventDispatcher.cpp in Sources */,
1A9E328A1821636900F5D04C /* WKRemoteObjectRegistry.mm in Sources */,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment