Branch: refs/heads/main Home: https://github.com/WebKit/WebKit Commit: 476ad6dbea8e2e3d0fe1f72e4c9de6bfcc73189a https://github.com/WebKit/WebKit/commit/476ad6dbea8e2e3d0fe1f72e4c9de6bfcc73189a Author: Timothy Hatcher <timo...@apple.com> Date: 2022-10-10 (Mon, 10 Oct 2022)
Changed paths: M Source/WebKit/DerivedSources-input.xcfilelist M Source/WebKit/DerivedSources-output.xcfilelist M Source/WebKit/DerivedSources.make M Source/WebKit/Platform/cocoa/CocoaHelpers.h M Source/WebKit/Platform/cocoa/CocoaHelpers.mm M Source/WebKit/Shared/API/APIObject.h M Source/WebKit/Shared/Cocoa/APIObject.mm A Source/WebKit/Shared/WebExtensionContextIdentifier.h A Source/WebKit/Shared/WebExtensionContextParameters.h A Source/WebKit/Shared/WebExtensionContextParameters.serialization.in M Source/WebKit/Sources.txt M Source/WebKit/UIProcess/API/Cocoa/_WKWebExtension.h M Source/WebKit/UIProcess/API/Cocoa/_WKWebExtension.mm A Source/WebKit/UIProcess/API/Cocoa/_WKWebExtensionContext.h A Source/WebKit/UIProcess/API/Cocoa/_WKWebExtensionContext.mm A Source/WebKit/UIProcess/API/Cocoa/_WKWebExtensionContextInternal.h A Source/WebKit/UIProcess/API/Cocoa/_WKWebExtensionContextPrivate.h A Source/WebKit/UIProcess/API/Cocoa/_WKWebExtensionTab.h A Source/WebKit/UIProcess/API/Cocoa/_WKWebExtensionWindow.h M Source/WebKit/UIProcess/Extensions/Cocoa/WebExtensionCocoa.mm A Source/WebKit/UIProcess/Extensions/Cocoa/WebExtensionContextCocoa.mm M Source/WebKit/UIProcess/Extensions/Cocoa/WebExtensionMatchPatternCocoa.mm M Source/WebKit/UIProcess/Extensions/WebExtension.h A Source/WebKit/UIProcess/Extensions/WebExtensionContext.cpp A Source/WebKit/UIProcess/Extensions/WebExtensionContext.h A Source/WebKit/UIProcess/Extensions/WebExtensionContext.messages.in M Source/WebKit/UIProcess/Extensions/WebExtensionController.cpp M Source/WebKit/UIProcess/Extensions/WebExtensionController.h M Source/WebKit/UIProcess/Extensions/WebExtensionMatchPattern.h M Source/WebKit/WebKit.xcodeproj/project.pbxproj A Source/WebKit/WebProcess/Extensions/WebExtensionContextProxy.cpp A Source/WebKit/WebProcess/Extensions/WebExtensionContextProxy.h A Source/WebKit/WebProcess/Extensions/WebExtensionContextProxy.messages.in M Source/WebKit/WebProcess/Extensions/WebExtensionControllerProxy.cpp M Source/WebKit/WebProcess/GPU/webrtc/MediaRecorderPrivate.h M Tools/TestWebKitAPI/SourcesCocoa.txt M Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj M Tools/TestWebKitAPI/Tests/WebKitCocoa/WKWebExtension.mm A Tools/TestWebKitAPI/Tests/WebKitCocoa/WKWebExtensionContext.mm Log Message: ----------- Add _WKWebExtensionContext and WebKit::WebExtensionContext. https://bugs.webkit.org/show_bug.cgi?id=246255 Reviewed by Brian Weinstein. This class represents the runtime environment for an extension, which tracks permission access, and will eventually handle things like background page loading, injecting content, storage access, etc. * Source/WebKit/DerivedSources-input.xcfilelist: * Source/WebKit/DerivedSources-output.xcfilelist: * Source/WebKit/DerivedSources.make: * Source/WebKit/Platform/cocoa/CocoaHelpers.h: * Source/WebKit/Platform/cocoa/CocoaHelpers.mm: (WebKit::toAPI): (WebKit::toImpl): * Source/WebKit/Shared/API/APIObject.h: * Source/WebKit/Shared/Cocoa/APIObject.mm: (API::Object::newObject): * Source/WebKit/Shared/WebExtensionContextIdentifier.h: Added. * Source/WebKit/Shared/WebExtensionContextParameters.h: Added. * Source/WebKit/Shared/WebExtensionContextParameters.serialization.in: Added. * Source/WebKit/Sources.txt: * Source/WebKit/UIProcess/API/Cocoa/_WKWebExtension.h: * Source/WebKit/UIProcess/API/Cocoa/_WKWebExtension.mm: (-[_WKWebExtension requestedPermissions]): (-[_WKWebExtension optionalPermissions]): (-[_WKWebExtension requestedPermissionMatchPatterns]): (-[_WKWebExtension optionalPermissionMatchPatterns]): (-[_WKWebExtension allRequestedMatchPatterns]): (-[_WKWebExtension requestedPermissionOrigins]): Deleted. (-[_WKWebExtension optionalPermissionOrigins]): Deleted. (-[_WKWebExtension allRequestedOrigins]): Deleted. * Source/WebKit/UIProcess/API/Cocoa/_WKWebExtensionContext.h: Added. * Source/WebKit/UIProcess/API/Cocoa/_WKWebExtensionContext.mm: Added. (+[_WKWebExtensionContext contextWithExtension:]): (-[_WKWebExtensionContext initWithExtension:]): (-[_WKWebExtensionContext dealloc]): (-[_WKWebExtensionContext extension]): (-[_WKWebExtensionContext extensionController]): (-[_WKWebExtensionContext baseURL]): (-[_WKWebExtensionContext setBaseURL:]): (-[_WKWebExtensionContext uniqueIdentifier]): (-[_WKWebExtensionContext setUniqueIdentifier:]): (toImpl): (-[_WKWebExtensionContext grantedPermissions]): (-[_WKWebExtensionContext setGrantedPermissions:]): (-[_WKWebExtensionContext grantedPermissionMatchPatterns]): (-[_WKWebExtensionContext setGrantedPermissionMatchPatterns:]): (-[_WKWebExtensionContext deniedPermissions]): (-[_WKWebExtensionContext setDeniedPermissions:]): (-[_WKWebExtensionContext deniedPermissionMatchPatterns]): (-[_WKWebExtensionContext setDeniedPermissionMatchPatterns:]): (-[_WKWebExtensionContext requestedOptionalAccessToAllHosts]): (-[_WKWebExtensionContext setRequestedOptionalAccessToAllHosts:]): (toAPI): (-[_WKWebExtensionContext currentPermissions]): (-[_WKWebExtensionContext currentPermissionMatchPatterns]): (-[_WKWebExtensionContext hasPermission:]): (-[_WKWebExtensionContext hasPermission:inTab:]): (-[_WKWebExtensionContext hasAccessToURL:]): (-[_WKWebExtensionContext hasAccessToURL:inTab:]): (-[_WKWebExtensionContext permissionStateForPermission:]): (-[_WKWebExtensionContext permissionStateForPermission:inTab:]): (-[_WKWebExtensionContext setPermissionState:forPermission:]): (-[_WKWebExtensionContext setPermissionState:forPermission:expirationDate:]): (-[_WKWebExtensionContext permissionStateForURL:]): (-[_WKWebExtensionContext permissionStateForURL:inTab:]): (-[_WKWebExtensionContext setPermissionState:forURL:]): (-[_WKWebExtensionContext setPermissionState:forURL:expirationDate:]): (-[_WKWebExtensionContext permissionStateForMatchPattern:]): (-[_WKWebExtensionContext permissionStateForMatchPattern:inTab:]): (-[_WKWebExtensionContext setPermissionState:forMatchPattern:]): (-[_WKWebExtensionContext setPermissionState:forMatchPattern:expirationDate:]): (-[_WKWebExtensionContext hasAccessToAllURLs]): (-[_WKWebExtensionContext hasAccessToAllHosts]): (-[_WKWebExtensionContext userGesturePerformedInTab:]): (-[_WKWebExtensionContext hasActiveUserGestureInTab:]): (-[_WKWebExtensionContext cancelUserGestureForTab:]): (-[_WKWebExtensionContext _apiObject]): (-[_WKWebExtensionContext _webExtensionContext]): * Source/WebKit/UIProcess/API/Cocoa/_WKWebExtensionContextInternal.h: Added. * Source/WebKit/UIProcess/API/Cocoa/_WKWebExtensionContextPrivate.h: Added. * Source/WebKit/UIProcess/API/Cocoa/_WKWebExtensionTab.h: Added. * Source/WebKit/UIProcess/API/Cocoa/_WKWebExtensionWindow.h: Added. * Source/WebKit/UIProcess/Extensions/Cocoa/WebExtensionCocoa.mm: (WebKit::WebExtension::hasRequestedPermission const): (WebKit::WebExtension::supportedPermissions): (WebKit::WebExtension::requestedPermissions): (WebKit::WebExtension::optionalPermissions): (WebKit::WebExtension::requestedPermissionMatchPatterns): (WebKit::WebExtension::optionalPermissionMatchPatterns): (WebKit::WebExtension::allRequestedMatchPatterns): (WebKit::WebExtension::populatePermissionsPropertiesIfNeeded): (WebKit::toAPI): (WebKit::WebExtension::requestedPermissionOrigins): Deleted. (WebKit::WebExtension::optionalPermissionOrigins): Deleted. (WebKit::WebExtension::allRequestedOrigins): Deleted. * Source/WebKit/UIProcess/Extensions/Cocoa/WebExtensionContextCocoa.mm: Added. (WebKit::WebExtensionContext::WebExtensionContext): (WebKit::WebExtensionContext::setBaseURL): (WebKit::WebExtensionContext::isURLForThisExtension): (WebKit::WebExtensionContext::setUniqueIdentifier): (WebKit::WebExtensionContext::grantedPermissions): (WebKit::WebExtensionContext::setGrantedPermissions): (WebKit::WebExtensionContext::deniedPermissions): (WebKit::WebExtensionContext::setDeniedPermissions): (WebKit::WebExtensionContext::grantedPermissionMatchPatterns): (WebKit::WebExtensionContext::setGrantedPermissionMatchPatterns): (WebKit::WebExtensionContext::deniedPermissionMatchPatterns): (WebKit::WebExtensionContext::setDeniedPermissionMatchPatterns): (WebKit::WebExtensionContext::postAsyncNotification): (WebKit::WebExtensionContext::grantPermissions): (WebKit::WebExtensionContext::denyPermissions): (WebKit::WebExtensionContext::grantPermissionMatchPatterns): (WebKit::WebExtensionContext::denyPermissionMatchPatterns): (WebKit::WebExtensionContext::removeGrantedPermissions): (WebKit::WebExtensionContext::removeGrantedPermissionMatchPatterns): (WebKit::WebExtensionContext::removeDeniedPermissions): (WebKit::WebExtensionContext::removeDeniedPermissionMatchPatterns): (WebKit::WebExtensionContext::removePermissions): (WebKit::WebExtensionContext::removePermissionMatchPatterns): (WebKit::WebExtensionContext::removeExpired): (WebKit::WebExtensionContext::hasPermission): (WebKit::WebExtensionContext::permissionState): (WebKit::WebExtensionContext::setPermissionState): (WebKit::WebExtensionContext::clearCachedPermissionStates): (WebKit::WebExtensionContext::hasAccessToAllURLs): (WebKit::WebExtensionContext::hasAccessToAllHosts): (WebKit::WebExtensionContext::userGesturePerformed): (WebKit::WebExtensionContext::hasActiveUserGesture const): (WebKit::WebExtensionContext::cancelUserGesture): * Source/WebKit/UIProcess/Extensions/Cocoa/WebExtensionMatchPatternCocoa.mm: (WebKit::WebExtensionMatchPattern::validSchemes): (WebKit::WebExtensionMatchPattern::supportedSchemes): (WebKit::patternCache): (WebKit::WebExtensionMatchPattern::isSupported const): (WebKit::WebExtensionMatchPattern::expandedStrings const): (WebKit::WebExtensionMatchPattern::isValidScheme): (WebKit::WebExtensionMatchPattern::matchesURL): (WebKit::WebExtensionMatchPattern::matchesPattern): * Source/WebKit/UIProcess/Extensions/WebExtension.h: (WebKit::WebExtension::wrapper const): * Source/WebKit/UIProcess/Extensions/WebExtensionContext.cpp: Added. (WebKit::WebExtensionContext::get): (WebKit::WebExtensionContext::WebExtensionContext): (WebKit::WebExtensionContext::~WebExtensionContext): (WebKit::WebExtensionContext::parameters const): * Source/WebKit/UIProcess/Extensions/WebExtensionContext.h: Added. (WebKit::WebExtensionContext::create): (WebKit::WebExtensionContext::identifier const): (WebKit::WebExtensionContext::isLoaded const): (WebKit::WebExtensionContext::extension const): (WebKit::WebExtensionContext::extensionController const): (WebKit::WebExtensionContext::baseURL const): (WebKit::WebExtensionContext::uniqueIdentifier const): (WebKit::WebExtensionContext::requestedOptionalAccessToAllHosts const): (WebKit::WebExtensionContext::setRequestedOptionalAccessToAllHosts): (WebKit::WebExtensionContext::currentPermissions): (WebKit::WebExtensionContext::currentPermissionMatchPatterns): (WebKit::WebExtensionContext::hasPermission): (WebKit::WebExtensionContext::permissionState): (WebKit::WebExtensionContext::wrapper const): * Source/WebKit/UIProcess/Extensions/WebExtensionContext.messages.in: Added. * Source/WebKit/UIProcess/Extensions/WebExtensionController.cpp: * Source/WebKit/UIProcess/Extensions/WebExtensionController.h: * Source/WebKit/UIProcess/Extensions/WebExtensionMatchPattern.h: (WebKit::WebExtensionMatchPattern::wrapper const): * Source/WebKit/WebKit.xcodeproj/project.pbxproj: * Source/WebKit/WebProcess/Extensions/WebExtensionContextProxy.cpp: Added. (WebKit::WebExtensionContextProxy::getOrCreate): (WebKit::WebExtensionContextProxy::WebExtensionContextProxy): (WebKit::WebExtensionContextProxy::~WebExtensionContextProxy): * Source/WebKit/WebProcess/Extensions/WebExtensionContextProxy.h: Added. * Source/WebKit/WebProcess/Extensions/WebExtensionContextProxy.messages.in: Added. * Source/WebKit/WebProcess/GPU/webrtc/MediaRecorderPrivate.h: Include header to fix build. * Source/WebKit/WebProcess/WebCoreSupport/WebScreenOrientationManager.cpp: Ditto. * Tools/TestWebKitAPI/SourcesCocoa.txt: * Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj: * Tools/TestWebKitAPI/Tests/WebKitCocoa/WKWebExtension.mm: (TestWebKitAPI::TEST): * Tools/TestWebKitAPI/Tests/WebKitCocoa/WKWebExtensionContext.mm: Added. (TestWebKitAPI::TEST): Canonical link: https://commits.webkit.org/255374@main _______________________________________________ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes