Branch: refs/heads/main Home: https://github.com/WebKit/WebKit Commit: afed0b22500b9d8e73f1bc3bc28c381d2c95c956 https://github.com/WebKit/WebKit/commit/afed0b22500b9d8e73f1bc3bc28c381d2c95c956 Author: Kiara Rose <kiara_r...@apple.com> Date: 2022-12-08 (Thu, 08 Dec 2022)
Changed paths: M Source/WebKit/Shared/Extensions/WebExtensionEventListenerType.h M Source/WebKit/UIProcess/API/Cocoa/_WKWebExtensionControllerConfiguration.mm M Source/WebKit/UIProcess/Extensions/Cocoa/API/WebExtensionContextAPIEventCocoa.mm M Source/WebKit/UIProcess/Extensions/Cocoa/WebExtensionContextCocoa.mm M Source/WebKit/UIProcess/Extensions/Cocoa/WebExtensionControllerCocoa.mm M Source/WebKit/UIProcess/Extensions/WebExtensionContext.h M Source/WebKit/UIProcess/Extensions/WebExtensionController.h M Source/WebKit/UIProcess/Extensions/WebExtensionControllerConfiguration.cpp M Source/WebKit/UIProcess/Extensions/WebExtensionControllerConfiguration.h Log Message: ----------- Add support for the Web Extension's Event API in the UIProcess. https://bugs.webkit.org/show_bug.cgi?id=248684. Reviewed by Timothy Hatcher. This patch adds support for the Event API in the UIProcess. This includes loading the background page listeners from storage when the extension loads, and saving these listeners to storage (for non-persistent background pages). * Source/WebKit/Shared/Extensions/WebExtensionEventListenerType.h: * Source/WebKit/UIProcess/API/Cocoa/_WKWebExtensionControllerConfiguration.h: * Source/WebKit/UIProcess/API/Cocoa/_WKWebExtensionControllerConfiguration.mm: (-[_WKWebExtensionControllerConfiguration storageIsPersistent]): Rename isPersistent() to storageIsPersistent() to make it clear that this function is for checking to see if information relating to the extension is saved to storage and not for the extension background page being persistent. * Source/WebKit/UIProcess/Extensions/Cocoa/API/WebExtensionContextAPIEventCocoa.mm: (WebKit::WebExtensionContext::addListener): (WebKit::WebExtensionContext::removeListener): * Source/WebKit/UIProcess/Extensions/Cocoa/WebExtensionContextCocoa.mm: (WebKit::WebExtensionContext::load): Add FIXME to check to see if extension is being loaded as part of startup. (WebKit::WebExtensionContext::stateFilePath const): (WebKit::WebExtensionContext::readStateFromStorage): (WebKit::WebExtensionContext::writeStateToStorage const): Use newly renamed storageIsPersistent(). (WebKit::WebExtensionContext::loadBackgroundWebViewDuringLoad): Load background page listeners from storage. Add FIXME to check to see if the extension is being loaded as part of startup. (WebKit::WebExtensionContext::loadBackgroundPageListenersFromStorage): Retrieve background page listeners data from storage. Populate m_backgroundPageListeners. (WebKit::WebExtensionContext::saveBackgroundPageListenersToStorage): Save background page listeners to storage for non persistent background pages. (WebKit::WebExtensionContext::loadBackgroundPageListenersVersionNumberFromStorage): (WebKit::WebExtensionContext::performTasksAfterBackgroundContentLoads): Save background page listeners to storage. * Source/WebKit/UIProcess/Extensions/Cocoa/WebExtensionControllerCocoa.mm: (WebKit::WebExtensionController::storageDirectory const): * Source/WebKit/UIProcess/Extensions/WebExtensionContext.h: (WebKit::WebExtensionContext::storageIsPersistent const): (WebKit::WebExtensionContext::isPersistent const): Deleted. * Source/WebKit/UIProcess/Extensions/WebExtensionController.h: (WebKit::WebExtensionController::storageIsPersistent const): (WebKit::WebExtensionController::isPersistent const): Deleted. * Source/WebKit/UIProcess/Extensions/WebExtensionControllerConfiguration.cpp: (WebKit::WebExtensionControllerConfiguration::copy const): Use newly renamed storageIsPersistent(). * Source/WebKit/UIProcess/Extensions/WebExtensionControllerConfiguration.h: (WebKit::WebExtensionControllerConfiguration::storageIsPersistent const): (WebKit::WebExtensionControllerConfiguration::isPersistent const): Deleted. Canonical link: https://commits.webkit.org/257589@main _______________________________________________ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes