Commit d05dab7a authored by andersca@apple.com's avatar andersca@apple.com

Add a way to get a WKWebProcessPlugInBrowserContextController from a handle

https://bugs.webkit.org/show_bug.cgi?id=124063

Reviewed by Beth Dakin.

* WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextController.mm:
(+[WKWebProcessPlugInBrowserContextController lookUpBrowsingContextFromHandle:]):
* WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextControllerPrivate.h:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@158942 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 3c3ae871
2013-11-08 Anders Carlsson <andersca@apple.com>
Add a way to get a WKWebProcessPlugInBrowserContextController from a handle
https://bugs.webkit.org/show_bug.cgi?id=124063
Reviewed by Beth Dakin.
* WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextController.mm:
(+[WKWebProcessPlugInBrowserContextController lookUpBrowsingContextFromHandle:]):
* WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextControllerPrivate.h:
2013-11-08 Anders Carlsson <andersca@apple.com>
More work on WKBrowsingContextHandle
......
......@@ -35,7 +35,9 @@
#import "WKBundlePagePrivate.h"
#import "WKDOMInternals.h"
#import "WKRetainPtr.h"
#import "WKWebProcessPlugInInternal.h"
#import "WebPage.h"
#import "WebProcess.h"
#import <WebCore/Document.h>
#import <WebCore/Frame.h>
......@@ -89,6 +91,15 @@ using namespace WebKit;
return [[[WKBrowsingContextHandle alloc] _initWithPageID:toImpl(_bundlePageRef.get())->pageID()] autorelease];
}
+ (instancetype)lookUpBrowsingContextFromHandle:(WKBrowsingContextHandle *)handle
{
WebPage* webPage = WebProcess::shared().webPage(handle.pageID);
if (!webPage)
return nil;
return [[WKWebProcessPlugInController _shared] _browserContextControllerForBundlePageRef:toAPI(webPage)];
}
@end
#endif // WK_API_ENABLED
......@@ -37,6 +37,8 @@
@property (nonatomic, readonly) WKBrowsingContextHandle *handle;
+ (instancetype)lookUpBrowsingContextFromHandle:(WKBrowsingContextHandle *)handle;
@end
#endif // WK_API_ENABLED
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