Changeset 157676 in webkit
- Timestamp:
- Oct 19, 2013, 1:18:11 PM (12 years ago)
- Location:
- trunk/Source/WebKit2
- Files:
-
- 14 edited
Legend:
- Unmodified
- Added
- Removed
-
TabularUnified trunk/Source/WebKit2/ChangeLog ¶
r157666 r157676 1 2013-10-19 Dan Bernstein <mitz@apple.com> 2 3 [Cocoa] Remove some indirection that was only necessary for supporting the legacy Objective-C runtime 4 https://bugs.webkit.org/show_bug.cgi?id=123065 5 6 Reviewed by Sam Weinig. 7 8 * UIProcess/API/mac/WKBrowsingContextController.h: Added WK_API_ENABLED guard. Removed _data 9 ivar and WKBrowsingContextControllerData class declaration. 10 * UIProcess/API/mac/WKBrowsingContextController.mm: Added WK_API_ENABLED guard. Removed 11 WKBrowsingContextControllerData class and moved _pageRef ivar directly into 12 WKBrowsingContextController, declaring it in the @implementation. Removed ivar and accessors 13 for the loadDelegate property, letting the compiler synthesize them. 14 (-[WKBrowsingContextController dealloc]): Removed indirection via _data. 15 (-[WKBrowsingContextController _pageRef]): Ditto. 16 (-[WKBrowsingContextController loadRequest:userData:]): Removed indirection via -_pageRef. 17 (-[WKBrowsingContextController loadFileURL:restrictToFilesWithin:userData:]): Ditto. 18 (-[WKBrowsingContextController loadHTMLString:baseURL:userData:]): Ditto. 19 (-[WKBrowsingContextController loadData:MIMEType:textEncodingName:baseURL:userData:]): 20 Ditto. 21 (-[WKBrowsingContextController stopLoading]): Ditto. 22 (-[WKBrowsingContextController reload]): Ditto. 23 (-[WKBrowsingContextController reloadFromOrigin]): Ditto. 24 (-[WKBrowsingContextController goForward]): Ditto. 25 (-[WKBrowsingContextController canGoForward]): Ditto. 26 (-[WKBrowsingContextController goBack]): Ditto. 27 (-[WKBrowsingContextController canGoBack]): Ditto. 28 (-[WKBrowsingContextController activeURL]): Ditto. 29 (-[WKBrowsingContextController provisionalURL]): Ditto. 30 (-[WKBrowsingContextController committedURL]): Ditto. 31 (-[WKBrowsingContextController title]): Ditto. 32 (-[WKBrowsingContextController textZoom]): Ditto. 33 (-[WKBrowsingContextController setTextZoom:]): Ditto. 34 (-[WKBrowsingContextController pageZoom]): Ditto. 35 (-[WKBrowsingContextController setPageZoom:]): Ditto. 36 (-[WKBrowsingContextController setPaginationMode:]): Ditto. 37 (-[WKBrowsingContextController paginationMode]): Ditto. 38 (-[WKBrowsingContextController setPaginationBehavesLikeColumns:]): Ditto. 39 (-[WKBrowsingContextController paginationBehavesLikeColumns]): Ditto. 40 (-[WKBrowsingContextController setPageLength:]): Ditto. 41 (-[WKBrowsingContextController pageLength]): Ditto. 42 (-[WKBrowsingContextController setGapBetweenPages:]): Ditto. 43 (-[WKBrowsingContextController gapBetweenPages]): Ditto. 44 (-[WKBrowsingContextController pageCount]): Ditto. 45 (-[WKBrowsingContextController _initWithPageRef:]): Removed indirection via _data. 46 * UIProcess/API/mac/WKBrowsingContextControllerInternal.h: Added WK_API_ENABLED guard. 47 * UIProcess/API/mac/WKBrowsingContextControllerPrivate.h: Ditto. 48 49 * UIProcess/API/mac/WKBrowsingContextGroup.h: Added WK_API_ENABLED guard. Removed _data ivar 50 and WKBrowsingContextGroupData class declaration. 51 * UIProcess/API/mac/WKBrowsingContextGroup.mm: Added WK_API_ENABLED guard. Removed 52 WKBrowsingContextGroupData class and moved _pageGroupRef ivar directly info 53 WKBrowsingContextGroup, declaring it in the @implementation. 54 (-[WKBrowsingContextGroup initWithIdentifier:]): Removed indirection via _data. 55 (-[WKBrowsingContextGroup _pageGroupRef]): Ditto. 56 * UIProcess/API/mac/WKBrowsingContextGroupPrivate.h: Added WK_API_ENABLED guard. 57 58 * UIProcess/API/mac/WKConnection.h: Added WK_API_ENABLED guard. Removed _data ivar and 59 WKConnectionData class declaration. 60 * UIProcess/API/mac/WKConnection.mm: Added WK_API_ENABLED guard. Removed WKConnectionData 61 class and moved _connectionRef ivar directly into WKConnection, declaring it in the 62 @implementation. Removed ivar and accessors for the delegate property, letting the compiler 63 synthesize them. 64 (-[WKConnection dealloc]): Removed indirection via _data. 65 (-[WKConnection sendMessageWithName:body:]): Ditto. 66 (-[WKConnection _initWithConnectionRef:]): Ditto. 67 * UIProcess/API/mac/WKConnectionInternal.h: Added WK_API_ENABLED guard. 68 69 * UIProcess/API/mac/WKProcessGroup.h: Added WK_API_ENABLED guard. Replaced forward 70 declaration of WKConnection with an import. Removed _data ivar and WKProcessGroupData class 71 declaration. 72 * UIProcess/API/mac/WKProcessGroup.mm: Added WK_API_ENABLED guard. Removed 73 WKProcessGroupData class and moved _contextRef ivar directly into WKProcessGroup, declaring 74 it in the @implementation. Removed ivar and accessors for the delegate property, letting the 75 compiler synthesize them. 76 (-[WKProcessGroup initWithInjectedBundleURL:]): Removed indirection via _data. 77 (-[WKProcessGroup dealloc]): Ditto. 78 (-[WKProcessGroup _contextRef]): Ditto. 79 * UIProcess/API/mac/WKProcessGroupPrivate.h: Added WK_API_ENABLED guard. 80 1 81 2013-10-19 Andreas Kling <akling@apple.com> 2 82 -
TabularUnified trunk/Source/WebKit2/UIProcess/API/mac/WKBrowsingContextController.h ¶
r155770 r157676 26 26 #import <Foundation/Foundation.h> 27 27 #import <WebKit2/WKDeclarationSpecifiers.h> 28 #import <WebKit2/WKFoundation.h> 28 29 29 @class WKBrowsingContextControllerData; 30 #if WK_API_ENABLED 31 30 32 @protocol WKBrowsingContextLoadDelegate; 31 33 32 34 WK_EXPORT 33 @interface WKBrowsingContextController : NSObject { 34 @private 35 WKBrowsingContextControllerData *_data; 36 } 35 @interface WKBrowsingContextController : NSObject 37 36 38 37 #pragma mark Delegates … … 119 118 120 119 @end 120 121 #endif // WK_API_ENABLED -
TabularUnified trunk/Source/WebKit2/UIProcess/API/mac/WKBrowsingContextController.mm ¶
r157648 r157676 29 29 #import "WKBrowsingContextControllerInternal.h" 30 30 31 #if WK_API_ENABLED 32 31 33 #import "ObjCObjectGraph.h" 32 34 #import "WKErrorCF.h" … … 58 60 } 59 61 60 @interface WKBrowsingContextControllerData : NSObject { 61 @public 62 @implementation WKBrowsingContextController { 62 63 // Underlying WKPageRef. 63 64 WKRetainPtr<WKPageRef> _pageRef; 64 65 // Delegate for load callbacks. 66 id<WKBrowsingContextLoadDelegate> _loadDelegate; 67 } 68 @end 69 70 @implementation WKBrowsingContextControllerData 71 @end 72 73 74 @implementation WKBrowsingContextController 65 } 75 66 76 67 - (void)dealloc 77 68 { 78 WKPageSetPageLoaderClient(_data->_pageRef.get(), 0); 79 80 [_data release]; 69 WKPageSetPageLoaderClient(_pageRef.get(), 0); 70 81 71 [super dealloc]; 82 72 } … … 84 74 - (WKPageRef)_pageRef 85 75 { 86 return _data->_pageRef.get(); 87 } 88 89 #pragma mark Delegates 90 91 - (id<WKBrowsingContextLoadDelegate>)loadDelegate 92 { 93 return _data->_loadDelegate; 94 } 95 96 - (void)setLoadDelegate:(id<WKBrowsingContextLoadDelegate>)loadDelegate 97 { 98 _data->_loadDelegate = loadDelegate; 76 return _pageRef.get(); 99 77 } 100 78 … … 134 112 wkUserData = ObjCObjectGraph::create(userData); 135 113 136 WKPageLoadURLRequestWithUserData( self._pageRef, wkRequest.get(), (WKTypeRef)wkUserData.get());114 WKPageLoadURLRequestWithUserData(_pageRef.get(), wkRequest.get(), (WKTypeRef)wkUserData.get()); 137 115 } 138 116 … … 154 132 wkUserData = ObjCObjectGraph::create(userData); 155 133 156 WKPageLoadFileWithUserData( self._pageRef, wkURL.get(), wkAllowedDirectory.get(), (WKTypeRef)wkUserData.get());134 WKPageLoadFileWithUserData(_pageRef.get(), wkURL.get(), wkAllowedDirectory.get(), (WKTypeRef)wkUserData.get()); 157 135 } 158 136 … … 176 154 wkUserData = ObjCObjectGraph::create(userData); 177 155 178 WKPageLoadHTMLStringWithUserData( self._pageRef, wkHTMLString.get(), wkBaseURL.get(), (WKTypeRef)wkUserData.get());156 WKPageLoadHTMLStringWithUserData(_pageRef.get(), wkHTMLString.get(), wkBaseURL.get(), (WKTypeRef)wkUserData.get()); 179 157 } 180 158 … … 213 191 wkUserData = ObjCObjectGraph::create(userData); 214 192 215 WKPageLoadDataWithUserData( self._pageRef, toAPI(wkData.get()), wkMIMEType.get(), wkEncodingName.get(), wkBaseURL.get(), (WKTypeRef)wkUserData.get());193 WKPageLoadDataWithUserData(_pageRef.get(), toAPI(wkData.get()), wkMIMEType.get(), wkEncodingName.get(), wkBaseURL.get(), (WKTypeRef)wkUserData.get()); 216 194 } 217 195 218 196 - (void)stopLoading 219 197 { 220 WKPageStopLoading( self._pageRef);198 WKPageStopLoading(_pageRef.get()); 221 199 } 222 200 223 201 - (void)reload 224 202 { 225 WKPageReload( self._pageRef);203 WKPageReload(_pageRef.get()); 226 204 } 227 205 228 206 - (void)reloadFromOrigin 229 207 { 230 WKPageReloadFromOrigin( self._pageRef);208 WKPageReloadFromOrigin(_pageRef.get()); 231 209 } 232 210 … … 235 213 - (void)goForward 236 214 { 237 WKPageGoForward( self._pageRef);215 WKPageGoForward(_pageRef.get()); 238 216 } 239 217 240 218 - (BOOL)canGoForward 241 219 { 242 return WKPageCanGoForward( self._pageRef);220 return WKPageCanGoForward(_pageRef.get()); 243 221 } 244 222 245 223 - (void)goBack 246 224 { 247 WKPageGoBack( self._pageRef);225 WKPageGoBack(_pageRef.get()); 248 226 } 249 227 250 228 - (BOOL)canGoBack 251 229 { 252 return WKPageCanGoBack( self._pageRef);230 return WKPageCanGoBack(_pageRef.get()); 253 231 } 254 232 … … 258 236 - (NSURL *)activeURL 259 237 { 260 return autoreleased(WKPageCopyActiveURL( self._pageRef));238 return autoreleased(WKPageCopyActiveURL(_pageRef.get())); 261 239 } 262 240 263 241 - (NSURL *)provisionalURL 264 242 { 265 return autoreleased(WKPageCopyProvisionalURL( self._pageRef));243 return autoreleased(WKPageCopyProvisionalURL(_pageRef.get())); 266 244 } 267 245 268 246 - (NSURL *)committedURL 269 247 { 270 return autoreleased(WKPageCopyCommittedURL( self._pageRef));248 return autoreleased(WKPageCopyCommittedURL(_pageRef.get())); 271 249 } 272 250 … … 275 253 - (NSString *)title 276 254 { 277 return autoreleased(WKPageCopyTitle( self._pageRef));255 return autoreleased(WKPageCopyTitle(_pageRef.get())); 278 256 } 279 257 … … 282 260 - (CGFloat)textZoom 283 261 { 284 return WKPageGetTextZoomFactor( self._pageRef);262 return WKPageGetTextZoomFactor(_pageRef.get()); 285 263 } 286 264 287 265 - (void)setTextZoom:(CGFloat)textZoom 288 266 { 289 return WKPageSetTextZoomFactor( self._pageRef, textZoom);267 return WKPageSetTextZoomFactor(_pageRef.get(), textZoom); 290 268 } 291 269 292 270 - (CGFloat)pageZoom 293 271 { 294 return WKPageGetPageZoomFactor( self._pageRef);272 return WKPageGetPageZoomFactor(_pageRef.get()); 295 273 } 296 274 297 275 - (void)setPageZoom:(CGFloat)pageZoom 298 276 { 299 return WKPageSetPageZoomFactor( self._pageRef, pageZoom);277 return WKPageSetPageZoomFactor(_pageRef.get(), pageZoom); 300 278 } 301 279 … … 327 305 } 328 306 329 WKPageSetPaginationMode( self._pageRef, mode);307 WKPageSetPaginationMode(_pageRef.get(), mode); 330 308 } 331 309 332 310 - (WKBrowsingContextPaginationMode)paginationMode 333 311 { 334 switch (WKPageGetPaginationMode( self._pageRef)) {312 switch (WKPageGetPaginationMode(_pageRef.get())) { 335 313 case kWKPaginationModeUnpaginated: 336 314 return WKPaginationModeUnpaginated; … … 351 329 - (void)setPaginationBehavesLikeColumns:(BOOL)behavesLikeColumns 352 330 { 353 WKPageSetPaginationBehavesLikeColumns( self._pageRef, behavesLikeColumns);331 WKPageSetPaginationBehavesLikeColumns(_pageRef.get(), behavesLikeColumns); 354 332 } 355 333 356 334 - (BOOL)paginationBehavesLikeColumns 357 335 { 358 return WKPageGetPaginationBehavesLikeColumns( self._pageRef);336 return WKPageGetPaginationBehavesLikeColumns(_pageRef.get()); 359 337 } 360 338 361 339 - (void)setPageLength:(CGFloat)pageLength 362 340 { 363 WKPageSetPageLength( self._pageRef, pageLength);341 WKPageSetPageLength(_pageRef.get(), pageLength); 364 342 } 365 343 366 344 - (CGFloat)pageLength 367 345 { 368 return WKPageGetPageLength( self._pageRef);346 return WKPageGetPageLength(_pageRef.get()); 369 347 } 370 348 371 349 - (void)setGapBetweenPages:(CGFloat)gapBetweenPages 372 350 { 373 WKPageSetGapBetweenPages( self._pageRef, gapBetweenPages);351 WKPageSetGapBetweenPages(_pageRef.get(), gapBetweenPages); 374 352 } 375 353 376 354 - (CGFloat)gapBetweenPages 377 355 { 378 return WKPageGetGapBetweenPages( self._pageRef);356 return WKPageGetGapBetweenPages(_pageRef.get()); 379 357 } 380 358 381 359 - (NSUInteger)pageCount 382 360 { 383 return WKPageGetPageCount( self._pageRef);361 return WKPageGetPageCount(_pageRef.get()); 384 362 } 385 363 … … 478 456 return nil; 479 457 480 _data = [[WKBrowsingContextControllerData alloc] init]; 481 _data->_pageRef = pageRef; 458 _pageRef = pageRef; 482 459 483 460 setUpPageLoaderClient(self, pageRef); … … 498 475 499 476 @end 477 478 #endif // WK_API_ENABLED -
TabularUnified trunk/Source/WebKit2/UIProcess/API/mac/WKBrowsingContextControllerInternal.h ¶
r144777 r157676 26 26 #import <WebKit2/WKBrowsingContextController.h> 27 27 28 #if WK_API_ENABLED 29 28 30 @interface WKBrowsingContextController (Internal) 29 31 … … 37 39 38 40 @end 41 42 #endif // WK_API_ENABLED -
TabularUnified trunk/Source/WebKit2/UIProcess/API/mac/WKBrowsingContextControllerPrivate.h ¶
r155770 r157676 27 27 #import <WebKit2/WKBase.h> 28 28 29 #if WK_API_ENABLED 30 29 31 enum { 30 32 WKPaginationModeUnpaginated, … … 51 53 52 54 @end 55 56 #endif // WK_API_ENABLED -
TabularUnified trunk/Source/WebKit2/UIProcess/API/mac/WKBrowsingContextGroup.h ¶
r155770 r157676 26 26 #import <Foundation/Foundation.h> 27 27 #import <WebKit2/WKDeclarationSpecifiers.h> 28 #import <WebKit2/WKFoundation.h> 28 29 #import <WebKit2/WKUserScriptInjectionTime.h> 29 30 30 @class WKBrowsingContextGroupData; 31 #if WK_API_ENABLED 31 32 32 33 WK_EXPORT 33 @interface WKBrowsingContextGroup : NSObject { 34 @private 35 WKBrowsingContextGroupData *_data; 36 } 34 @interface WKBrowsingContextGroup : NSObject 37 35 38 36 - (id)initWithIdentifier:(NSString *)identifier; … … 60 58 61 59 @end 60 61 #endif // WK_API_ENABLED -
TabularUnified trunk/Source/WebKit2/UIProcess/API/mac/WKBrowsingContextGroup.mm ¶
r148689 r157676 28 28 #import "WKBrowsingContextGroupPrivate.h" 29 29 30 #if WK_API_ENABLED 31 30 32 #import "WKArray.h" 31 33 #import "WKPageGroup.h" … … 37 39 #import <wtf/Vector.h> 38 40 39 @interface WKBrowsingContextGroupData : NSObject { 40 @public 41 @implementation WKBrowsingContextGroup { 41 42 WKRetainPtr<WKPageGroupRef> _pageGroupRef; 42 43 } 43 @end44 45 @implementation WKBrowsingContextGroupData46 @end47 48 @implementation WKBrowsingContextGroup49 44 50 45 - (id)initWithIdentifier:(NSString *)identifier … … 54 49 return nil; 55 50 56 _data = [[WKBrowsingContextGroupData alloc] init]; 57 _data->_pageGroupRef = adoptWK(WKPageGroupCreateWithIdentifier(adoptWK(WKStringCreateWithCFString((CFStringRef)identifier)).get())); 51 _pageGroupRef = adoptWK(WKPageGroupCreateWithIdentifier(adoptWK(WKStringCreateWithCFString((CFStringRef)identifier)).get())); 58 52 59 53 // Give the WKBrowsingContextGroup a identifier-less preferences, so that they … … 61 55 // confusing to users of the API. 62 56 WKRetainPtr<WKPreferencesRef> preferences = adoptWK(WKPreferencesCreate()); 63 WKPageGroupSetPreferences(_ data->_pageGroupRef.get(), preferences.get());57 WKPageGroupSetPreferences(_pageGroupRef.get(), preferences.get()); 64 58 65 59 return self; 66 }67 68 - (void)dealloc69 {70 [_data release];71 [super dealloc];72 60 } 73 61 … … 164 152 - (WKPageGroupRef)_pageGroupRef 165 153 { 166 return _ data->_pageGroupRef.get();154 return _pageGroupRef.get(); 167 155 } 168 156 169 157 @end 158 159 #endif // WK_API_ENABLED -
TabularUnified trunk/Source/WebKit2/UIProcess/API/mac/WKBrowsingContextGroupPrivate.h ¶
r155770 r157676 27 27 #import <WebKit2/WKBase.h> 28 28 29 #if WK_API_ENABLED 30 29 31 @interface WKBrowsingContextGroup (Private) 30 32 … … 32 34 33 35 @end 36 37 #endif // WK_API_ENABLED -
TabularUnified trunk/Source/WebKit2/UIProcess/API/mac/WKConnection.h ¶
r155770 r157676 26 26 #import <Foundation/Foundation.h> 27 27 #import <WebKit2/WKDeclarationSpecifiers.h> 28 #import <WebKit2/WKFoundation.h> 28 29 29 @class WKConnection, WKConnectionData; 30 #if WK_API_ENABLED 31 32 @class WKConnection; 30 33 31 34 @protocol WKConnectionDelegate <NSObject> … … 37 40 38 41 WK_EXPORT 39 @interface WKConnection : NSObject { 40 @private 41 WKConnectionData *_data; 42 } 42 @interface WKConnection : NSObject 43 43 44 44 - (void)sendMessageWithName:(NSString *)messageName body:(id)messageBody; … … 49 49 50 50 @end 51 52 #endif // WK_API_ENABLED -
TabularUnified trunk/Source/WebKit2/UIProcess/API/mac/WKConnection.mm ¶
r149255 r157676 28 28 #import "WKConnectionInternal.h" 29 29 30 #if WK_API_ENABLED 31 30 32 #import "ObjCObjectGraph.h" 31 33 #import "WKConnectionRef.h" … … 38 40 using namespace WebKit; 39 41 40 @interface WKConnectionData : NSObject { 41 @public 42 @implementation WKConnection { 42 43 // Underlying connection object. 43 44 WKRetainPtr<WKConnectionRef> _connectionRef; 44 45 // Delegate for callbacks.46 id<WKConnectionDelegate> _delegate;47 45 } 48 @end49 50 @implementation WKConnectionData51 @end52 53 @implementation WKConnection54 46 55 47 - (void)dealloc 56 48 { 57 WKConnectionSetConnectionClient(_ data->_connectionRef.get(), 0);49 WKConnectionSetConnectionClient(_connectionRef.get(), 0); 58 50 59 [_data release];60 51 [super dealloc]; 61 52 } … … 66 57 RefPtr<ObjCObjectGraph> wkMessageBody = ObjCObjectGraph::create(messageBody); 67 58 68 WKConnectionPostMessage(_data->_connectionRef.get(), wkMessageName.get(), (WKTypeRef)wkMessageBody.get()); 69 } 70 71 #pragma mark Delegates 72 73 - (id<WKConnectionDelegate>)delegate 74 { 75 return _data->_delegate; 76 } 77 78 - (void)setDelegate:(id<WKConnectionDelegate>)delegate 79 { 80 _data->_delegate = delegate; 59 WKConnectionPostMessage(_connectionRef.get(), wkMessageName.get(), (WKTypeRef)wkMessageBody.get()); 81 60 } 82 61 … … 123 102 return nil; 124 103 125 _data = [[WKConnectionData alloc] init]; 126 _data->_connectionRef = connectionRef; 104 _connectionRef = connectionRef; 127 105 128 setUpClient(self, _ data->_connectionRef.get());106 setUpClient(self, _connectionRef.get()); 129 107 130 108 return self; … … 132 110 133 111 @end 112 113 #endif // WK_API_ENABLED -
TabularUnified trunk/Source/WebKit2/UIProcess/API/mac/WKConnectionInternal.h ¶
r155770 r157676 27 27 #import <WebKit2/WKBase.h> 28 28 29 #if WK_API_ENABLED 30 29 31 @interface WKConnection (Internal) 30 32 … … 32 34 33 35 @end 36 37 #endif // WK_API_ENABLED -
TabularUnified trunk/Source/WebKit2/UIProcess/API/mac/WKProcessGroup.h ¶
r155770 r157676 25 25 26 26 #import <Foundation/Foundation.h> 27 #import <WebKit2/WKConnection.h> 27 28 #import <WebKit2/WKDeclarationSpecifiers.h> 29 #import <WebKit2/WKFoundation.h> 28 30 29 @class WKProcessGroup, WKProcessGroupData, WKConnection; 31 #if WK_API_ENABLED 32 33 @class WKProcessGroup; 30 34 31 35 @protocol WKProcessGroupDelegate <NSObject> … … 41 45 42 46 WK_EXPORT 43 @interface WKProcessGroup : NSObject { 44 @private 45 WKProcessGroupData *_data; 46 } 47 @interface WKProcessGroup : NSObject 47 48 48 49 - (id)initWithInjectedBundleURL:(NSURL *)bundleURL; 49 50 50 51 51 #pragma mark Delegates … … 54 54 55 55 @end 56 57 #endif // WK_API_ENABLED -
TabularUnified trunk/Source/WebKit2/UIProcess/API/mac/WKProcessGroup.mm ¶
r148376 r157676 28 28 #import "WKProcessGroupPrivate.h" 29 29 30 #if WK_API_ENABLED 31 30 32 #import "ObjCObjectGraph.h" 31 33 #import "WKConnectionInternal.h" … … 35 37 #import <wtf/RetainPtr.h> 36 38 37 @interface WKProcessGroupData : NSObject { 38 @public 39 @implementation WKProcessGroup { 39 40 // Underlying context object. 40 41 WKRetainPtr<WKContextRef> _contextRef; 41 42 // Delegate for callbacks.43 id<WKProcessGroupDelegate> _delegate;44 42 } 45 @end46 47 @implementation WKProcessGroupData48 @end49 50 @implementation WKProcessGroup51 43 52 44 static void didCreateConnection(WKContextRef, WKConnectionRef connectionRef, const void* clientInfo) … … 106 98 return nil; 107 99 108 _data = [[WKProcessGroupData alloc] init];109 110 100 if (bundleURL) 111 _ data->_contextRef = adoptWK(WKContextCreateWithInjectedBundlePath(adoptWK(WKStringCreateWithCFString((CFStringRef)[bundleURL path])).get()));101 _contextRef = adoptWK(WKContextCreateWithInjectedBundlePath(adoptWK(WKStringCreateWithCFString((CFStringRef)[bundleURL path])).get())); 112 102 else 113 _ data->_contextRef = adoptWK(WKContextCreate());103 _contextRef = adoptWK(WKContextCreate()); 114 104 115 setUpConnectionClient(self, _ data->_contextRef.get());116 setUpInectedBundleClient(self, _ data->_contextRef.get());105 setUpConnectionClient(self, _contextRef.get()); 106 setUpInectedBundleClient(self, _contextRef.get()); 117 107 118 108 return self; … … 121 111 - (void)dealloc 122 112 { 123 WKContextSetConnectionClient(_ data->_contextRef.get(), 0);124 WKContextSetInjectedBundleClient(_ data->_contextRef.get(), 0);113 WKContextSetConnectionClient(_contextRef.get(), 0); 114 WKContextSetInjectedBundleClient(_contextRef.get(), 0); 125 115 126 [_data release];127 116 [super dealloc]; 128 }129 130 - (id<WKProcessGroupDelegate>)delegate131 {132 return _data->_delegate;133 }134 135 - (void)setDelegate:(id<WKProcessGroupDelegate>)delegate136 {137 _data->_delegate = delegate;138 117 } 139 118 … … 144 123 - (WKContextRef)_contextRef 145 124 { 146 return _ data->_contextRef.get();125 return _contextRef.get(); 147 126 } 148 127 149 128 @end 129 130 #endif // WK_API_ENABLED -
TabularUnified trunk/Source/WebKit2/UIProcess/API/mac/WKProcessGroupPrivate.h ¶
r155770 r157676 27 27 #import <WebKit2/WKBase.h> 28 28 29 #if WK_API_ENABLED 30 29 31 @interface WKProcessGroup (Private) 30 32 … … 32 34 33 35 @end 36 37 #endif // WK_API_ENABLED
Note:
See TracChangeset
for help on using the changeset viewer.