Add support for becoming a default browser

This commit is contained in:
James Magahern
2020-09-30 15:23:05 -07:00
parent 6e0e2a0f20
commit d725bbb9d7
4 changed files with 34 additions and 2 deletions

View File

@@ -296,6 +296,11 @@ class BrowserViewController: UIViewController, WKNavigationDelegate, WKUIDelegat
iconView.someScriptsAllowed = scriptsAllowedForHost
iconView.setBlockedScriptsNumber(numBlockedScripts)
}
public func createNewTab(withURL url: URL?) {
let newTab = tabController.createNewTab(url: url)
self.tab = newTab
}
// MARK: UIPopoverPresentationControllerDelegate
@@ -520,8 +525,7 @@ class BrowserViewController: UIViewController, WKNavigationDelegate, WKUIDelegat
}
func createTab(_ sender: Any?) {
let newTab = tabController.createNewTab(url: nil)
self.tab = newTab
createNewTab(withURL: nil)
}
func previousTab(_ sender: Any?) {