Title: [166663] trunk/Source/WebKit2
- Revision
- 166663
- Author
- [email protected]
- Date
- 2014-04-02 13:59:19 -0700 (Wed, 02 Apr 2014)
Log Message
[iOS] Expose geolocation provider on the process pool
https://bugs.webkit.org/show_bug.cgi?id=131125
Patch by Sam Weinig.
Reviewed by Dean Jackson.
* UIProcess/API/Cocoa/WKProcessPool.mm:
(-[WKProcessPool _geolocationProvider]): Create and initialize WKGeolocationProviderIOS if necessary.
* UIProcess/API/Cocoa/WKProcessPoolInternal.h: Expose _geolocationProvider.
* UIProcess/ios/WKContentView.mm:
(-[WKContentView _decidePolicyForGeolocationRequestFromOrigin:frame:request:]): Call into WKProcessPool.
Modified Paths
Diff
Modified: trunk/Source/WebKit2/ChangeLog (166662 => 166663)
--- trunk/Source/WebKit2/ChangeLog 2014-04-02 20:49:27 UTC (rev 166662)
+++ trunk/Source/WebKit2/ChangeLog 2014-04-02 20:59:19 UTC (rev 166663)
@@ -1,3 +1,17 @@
+2014-04-02 Dean Jackson <[email protected]>
+
+ [iOS] Expose geolocation provider on the process pool
+ https://bugs.webkit.org/show_bug.cgi?id=131125
+
+ Patch by Sam Weinig.
+ Reviewed by Dean Jackson.
+
+ * UIProcess/API/Cocoa/WKProcessPool.mm:
+ (-[WKProcessPool _geolocationProvider]): Create and initialize WKGeolocationProviderIOS if necessary.
+ * UIProcess/API/Cocoa/WKProcessPoolInternal.h: Expose _geolocationProvider.
+ * UIProcess/ios/WKContentView.mm:
+ (-[WKContentView _decidePolicyForGeolocationRequestFromOrigin:frame:request:]): Call into WKProcessPool.
+
2014-04-02 Martin Hock <[email protected]>
Unify private browsing with sessions.
Modified: trunk/Source/WebKit2/UIProcess/API/Cocoa/WKProcessPool.mm (166662 => 166663)
--- trunk/Source/WebKit2/UIProcess/API/Cocoa/WKProcessPool.mm 2014-04-02 20:49:27 UTC (rev 166662)
+++ trunk/Source/WebKit2/UIProcess/API/Cocoa/WKProcessPool.mm 2014-04-02 20:59:19 UTC (rev 166663)
@@ -45,6 +45,7 @@
#if PLATFORM(IOS)
#import <WebCore/WebCoreThreadSystemInterface.h>
+#import "WKGeolocationProviderIOS.h"
#endif
#if __has_include(<CFNetwork/CFNSURLConnection.h>)
@@ -63,6 +64,10 @@
@implementation WKProcessPool {
WebKit::WeakObjCPtr<id <_WKDownloadDelegate>> _downloadDelegate;
+
+#if PLATFORM(IOS)
+ RetainPtr<WKGeolocationProviderIOS> _geolocationProvider;
+#endif // PLATFORM(IOS)
}
- (instancetype)init
@@ -191,4 +196,17 @@
@end
+#if PLATFORM(IOS)
+@implementation WKProcessPool (WKInternal)
+
+- (WKGeolocationProviderIOS *)_geolocationProvider
+{
+ if (!_geolocationProvider)
+ _geolocationProvider = adoptNS([[WKGeolocationProviderIOS alloc] initWithContext:_context.get()]);
+ return _geolocationProvider.get();
+}
+
+@end
+#endif // PLATFORM(IOS)
+
#endif // WK_API_ENABLED
Modified: trunk/Source/WebKit2/UIProcess/API/Cocoa/WKProcessPoolInternal.h (166662 => 166663)
--- trunk/Source/WebKit2/UIProcess/API/Cocoa/WKProcessPoolInternal.h 2014-04-02 20:49:27 UTC (rev 166662)
+++ trunk/Source/WebKit2/UIProcess/API/Cocoa/WKProcessPoolInternal.h 2014-04-02 20:59:19 UTC (rev 166663)
@@ -30,6 +30,10 @@
#import "WKObject.h"
#import "WebContext.h"
+#if TARGET_OS_IPHONE
+@class WKGeolocationProviderIOS;
+#endif
+
namespace WebKit {
inline WKProcessPool *wrapper(WebContext& context)
@@ -48,4 +52,10 @@
}
@end
+#if TARGET_OS_IPHONE
+@interface WKProcessPool (WKInternal)
+@property(readonly) WKGeolocationProviderIOS *_geolocationProvider;
+@end
+#endif
+
#endif // WK_API_ENABLED
Modified: trunk/Source/WebKit2/UIProcess/ios/WKContentView.mm (166662 => 166663)
--- trunk/Source/WebKit2/UIProcess/ios/WKContentView.mm 2014-04-02 20:49:27 UTC (rev 166662)
+++ trunk/Source/WebKit2/UIProcess/ios/WKContentView.mm 2014-04-02 20:59:19 UTC (rev 166663)
@@ -445,9 +445,7 @@
- (void)_decidePolicyForGeolocationRequestFromOrigin:(WebSecurityOrigin&)origin frame:(WebFrameProxy&)frame request:(GeolocationPermissionRequestProxy&)permissionRequest
{
- // FIXME: The line below is commented out since wrapper(WebContext&) now returns a WKProcessPool.
- // As part of the new API we should figure out where geolocation fits in, see <rdar://problem/15885544>.
- // [[wrapper(_page->process().context()) _geolocationProvider] decidePolicyForGeolocationRequestFromOrigin:toAPI(&origin) frame:toAPI(&frame) request:toAPI(&permissionRequest) window:[self window]];
+ [[wrapper(_page->process().context()) _geolocationProvider] decidePolicyForGeolocationRequestFromOrigin:toAPI(&origin) frame:toAPI(&frame) request:toAPI(&permissionRequest) window:[self window]];
}
- (RetainPtr<CGImageRef>)_takeViewSnapshot
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes