-
Notifications
You must be signed in to change notification settings - Fork 514
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[WebKit] Update to Xcode 9 beta 1 #2228
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -61,6 +61,76 @@ interface WKBackForwardList { | |
WKBackForwardListItem ItemAtIndex (nint index); | ||
} | ||
|
||
[Mac (10,13), iOS (11,0)] | ||
[BaseType (typeof(NSObject))] | ||
interface WKContentRuleList | ||
{ | ||
[Export ("identifier")] | ||
string Identifier { get; } | ||
} | ||
|
||
[Mac (10,13), iOS (11,0)] | ||
[BaseType (typeof(NSObject))] | ||
interface WKContentRuleListStore | ||
{ | ||
[Static] | ||
[Export ("defaultStore")] | ||
WKContentRuleListStore DefaultStore (); | ||
|
||
[Static] | ||
[Export ("storeWithURL:")] | ||
WKContentRuleListStore FromUrl (NSUrl url); | ||
|
||
[Export ("compileContentRuleListForIdentifier:encodedContentRuleList:completionHandler:")] | ||
[Async] | ||
void CompileContentRuleList (string identifier, string encodedContentRuleList, Action<WKContentRuleList, NSError> completionHandler); | ||
|
||
[Export ("lookUpContentRuleListForIdentifier:completionHandler:")] | ||
[Async] | ||
void LookUpContentRuleList (string identifier, Action<WKContentRuleList, NSError> completionHandler); | ||
|
||
[Export ("removeContentRuleListForIdentifier:completionHandler:")] | ||
[Async] | ||
void RemoveContentRuleList (string identifier, Action<NSError> completionHandler); | ||
|
||
[Export ("getAvailableContentRuleListIdentifiers:")] | ||
[Async] | ||
void GetAvailableContentRuleListIdentifiers (Action<NSString []> callback); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Wouldn't this be better as There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Agreed, I did not catch this, thanks for the review. |
||
} | ||
|
||
[Mac (10,13), iOS (11,0)] | ||
[BaseType (typeof(NSObject))] | ||
[DisableDefaultCtor] | ||
interface WKHttpCookieStore | ||
{ | ||
[Export ("getAllCookies:")] | ||
[Async] | ||
void GetAllCookies (Action<NSHttpCookie []> completionHandler); | ||
|
||
[Export ("setCookie:completionHandler:")] | ||
[Async] | ||
void SetCookie (NSHttpCookie cookie, [NullAllowed] Action completionHandler); | ||
|
||
[Export ("deleteCookie:completionHandler:")] | ||
[Async] | ||
void DeleteCookie (NSHttpCookie cookie, [NullAllowed] Action completionHandler); | ||
|
||
[Export ("addObserver:")] | ||
void AddObserver (WKHttpCookieStoreObserver observer); | ||
|
||
[Export ("removeObserver:")] | ||
void RemoveObserver (WKHttpCookieStoreObserver observer); | ||
} | ||
|
||
[Mac (10,13), iOS (11,0)] | ||
[Protocol] | ||
[BaseType (typeof(NSObject))] | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. No BaseType for protocols (only Model needs one) There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Thanks - I am getting rusty. |
||
interface WKHttpCookieStoreObserver | ||
{ | ||
[Export ("cookiesDidChangeInCookieStore:")] | ||
void CookiesDidChangeInCookieStore (WKHttpCookieStore cookieStore); | ||
} | ||
|
||
[iOS (8,0), Mac (10,10, onlyOn64 : true)] // Not defined in 32-bit | ||
[BaseType (typeof (NSObject))] | ||
interface WKFrameInfo : NSCopying { | ||
|
@@ -227,6 +297,58 @@ interface WKSecurityOrigin { | |
nint Port { get; } | ||
} | ||
|
||
|
||
[Mac (10,13), iOS (11,0)] | ||
[BaseType (typeof(NSObject))] | ||
interface WKSnapshotConfiguration { | ||
[Export ("rect")] | ||
CGRect Rect { get; set; } | ||
|
||
[Export ("snapshotWidth")] | ||
NSNumber SnapshotWidth { get; set; } | ||
} | ||
|
||
#if XAMCORE_2_0 | ||
[Mac (10,13), iOS (11,0)] | ||
[Protocol] | ||
[BaseType (typeof(NSObject))] | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Same There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ditto |
||
interface WKUrlSchemeHandler | ||
{ | ||
[Abstract] | ||
[Export ("webView:startURLSchemeTask:")] | ||
void StartUrlSchemeTask (WKWebView webView, WKUrlSchemeTask urlSchemeTask); | ||
|
||
[Abstract] | ||
[Export ("webView:stopURLSchemeTask:")] | ||
void StopUrlSchemeTask (WKWebView webView, WKUrlSchemeTask urlSchemeTask); | ||
} | ||
#endif | ||
[Mac (10,13), iOS (11,0)] | ||
[Protocol] | ||
[BaseType (typeof(NSObject))] | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Same |
||
interface WKUrlSchemeTask | ||
{ | ||
[Abstract] | ||
[Export ("request", ArgumentSemantic.Copy)] | ||
NSUrlRequest Request { get; } | ||
|
||
[Abstract] | ||
[Export ("didReceiveResponse:")] | ||
void DidReceiveResponse (NSUrlResponse response); | ||
|
||
[Abstract] | ||
[Export ("didReceiveData:")] | ||
void DidReceiveData (NSData data); | ||
|
||
[Abstract] | ||
[Export ("didFinish")] | ||
void DidFinish (); | ||
|
||
[Abstract] | ||
[Export ("didFailWithError:")] | ||
void DidFailWithError (NSError error); | ||
} | ||
|
||
[iOS (9,0), Mac(10,11, onlyOn64 : true)] | ||
[BaseType (typeof(NSObject))] | ||
interface WKWebsiteDataRecord | ||
|
@@ -296,6 +418,10 @@ interface WKWebsiteDataStore : NSCoding { | |
[Export ("removeDataOfTypes:modifiedSince:completionHandler:")] | ||
[Async] | ||
void RemoveDataOfTypes (NSSet<NSString> websiteDataTypes, NSDate date, Action completionHandler); | ||
|
||
[Mac (10, 13), iOS (11, 0)] | ||
[Export ("httpCookieStore")] | ||
WKHttpCookieStore HttpCookieStore { get; } | ||
} | ||
|
||
[Mac (10,10, onlyOn64 : true), iOS (8,0)] | ||
|
@@ -355,6 +481,18 @@ interface WKUserContentController : NSCoding { | |
|
||
[Export ("removeScriptMessageHandlerForName:")] | ||
void RemoveScriptMessageHandler (string name); | ||
|
||
[Mac (10,13), iOS (11,0)] | ||
[Export ("addContentRuleList:")] | ||
void AddContentRuleList (WKContentRuleList contentRuleList); | ||
|
||
[Mac (10,13), iOS (11,0)] | ||
[Export ("removeContentRuleList:")] | ||
void RemoveContentRuleList (WKContentRuleList contentRuleList); | ||
|
||
[Mac (10,13), iOS (11,0)] | ||
[Export ("removeAllContentRuleLists")] | ||
void RemoveAllContentRuleLists (); | ||
} | ||
|
||
[iOS (8,0), Mac (10,10, onlyOn64 : true)] // Not defined in 32-bit | ||
|
@@ -519,6 +657,23 @@ interface WKWebView { | |
[iOS (10,0)][Mac (10,12, onlyOn64 : true)] | ||
[NullAllowed, Export ("serverTrust")] | ||
SecTrust ServerTrust { get; } | ||
|
||
#if !MONOMAC | ||
[iOS (11,0)] | ||
[Async] | ||
[Export ("takeSnapshotWithConfiguration:completionHandler:")] | ||
void TakeSnapshot ([NullAllowed] WKSnapshotConfiguration snapshotConfiguration, Action<UIImage, NSError> completionHandler); | ||
#else | ||
[Mac (10,13)] | ||
[Export ("takeSnapshotWithConfiguration:completionHandler:")] | ||
[Async] | ||
void TakeSnapshot ([NullAllowed] WKSnapshotConfiguration snapshotConfiguration, Action<NSImage, NSError> completionHandler); | ||
#endif | ||
[Mac (10,13), iOS (11,0)] | ||
[Static] | ||
[Export ("handlesURLScheme:")] | ||
bool HandlesUrlScheme (string urlScheme); | ||
|
||
} | ||
|
||
delegate void WKJavascriptEvaluationResult (NSObject result, NSError error); | ||
|
@@ -586,6 +741,17 @@ interface WKWebViewConfiguration : NSCopying, NSCoding { | |
[NoMac] | ||
[Export ("ignoresViewportScaleLimits")] | ||
bool IgnoresViewportScaleLimits { get; set; } | ||
|
||
#if XAMCORE_2_0 | ||
[Mac (10,13), iOS (11,0)] | ||
[Export ("setURLSchemeHandler:forURLScheme:")] | ||
void SetUrlSchemeHandler ([NullAllowed] WKUrlSchemeHandler urlSchemeHandler, string urlScheme); | ||
|
||
[Mac (10,13), iOS (11,0)] | ||
[Export ("urlSchemeHandlerForURLScheme:")] | ||
[return: NullAllowed] | ||
WKUrlSchemeHandler GetUrlSchemeHandler (string urlScheme); | ||
#endif | ||
} | ||
|
||
[iOS (8,0), Mac (10,10, onlyOn64 : true)] // Not defined in 32-bit | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In general those defaults are bound as properties
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!