Commit a3ea4823 authored by alice.liu@apple.com's avatar alice.liu@apple.com

[WK2] add cocoa API for private browsing setting

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

Reviewed by Sam Weinig.

* UIProcess/API/Cocoa/WKBrowsingContextGroup.h:
* UIProcess/API/Cocoa/WKBrowsingContextGroup.mm:
(-[WKBrowsingContextGroup privateBrowsingEnabled]):
(-[WKBrowsingContextGroup setPrivateBrowsingEnabled:]):
Adding some API for the private Browsing setting. Reaches through
to the WKPageGroup's preferences.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@162546 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 06f46f9a
2014-01-22 Alice Barraclough <alice.liu@apple.com>
[WK2] add cocoa API for private browsing setting
https://bugs.webkit.org/show_bug.cgi?id=127391
Reviewed by Sam Weinig.
* UIProcess/API/Cocoa/WKBrowsingContextGroup.h:
* UIProcess/API/Cocoa/WKBrowsingContextGroup.mm:
(-[WKBrowsingContextGroup privateBrowsingEnabled]):
(-[WKBrowsingContextGroup setPrivateBrowsingEnabled:]):
Adding some API for the private Browsing setting. Reaches through
to the WKPageGroup's preferences.
2014-01-22 Anders Carlsson <andersca@apple.com>
Add WKProcessClass class
......
......@@ -56,6 +56,11 @@ WK_API_CLASS
*/
@property BOOL allowsPlugIns;
/* Setting to control whether private browsing is enabled.
Default: NO
*/
@property BOOL privateBrowsingEnabled;
@end
#endif // WK_API_ENABLED
......@@ -101,6 +101,16 @@ using namespace WebKit;
WKPreferencesSetPluginsEnabled(WKPageGroupGetPreferences(toAPI(_pageGroup.get())), allowsPlugIns);
}
- (BOOL)privateBrowsingEnabled
{
return WKPreferencesGetPrivateBrowsingEnabled(WKPageGroupGetPreferences(toAPI(_pageGroup.get())));
}
- (void)setPrivateBrowsingEnabled:(BOOL)enablePrivateBrowsing
{
WKPreferencesSetPrivateBrowsingEnabled(WKPageGroupGetPreferences(toAPI(_pageGroup.get())), enablePrivateBrowsing);
}
static WKRetainPtr<WKArrayRef> createWKArray(NSArray *array)
{
NSUInteger count = [array count];
......
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