API to allow tabs to be created with URL

This commit is contained in:
James Magahern
2020-07-31 14:41:30 -07:00
parent 9272c34d3d
commit 8b19db74df
2 changed files with 4 additions and 4 deletions

View File

@@ -14,7 +14,7 @@ class TabController
init() {
// TODO: load tabs from disk.
_ = createNewTab()
_ = createNewTab(url: nil)
}
func tab(forURL url: URL) -> Tab? {
@@ -25,8 +25,8 @@ class TabController
tabs.first { $0.identifier == identifier }
}
func createNewTab() -> Tab {
let tab = Tab(policyManager: policyManager)
func createNewTab(url: URL?) -> Tab {
let tab = Tab(url: url, policyManager: policyManager)
tabs.append(tab)
return tab