Changeset 158936 in webkit
- Timestamp:
- Nov 8, 2013 11:49:32 AM (11 years ago)
- Location:
- trunk/Source/WebKit2
- Files:
-
- 5 edited
- 3 copied
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebKit2/ChangeLog
r158930 r158936 1 2013-11-08 Anders Carlsson <andersca@apple.com> 2 3 Add A WKBrowsingContextHandle class 4 https://bugs.webkit.org/show_bug.cgi?id=124058 5 6 Reviewed by Sam Weinig. 7 8 The WKBrowsingContextHandle class represents a browsing context and can be sent across process boundaries. 9 10 * Shared/API/Cocoa/WKBrowsingContextHandle.h: Added. 11 * Shared/API/Cocoa/WKBrowsingContextHandle.mm: Added. 12 (-[WKBrowsingContextHandle _initWithPageID:]): 13 (-[WKBrowsingContextHandle encodeWithCoder:]): 14 (-[WKBrowsingContextHandle initWithCoder:]): 15 (+[WKBrowsingContextHandle supportsSecureCoding]): 16 * Shared/API/Cocoa/WKBrowsingContextHandleInternal.h: Added. 17 * UIProcess/API/mac/WKBrowsingContextController.mm: 18 (-[WKBrowsingContextController handle]): 19 * UIProcess/API/mac/WKBrowsingContextControllerInternal.h: 20 * UIProcess/API/mac/WKBrowsingContextControllerPrivate.h: 21 (NS_ENUM): 22 * WebKit2.xcodeproj/project.pbxproj: 23 1 24 2013-11-08 Anders Carlsson <andersca@apple.com> 2 25 -
trunk/Source/WebKit2/Shared/API/Cocoa/WKBrowsingContextHandle.h
r158930 r158936 1 1 /* 2 * Copyright (C) 201 1Apple Inc. All rights reserved.2 * Copyright (C) 2013 Apple Inc. All rights reserved. 3 3 * 4 4 * Redistribution and use in source and binary forms, with or without … … 24 24 */ 25 25 26 #import <WebKit2/WK BrowsingContextController.h>26 #import <WebKit2/WKFoundation.h> 27 27 28 @interface WKBrowsingContextController (Internal) 28 #if WK_API_ENABLED 29 29 30 /* This should only be called from associate view. */ 31 - (id)_initWithPageRef:(WKPageRef)pageRef; 30 WK_API_CLASS 31 @interface WKBrowsingContextHandle : NSObject <NSSecureCoding> 32 @end 32 33 33 /* Returns a WKBrowsingContextController associated with the WKPageRef. */ 34 + (WKBrowsingContextController *)_browsingContextControllerForPageRef:(WKPageRef)pageRef; 35 36 + (NSMutableSet *)customSchemes; 37 38 @end 34 #endif -
trunk/Source/WebKit2/Shared/API/Cocoa/WKBrowsingContextHandle.mm
r158930 r158936 1 1 /* 2 * Copyright (C) 201 1Apple Inc. All rights reserved.2 * Copyright (C) 2013 Apple Inc. All rights reserved. 3 3 * 4 4 * Redistribution and use in source and binary forms, with or without … … 24 24 */ 25 25 26 #import <WebKit2/WKBrowsingContextController.h> 26 #import "config.h" 27 #import "WKBrowsingContextHandleInternal.h" 27 28 28 @interface WKBrowsingContextController (Internal) 29 #if WK_API_ENABLED 29 30 30 /* This should only be called from associate view. */ 31 - (id)_initWithPageRef:(WKPageRef)pageRef; 31 @implementation WKBrowsingContextHandle 32 32 33 /* Returns a WKBrowsingContextController associated with the WKPageRef. */ 34 + (WKBrowsingContextController *)_browsingContextControllerForPageRef:(WKPageRef)pageRef; 33 - (id)_initWithPageID:(uint64_t)pageID 34 { 35 if (!(self = [super init])) 36 return nil; 35 37 36 + (NSMutableSet *)customSchemes; 38 _pageID = pageID; 39 40 return self; 41 } 42 43 - (void)encodeWithCoder:(NSCoder *)coder 44 { 45 [coder encodeInt64:_pageID forKey:@"pageID"]; 46 } 47 48 - (id)initWithCoder:(NSCoder *)coder 49 { 50 if (!(self = [super init])) 51 return nil; 52 53 _pageID = [coder decodeInt64ForKey:@"pageID"]; 54 55 return self; 56 } 57 58 + (BOOL)supportsSecureCoding 59 { 60 return YES; 61 } 37 62 38 63 @end 64 65 #endif // WK_API_ENABLED -
trunk/Source/WebKit2/Shared/API/Cocoa/WKBrowsingContextHandleInternal.h
r158930 r158936 1 1 /* 2 * Copyright (C) 201 1Apple Inc. All rights reserved.2 * Copyright (C) 2013 Apple Inc. All rights reserved. 3 3 * 4 4 * Redistribution and use in source and binary forms, with or without … … 24 24 */ 25 25 26 #import <WebKit2/WKBrowsingContextController.h>26 #import "WKBrowsingContextHandle.h" 27 27 28 @interface WKBrowsingContext Controller (Internal)28 @interface WKBrowsingContextHandle () 29 29 30 /* This should only be called from associate view. */ 31 - (id)_initWithPageRef:(WKPageRef)pageRef; 30 @property (nonatomic, readonly, getter = _pageID) uint64_t pageID; 32 31 33 /* Returns a WKBrowsingContextController associated with the WKPageRef. */ 34 + (WKBrowsingContextController *)_browsingContextControllerForPageRef:(WKPageRef)pageRef; 35 36 + (NSMutableSet *)customSchemes; 32 - (id)_initWithPageID:(uint64_t)pageID; 37 33 38 34 @end -
trunk/Source/WebKit2/UIProcess/API/mac/WKBrowsingContextController.mm
r158799 r158936 25 25 26 26 #import "config.h" 27 #import "WKBrowsingContextController.h"28 #import "WKBrowsingContextControllerPrivate.h"29 27 #import "WKBrowsingContextControllerInternal.h" 30 28 … … 50 48 #import <wtf/RetainPtr.h> 51 49 50 #import "WKBrowsingContextHandleInternal.h" 52 51 #import "WKBrowsingContextLoadDelegate.h" 53 52 #import "WKBrowsingContextPolicyDelegate.h" … … 459 458 } 460 459 460 - (WKBrowsingContextHandle *)handle 461 { 462 return [[[WKBrowsingContextHandle alloc] _initWithPageID:toImpl(self._pageRef)->pageID()] autorelease]; 463 } 464 461 465 @end 462 466 -
trunk/Source/WebKit2/UIProcess/API/mac/WKBrowsingContextControllerInternal.h
r157681 r158936 24 24 */ 25 25 26 #import <WebKit2/WKBrowsingContextController.h>26 #import "WKBrowsingContextControllerPrivate.h" 27 27 28 28 @interface WKBrowsingContextController (Internal) -
trunk/Source/WebKit2/UIProcess/API/mac/WKBrowsingContextControllerPrivate.h
r157681 r158936 27 27 #import <WebKit2/WKBase.h> 28 28 29 enum{29 typedef NS_ENUM(NSUInteger, WKBrowsingContextPaginationMode) { 30 30 WKPaginationModeUnpaginated, 31 31 WKPaginationModeLeftToRight, … … 34 34 WKPaginationModeBottomToTop, 35 35 }; 36 typedef NSUInteger WKBrowsingContextPaginationMode; 36 37 @class WKBrowsingContextHandle; 37 38 38 39 @interface WKBrowsingContextController (Private) 39 40 40 @property (readonly) WKPageRef _pageRef;41 @property (readonly) WKPageRef _pageRef; 41 42 42 43 @property WKBrowsingContextPaginationMode paginationMode; 44 43 45 // Whether the column-break-{before,after} properties are respected instead of the 44 46 // page-break-{before,after} properties. 45 47 @property BOOL paginationBehavesLikeColumns; 48 46 49 // Set to 0 to have the page length equal the view length. 47 50 @property CGFloat pageLength; 48 51 @property CGFloat gapBetweenPages; 49 52 50 @property(readonly) NSUInteger pageCount; 53 @property (readonly) NSUInteger pageCount; 54 55 #if WK_API_ENABLED 56 @property (nonatomic, readonly) WKBrowsingContextHandle *handle; 57 #endif 51 58 52 59 @end -
trunk/Source/WebKit2/WebKit2.xcodeproj/project.pbxproj
r158819 r158936 267 267 1AD3306E16B1D991004F60E7 /* StorageAreaImpl.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AD3306C16B1D991004F60E7 /* StorageAreaImpl.cpp */; }; 268 268 1AD3306F16B1D991004F60E7 /* StorageAreaImpl.h in Headers */ = {isa = PBXBuildFile; fileRef = 1AD3306D16B1D991004F60E7 /* StorageAreaImpl.h */; }; 269 1AE00D4C182D6EB000087DD7 /* WKBrowsingContextHandle.mm in Sources */ = {isa = PBXBuildFile; fileRef = 1AE00D4A182D6EB000087DD7 /* WKBrowsingContextHandle.mm */; }; 270 1AE00D4D182D6EB000087DD7 /* WKBrowsingContextHandle.h in Headers */ = {isa = PBXBuildFile; fileRef = 1AE00D4B182D6EB000087DD7 /* WKBrowsingContextHandle.h */; }; 271 1AE00D4F182D6F5000087DD7 /* WKBrowsingContextHandleInternal.h in Headers */ = {isa = PBXBuildFile; fileRef = 1AE00D4E182D6F5000087DD7 /* WKBrowsingContextHandleInternal.h */; }; 269 272 1AE117F611DBB30900981615 /* ProcessLauncher.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AE117F511DBB30900981615 /* ProcessLauncher.cpp */; }; 270 273 1AE4976811FF658E0048B464 /* NPJSObject.h in Headers */ = {isa = PBXBuildFile; fileRef = 1AE4976611FF658E0048B464 /* NPJSObject.h */; }; … … 1751 1754 1AD3306C16B1D991004F60E7 /* StorageAreaImpl.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = StorageAreaImpl.cpp; sourceTree = "<group>"; }; 1752 1755 1AD3306D16B1D991004F60E7 /* StorageAreaImpl.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = StorageAreaImpl.h; sourceTree = "<group>"; }; 1756 1AE00D4A182D6EB000087DD7 /* WKBrowsingContextHandle.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = WKBrowsingContextHandle.mm; sourceTree = "<group>"; }; 1757 1AE00D4B182D6EB000087DD7 /* WKBrowsingContextHandle.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WKBrowsingContextHandle.h; sourceTree = "<group>"; }; 1758 1AE00D4E182D6F5000087DD7 /* WKBrowsingContextHandleInternal.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WKBrowsingContextHandleInternal.h; sourceTree = "<group>"; }; 1753 1759 1AE117F511DBB30900981615 /* ProcessLauncher.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ProcessLauncher.cpp; sourceTree = "<group>"; }; 1754 1760 1AE4976611FF658E0048B464 /* NPJSObject.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NPJSObject.h; sourceTree = "<group>"; }; … … 3730 3736 isa = PBXGroup; 3731 3737 children = ( 3738 1AE00D4B182D6EB000087DD7 /* WKBrowsingContextHandle.h */, 3739 1AE00D4A182D6EB000087DD7 /* WKBrowsingContextHandle.mm */, 3740 1AE00D4E182D6F5000087DD7 /* WKBrowsingContextHandleInternal.h */, 3732 3741 37DFA6FF1810BB92001F4A9F /* WKFoundation.h */, 3733 3742 1A9E32991822E1CC00F5D04C /* WKRemoteObject.h */, … … 5619 5628 51FCB18917BBFE0300394CD8 /* SynchronousNetworkLoaderClient.h in Headers */, 5620 5629 BCF505E71243047B005955AE /* PlatformCertificateInfo.h in Headers */, 5630 1AE00D4F182D6F5000087DD7 /* WKBrowsingContextHandleInternal.h in Headers */, 5621 5631 BCC43ABB127B95DC00317F16 /* PlatformPopupMenuData.h in Headers */, 5622 5632 BC8780FC1161C2B800CC2768 /* PlatformProcessIdentifier.h in Headers */, … … 5896 5906 BC57450C1263B155006F0F12 /* WKBundleNodeHandlePrivate.h in Headers */, 5897 5907 BC20528111C94284008F3375 /* WKBundlePage.h in Headers */, 5908 1AE00D4D182D6EB000087DD7 /* WKBrowsingContextHandle.h in Headers */, 5898 5909 7CF47FF717275B71008ACB91 /* WKBundlePageBanner.h in Headers */, 5899 5910 7CF47FFF17276AE3008ACB91 /* WKBundlePageBannerMac.h in Headers */, … … 6762 6773 E1A31735134CEA80007C9A4F /* AttributedString.mm in Sources */, 6763 6774 512F589612A8838800629530 /* AuthenticationChallengeProxy.cpp in Sources */, 6775 1AE00D4C182D6EB000087DD7 /* WKBrowsingContextHandle.mm in Sources */, 6764 6776 512F589812A8838800629530 /* AuthenticationDecisionListener.cpp in Sources */, 6765 6777 518E8EF816B2091C00E91429 /* AuthenticationManager.cpp in Sources */,
Note: See TracChangeset
for help on using the changeset viewer.