Add accessors for the WKProcessGroup and WKBrowsingContextGroup on the WKBrowsingCont...
authorweinig@apple.com <weinig@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 28 Nov 2013 02:25:46 +0000 (02:25 +0000)
committerweinig@apple.com <weinig@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 28 Nov 2013 02:25:46 +0000 (02:25 +0000)
https://bugs.webkit.org/show_bug.cgi?id=124953

Reviewed by Dan Bernstein.

* UIProcess/API/mac/WKBrowsingContextController.h:
* UIProcess/API/mac/WKBrowsingContextController.mm:
(-[WKBrowsingContextController processGroup]):
(-[WKBrowsingContextController browsingContextGroup]):
Add accessors.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@159830 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebKit2/ChangeLog
Source/WebKit2/UIProcess/API/mac/WKBrowsingContextController.h
Source/WebKit2/UIProcess/API/mac/WKBrowsingContextController.mm

index bdd60d8..d13950d 100644 (file)
@@ -1,5 +1,18 @@
 2013-11-27  Sam Weinig  <sam@webkit.org>
 
+        Add accessors for the WKProcessGroup and WKBrowsingContextGroup on the WKBrowsingContextController
+        https://bugs.webkit.org/show_bug.cgi?id=124953
+
+        Reviewed by Dan Bernstein.
+
+        * UIProcess/API/mac/WKBrowsingContextController.h:
+        * UIProcess/API/mac/WKBrowsingContextController.mm:
+        (-[WKBrowsingContextController processGroup]):
+        (-[WKBrowsingContextController browsingContextGroup]):
+        Add accessors.
+
+2013-11-27  Sam Weinig  <sam@webkit.org>
+
         Make WKProcessGroup work with WKObject wrapping
         https://bugs.webkit.org/show_bug.cgi?id=124952
 
index 7dfb1d8..007a58c 100644 (file)
@@ -24,7 +24,9 @@
  */
 
 #import <Foundation/Foundation.h>
+#import <WebKit2/WKBrowsingContextGroup.h>
 #import <WebKit2/WKFoundation.h>
+#import <WebKit2/WKProcessGroup.h>
 
 #if WK_API_ENABLED
 
 WK_API_CLASS
 @interface WKBrowsingContextController : NSObject
 
+@property (readonly) WKProcessGroup *processGroup;
+@property (readonly) WKBrowsingContextGroup *browsingContextGroup;
+
 #pragma mark Delegates
 
 @property (assign) id <WKBrowsingContextLoadDelegate> loadDelegate;
-
 @property (assign) id <WKBrowsingContextPolicyDelegate> policyDelegate;
 @property (assign) id <WKBrowsingContextHistoryDelegate> historyDelegate;
 
index 93a9d39..2ca59da 100644 (file)
 #import <wtf/ObjcRuntimeExtras.h>
 #import <wtf/RetainPtr.h>
 
+#import "WKBrowsingContextGroupInternal.h"
 #import "WKBrowsingContextHandleInternal.h"
 #import "WKBrowsingContextLoadDelegate.h"
 #import "WKBrowsingContextPolicyDelegate.h"
+#import "WKProcessGroupInternal.h"
 
 using namespace WebKit;
 
@@ -113,6 +115,22 @@ NSString * const WKActionCanShowMIMETypeKey = @"WKActionCanShowMIMETypeKey";
     [super dealloc];
 }
 
+- (WKProcessGroup *)processGroup
+{
+    WebContext* context = toImpl(_pageRef.get())->process()->context();
+    if (!context)
+        return nil;
+    return wrapper(*context);
+}
+
+- (WKBrowsingContextGroup *)browsingContextGroup
+{
+    WebPageGroup* pageGroup = toImpl(_pageRef.get())->pageGroup();
+    if (!pageGroup)
+        return nil;
+    return wrapper(*pageGroup);
+}
+
 - (WKPageRef)_pageRef
 {
     return _pageRef.get();