Skip to content

Commit

Permalink
Uplift of #25748 (squashed) to beta
Browse files Browse the repository at this point in the history
  • Loading branch information
brave-builds committed Oct 1, 2024
1 parent d901535 commit 95784fd
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 0 deletions.
2 changes: 2 additions & 0 deletions ios/brave-ios/Sources/Brave/Frontend/Browser/TabManager.swift
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ class WeakTabManagerDelegate {
// TabManager must extend NSObjectProtocol in order to implement WKNavigationDelegate
class TabManager: NSObject {
fileprivate var delegates = [WeakTabManagerDelegate]()
fileprivate let tabEventHandlers: [TabEventHandler]
weak var stateDelegate: TabManagerStateDelegate?

/// Internal url to access the new tab page.
Expand Down Expand Up @@ -130,6 +131,7 @@ class TabManager: NSObject {
self.tabGeneratorAPI = tabGeneratorAPI
self.historyAPI = historyAPI
self.privateBrowsingManager = privateBrowsingManager
self.tabEventHandlers = TabEventHandlers.create(with: prefs)
super.init()

self.navDelegate.tabManager = self
Expand Down
17 changes: 17 additions & 0 deletions ios/brave-ios/Sources/Brave/Helpers/TabEventHandlers.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at https://mozilla.org/MPL/2.0/.

import Foundation
import Shared

class TabEventHandlers {
static func create(with prefs: Prefs) -> [TabEventHandler] {
return [
FaviconHandler(),
UserActivityHandler(),
MetadataParserHelper(),
MediaImageLoader(prefs),
]
}
}

0 comments on commit 95784fd

Please sign in to comment.