Changeset 163564 in webkit
- Timestamp:
- Feb 6, 2014 2:40:26 PM (10 years ago)
- Location:
- trunk/Source/WebKit2
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebKit2/ChangeLog
r163563 r163564 1 2014-02-06 Anders Carlsson <andersca@apple.com> 2 3 Add a remoteObjectRegistry property to WKWebView 4 https://bugs.webkit.org/show_bug.cgi?id=128331 5 6 Reviewed by Tim Horton. 7 8 * UIProcess/API/Cocoa/WKWebView.mm: 9 (-[WKWebView resizeSubviewsWithOldSize:]): 10 (-[WKWebView _remoteObjectRegistry]): 11 * UIProcess/API/Cocoa/WKWebViewInternal.h: 12 * UIProcess/API/Cocoa/WKWebViewPrivate.h: 13 1 14 2014-02-06 Anders Carlsson <andersca@apple.com> 2 15 -
trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWebView.mm
r163554 r163564 34 34 #import "WKNavigationInternal.h" 35 35 #import "WKProcessClass.h" 36 #import "WKRemoteObjectRegistryInternal.h" 36 37 #import "WKWebViewConfiguration.h" 37 38 #import "WebBackForwardList.h" … … 51 52 RetainPtr<WKWebViewConfiguration> _configuration; 52 53 std::unique_ptr<WebKit::NavigationState> _navigationState; 54 55 RetainPtr<WKRemoteObjectRegistry> _remoteObjectRegistry; 53 56 54 57 #if PLATFORM(IOS) … … 112 115 } 113 116 117 - (void)dealloc 118 { 119 [_remoteObjectRegistry _invalidate]; 120 121 [super dealloc]; 122 } 123 114 124 - (WKWebViewConfiguration *)configuration 115 125 { … … 309 319 } 310 320 311 #pragma mark Private API 321 #pragma mark OS X-specific methods 322 323 #if PLATFORM(MAC) && !PLATFORM(IOS) 324 325 - (void)resizeSubviewsWithOldSize:(NSSize)oldSize 326 { 327 [_wkView setFrame:self.bounds]; 328 } 329 330 #endif 331 332 @end 333 334 @implementation WKWebView (WKPrivate) 335 336 - (WKRemoteObjectRegistry *)_remoteObjectRegistry 337 { 338 if (!_remoteObjectRegistry) { 339 _remoteObjectRegistry = adoptNS([[WKRemoteObjectRegistry alloc] _initWithMessageSender:*_page]0; 340 _page->process().context().addMessageReceiver(Messages::RemoteObjectRegistry::messageReceiverName(), _page->pageID(), [_remoteObjectRegistry remoteObjectRegistry]); 341 } 342 343 return _remoteObjectRegistry.get(); 344 } 345 346 #pragma mark iOS-specific methods 347 348 #if PLATFORM(IOS) 312 349 313 350 - (CGSize)_minimumLayoutSizeOverride … … 326 363 #endif 327 364 328 #pragma mark OS X-specific methods329 330 #if PLATFORM(MAC) && !PLATFORM(IOS)331 332 - (void)resizeSubviewsWithOldSize:(NSSize)oldSize333 {334 [_wkView setFrame:self.bounds];335 }336 337 365 #endif 338 366 -
trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWebViewInternal.h
r163515 r163564 24 24 */ 25 25 26 #import "WKWebView .h"26 #import "WKWebViewPrivate.h" 27 27 28 28 #if WK_API_ENABLED -
trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWebViewPrivate.h
r163514 r163564 28 28 #if WK_API_ENABLED 29 29 30 @class WKRemoteObjectRegistry; 31 30 32 @interface WKWebView (WKPrivate) 33 34 @property (nonatomic, readonly) WKRemoteObjectRegistry *_remoteObjectRegistry; 31 35 32 36 #if TARGET_OS_IPHONE
Note: See TracChangeset
for help on using the changeset viewer.