From bc9c25de728802f7980e82adbb161444a300822b Mon Sep 17 00:00:00 2001 From: Chris Hamons Date: Fri, 26 Aug 2016 10:30:45 -0500 Subject: [PATCH] [XM] Add missing SafariServices binding (#681) --- src/safariservices.cs | 22 ++++++++++++++++++++++ tests/xtro-sharpie/osx.pending | 5 +++++ 2 files changed, 27 insertions(+) diff --git a/src/safariservices.cs b/src/safariservices.cs index b1d5d622e6..bff944de2f 100644 --- a/src/safariservices.cs +++ b/src/safariservices.cs @@ -123,6 +123,10 @@ namespace XamCore.SafariServices { [Static] [Export ("setToolbarItemsNeedUpdate")] void SetToolbarItemsNeedUpdate (); + + [Static] + [Export ("showPreferencesForExtensionWithIdentifier:completionHandler:")] + void ShowPreferencesForExtension (string identifier, [NullAllowed] Action completionHandler); } [Mac (10,12, onlyOn64 : true)] @@ -241,5 +245,23 @@ namespace XamCore.SafariServices { interface SFSafariExtensionHandler : NSExtensionRequestHandling, SFSafariExtensionHandling { } + +// TODO - Needs Safari Extension support to test +// [Mac (10,12)] +// [BaseType (typeof(NSObject))] +// interface SFSafariExtensionManager +// { +// [Static] +// [Export ("getStateOfSafariExtensionWithIdentifier:completionHandler:")] +// void GetStateOfSafariExtension (string identifier, Action completionHandler); +// } +// +// [Mac (10,12)] +// [BaseType (typeof(NSObject))] +// interface SFSafariExtensionState +// { +// [Export ("enabled")] +// bool Enabled { [Bind ("isEnabled")] get; } +// } #endif } diff --git a/tests/xtro-sharpie/osx.pending b/tests/xtro-sharpie/osx.pending index e543ce6288..ef65fe4960 100644 --- a/tests/xtro-sharpie/osx.pending +++ b/tests/xtro-sharpie/osx.pending @@ -197,3 +197,8 @@ !unknown-native-enum! NSType bound !unknown-native-enum! SLComposeViewControllerResult bound +# Bound but commented out until we can test w\ template +!missing-selector! +SFSafariExtensionManager::getStateOfSafariExtensionWithIdentifier:completionHandler: not bound +!missing-type! SFSafariExtensionManager not bound +!missing-selector! SFSafariExtensionState::isEnabled not bound +!missing-type! SFSafariExtensionState not bound