Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add support for loading the background content for a _WKWebExtensionC…
…ontext. https://webkit.org/b/273269 rdar://126994428 Reviewed by Brian Weinstein. Added a loadBackgroundContentWithCompletionHandler: method, and changed how the background load errors are created. This is a step in the direction of having WebExtensionContext track runtime errors separate from WebExtension (see bug 270580). * Source/WebCore/en.lproj/Localizable.strings: Updated with update-webkit-localizable-strings. * Source/WebKit/UIProcess/API/Cocoa/_WKWebExtension.h: (NS_ERROR_ENUM): Removed _WKWebExtensionErrorBackgroundContentFailedToLoad. * Source/WebKit/UIProcess/API/Cocoa/_WKWebExtensionContext.h: (NS_ERROR_ENUM): Added _WKWebExtensionContextErrorNoBackgroundContent and _WKWebExtensionContextErrorBackgroundContentFailedToLoad. * Source/WebKit/UIProcess/API/Cocoa/_WKWebExtensionContext.mm: (-[_WKWebExtensionContext loadBackgroundContentWithCompletionHandler:]): Added. * Source/WebKit/UIProcess/Extensions/Cocoa/WebExtensionCocoa.mm: (WebKit::toAPI): Removed BackgroundContentFailedToLoad. (WebKit::WebExtension::createError): Ditto. * Source/WebKit/UIProcess/Extensions/Cocoa/WebExtensionContextCocoa.mm: (WebKit::toAPI): Added new error codes. (WebKit::WebExtensionContext::createError): Ditto. (WebKit::WebExtensionContext::loadBackgroundContent): Added. (WebKit::WebExtensionContext::loadBackgroundWebView): Set m_backgroundContentLoadError instead of recording it on the WebExtension. (WebKit::WebExtensionContext::didFailNavigation): Ditto. * Source/WebKit/UIProcess/Extensions/WebExtension.h: * Source/WebKit/UIProcess/Extensions/WebExtensionContext.h: (WebKit::WebExtensionContext::backgroundContentLoadError const): Added. Canonical link: https://commits.webkit.org/277998@main
- Loading branch information
Showing
8 changed files
with
66 additions
and
17 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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