Commit 332743e3 authored by andersca@apple.com's avatar andersca@apple.com

Add WKWebViewConfiguration class

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

Reviewed by Tim Horton.

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

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@162547 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent a3ea4823
2014-01-22 Anders Carlsson <andersca@apple.com>
Add WKWebViewConfiguration class
https://bugs.webkit.org/show_bug.cgi?id=127436
<rdar://problem/15882923>
Reviewed by Tim Horton.
* UIProcess/API/Cocoa/WKWebViewConfiguration.h: Added.
* UIProcess/API/Cocoa/WKWebViewConfiguration.mm: Added.
(-[WKWebViewConfiguration copyWithZone:]):
* WebKit2.xcodeproj/project.pbxproj:
2014-01-22 Alice Barraclough <alice.liu@apple.com>
[WK2] add cocoa API for private browsing setting
......
/*
* 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
@class WKProcessClass;
/*! A @link WKWebViewConfiguration @/link is a collection of properties used to initialize a web
view.
@helps Contains properties used to configure a @link WKWebView @/link.
*/
WK_API_CLASS
@interface WKWebViewConfiguration : NSObject <NSCopying>
/*! @abstract The process class of which the Web Content process for the view must be.
@discussion When the @link WKWebView @/link is initialized with the configuration, a new Web
content process of the specified class will be created for it, or an existing process of
that class will be used.
When this property is set to nil, a unique process class will be created for each
@link WKWebView @/link initialized with the configuration.
*/
@property (nonatomic, strong) WKProcessClass *processClass;
@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.
*/
#import "config.h"
#import "WKWebViewConfiguration.h"
@implementation WKWebViewConfiguration
- (id)copyWithZone:(NSZone *)zone
{
WKWebViewConfiguration *configuration = [[[self class] allocWithZone:zone] init];
configuration.processClass = _processClass;
return configuration;
}
@end
......@@ -312,6 +312,8 @@
1AD25E96167AB08100EA9BCD /* DownloadProxyMap.h in Headers */ = {isa = PBXBuildFile; fileRef = 1AD25E94167AB08100EA9BCD /* DownloadProxyMap.h */; };
1AD3306E16B1D991004F60E7 /* StorageAreaImpl.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AD3306C16B1D991004F60E7 /* StorageAreaImpl.cpp */; };
1AD3306F16B1D991004F60E7 /* StorageAreaImpl.h in Headers */ = {isa = PBXBuildFile; fileRef = 1AD3306D16B1D991004F60E7 /* StorageAreaImpl.h */; };
1ADF591A1890528E0043C145 /* WKWebViewConfiguration.mm in Sources */ = {isa = PBXBuildFile; fileRef = 1ADF59181890528E0043C145 /* WKWebViewConfiguration.mm */; };
1ADF591B1890528E0043C145 /* WKWebViewConfiguration.h in Headers */ = {isa = PBXBuildFile; fileRef = 1ADF59191890528E0043C145 /* WKWebViewConfiguration.h */; };
1AE00D4C182D6EB000087DD7 /* WKBrowsingContextHandle.mm in Sources */ = {isa = PBXBuildFile; fileRef = 1AE00D4A182D6EB000087DD7 /* WKBrowsingContextHandle.mm */; };
1AE00D4D182D6EB000087DD7 /* WKBrowsingContextHandle.h in Headers */ = {isa = PBXBuildFile; fileRef = 1AE00D4B182D6EB000087DD7 /* WKBrowsingContextHandle.h */; settings = {ATTRIBUTES = (Private, ); }; };
1AE00D4F182D6F5000087DD7 /* WKBrowsingContextHandleInternal.h in Headers */ = {isa = PBXBuildFile; fileRef = 1AE00D4E182D6F5000087DD7 /* WKBrowsingContextHandleInternal.h */; };
......@@ -1948,6 +1950,8 @@
1AD25E94167AB08100EA9BCD /* DownloadProxyMap.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DownloadProxyMap.h; sourceTree = "<group>"; };
1AD3306C16B1D991004F60E7 /* StorageAreaImpl.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = StorageAreaImpl.cpp; sourceTree = "<group>"; };
1AD3306D16B1D991004F60E7 /* StorageAreaImpl.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = StorageAreaImpl.h; sourceTree = "<group>"; };
1ADF59181890528E0043C145 /* WKWebViewConfiguration.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = WKWebViewConfiguration.mm; sourceTree = "<group>"; };
1ADF59191890528E0043C145 /* WKWebViewConfiguration.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WKWebViewConfiguration.h; sourceTree = "<group>"; };
1AE00D4A182D6EB000087DD7 /* WKBrowsingContextHandle.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = WKBrowsingContextHandle.mm; sourceTree = "<group>"; };
1AE00D4B182D6EB000087DD7 /* WKBrowsingContextHandle.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WKBrowsingContextHandle.h; sourceTree = "<group>"; };
1AE00D4E182D6F5000087DD7 /* WKBrowsingContextHandleInternal.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WKBrowsingContextHandleInternal.h; sourceTree = "<group>"; };
......@@ -4216,6 +4220,8 @@
1A43E828188F3CDC009E4D30 /* WKProcessClassConfiguration.h */,
1A43E827188F3CDC009E4D30 /* WKProcessClassConfiguration.mm */,
1A43E82B188F3CF5009E4D30 /* WKProcessClassConfigurationPrivate.h */,
1ADF59191890528E0043C145 /* WKWebViewConfiguration.h */,
1ADF59181890528E0043C145 /* WKWebViewConfiguration.mm */,
);
path = Cocoa;
sourceTree = "<group>";
......@@ -6482,6 +6488,7 @@
1AC8702D130B49A2002C1257 /* WebPluginSiteDataManager.h in Headers */,
BCB9F8B01124E07700A137E0 /* WebPolicyClient.h in Headers */,
518353DB1885BF8C00D9FE44 /* IDBSerialization.h in Headers */,
1ADF591B1890528E0043C145 /* WKWebViewConfiguration.h in Headers */,
BC5744F012638FB3006F0F12 /* WebPopupItem.h in Headers */,
51D54A73185BAC42000CAED2 /* IDBTransactionIdentifier.h in Headers */,
D3B9484711FF4B6500032B39 /* WebPopupMenu.h in Headers */,
......@@ -8040,6 +8047,7 @@
7CD5EBBE1746B04C000C1C45 /* WKTypeRefWrapper.mm in Sources */,
2DA944881884E3B500ED86DB /* PageClientImplIOS.mm in Sources */,
51BA24461858F55D00EA2811 /* WebCrossThreadCopier.cpp in Sources */,
1ADF591A1890528E0043C145 /* WKWebViewConfiguration.mm in Sources */,
BC407609124FF0270068F20A /* WKURL.cpp in Sources */,
BC40761B124FF0370068F20A /* WKURLCF.mm in Sources */,
1AC1338518590C4600F3EC05 /* RemoteObjectRegistryMessageReceiver.cpp 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