refactor: move webkit integration into browser engine core#237
Merged
refactor: move webkit integration into browser engine core#237
Conversation
Greptile SummaryThis PR introduces a clean
Confidence Score: 4/5
Important Files Changed
Class Diagram%%{init: {'theme': 'neutral'}}%%
classDiagram
class BrowserEngine {
+shared: BrowserEngine
+makeProfile(identifier, isPrivate) BrowserEngineProfile
+makePage(profile, configuration, delegate) BrowserPage
}
class BrowserEngineProfile {
+identifier: UUID
+isPrivate: Bool
+dataStore: WKWebsiteDataStore
+clearData(ofTypes, forHost, completion)
}
class BrowserPage {
-webView: WKWebView
+delegate: BrowserPageDelegate
+contentView: NSView
+currentURL: URL?
+load(URLRequest)
+reload()
+goBack()
+goForward()
+evaluateJavaScript(String)
+takeSnapshot(configuration)
+teardown()
}
class BrowserPageDelegate {
<<protocol>>
+decidePolicyFor(navigationAction)
+didUpdateNavigation(event)
+didFailNavigationWith(error)
+didReceiveScriptMessage(message)
+didStartDownload(download)
+requestPermission(permission)
}
class TabBrowserPageDelegate {
+tab: Tab
+mediaController: MediaController
+passwordCoordinator: PasswordAutofillCoordinator
}
class Tab {
+browserPage: BrowserPage?
+pageDelegate: TabBrowserPageDelegate?
+restoreTransientState()
+setupBrowserPageDelegate(page)
}
class BrowserPageView {
+page: BrowserPage
}
BrowserEngine --> BrowserEngineProfile : creates
BrowserEngine --> BrowserPage : creates
BrowserPage --> BrowserPageDelegate : delegates to
TabBrowserPageDelegate ..|> BrowserPageDelegate : implements
Tab --> BrowserPage : owns
Tab --> TabBrowserPageDelegate : owns
BrowserPageView --> BrowserPage : wraps
Last reviewed commit: e68ca61 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Core/BrowserEngineBrowserPage/BrowserPageViewinstead of owning rawWKWebViewintegrationFeatures/Tabs/Webwiring and keep the tabs-specific adapter inFeatures/Tabs/BrowserTesting