Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 8b43053675f985642ddcad0b88f0bcf0219ad7c8
https://github.com/WebKit/WebKit/commit/8b43053675f985642ddcad0b88f0bcf0219ad7c8
Author: Timothy Hatcher <[email protected]>
Date: 2024-07-03 (Wed, 03 Jul 2024)
Changed paths:
M Source/WebKit/UIProcess/API/Cocoa/_WKWebExtension.h
M Source/WebKit/UIProcess/API/Cocoa/_WKWebExtension.mm
M Source/WebKit/UIProcess/API/Cocoa/_WKWebExtensionContext.mm
M Source/WebKit/UIProcess/API/Cocoa/_WKWebExtensionController.mm
M Source/WebKit/UIProcess/API/Cocoa/_WKWebExtensionMatchPattern.mm
M Source/WebKit/UIProcess/API/Cocoa/_WKWebExtensionMessagePort.mm
M Source/WebKit/UIProcess/API/Cocoa/_WKWebExtensionPrivate.h
Log Message:
-----------
Change _WKWebExtension creation methods to be asynchronous.
https://webkit.org/b/276196
rdar://problem/131076684
Reviewed by Jeff Miller and Alex Christensen.
Add asynchronous convenience methods to _WKWebExtension so we can update these
to load the extension data on a background thread in the future (see bug
276194).
Moved the existing init methods to _WKWebExtensionPrivate.h.
Also make sure the watchOS and tvOS stubs always return an unsupported error and
call the completion handlers.
* Source/WebKit/UIProcess/API/Cocoa/_WKWebExtension.h:
* Source/WebKit/UIProcess/API/Cocoa/_WKWebExtension.mm:
(+[_WKWebExtension extensionWithAppExtensionBundle:completionHandler:]): Added.
(+[_WKWebExtension extensionWithResourceBaseURL:completionHandler:]): Added.
(-[_WKWebExtension initWithAppExtensionBundle:error:]): Call the private method.
(-[_WKWebExtension _initWithAppExtensionBundle:error:]): Added.
(-[_WKWebExtension initWithResourceBaseURL:error:]): Call the private method.
(-[_WKWebExtension _initWithResourceBaseURL:error:]): Added.
(+[_WKWebExtension extensionWithAppExtensionBundle:]): Deleted.
(+[_WKWebExtension extensionWithResourceBaseURL:]): Deleted.
* Source/WebKit/UIProcess/API/Cocoa/_WKWebExtensionContext.mm:
(-[_WKWebExtensionContext loadBackgroundContentWithCompletionHandler:]): Call
completionHandler
with unsupported error.
* Source/WebKit/UIProcess/API/Cocoa/_WKWebExtensionController.mm:
(-[_WKWebExtensionController loadExtensionContext:error:]): Return unsupported
error.
(-[_WKWebExtensionController unloadExtensionContext:error:]): Ditto.
(-[_WKWebExtensionController fetchDataRecordsOfTypes:completionHandler:]): Call
completionHandler.
(-[_WKWebExtensionController
fetchDataRecordOfTypes:forExtensionContext:completionHandler:]): Ditto.
(-[_WKWebExtensionController
removeDataOfTypes:forDataRecords:completionHandler:]): Ditto.
* Source/WebKit/UIProcess/API/Cocoa/_WKWebExtensionMatchPattern.mm:
(-[_WKWebExtensionMatchPattern initWithString:error:]): Return unsupported
error.
(-[_WKWebExtensionMatchPattern initWithScheme:host:path:error:]): Ditto.
* Source/WebKit/UIProcess/API/Cocoa/_WKWebExtensionMessagePort.mm:
(-[_WKWebExtensionMessagePort sendMessage:completionHandler:]): Call
completionHandler.
* Source/WebKit/UIProcess/API/Cocoa/_WKWebExtensionPrivate.h: Moved init method
here.
Added missing documentation comments.
Canonical link: https://commits.webkit.org/280642@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes