-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adjust _WKWebExtensionWindow and _WKWebExtensionTab APIs based on fee…
…dback. https://webkit.org/b/260156 Reviewed by Brian Weinstein. * Added delegate methods for window and tab creation with new helper classes to hold sugested properties for the new windows and tabs. * Have all action methods for windows and tabs take a completionHandler so clients that need do do them async can report when they are complete. * Renamed isEphemerial to isUsingPrivateBrowsing to be more clear and match common wording. * Added missing close method, and setter methods for frame and windowState on the window protocol. * Removed method for isEphemeral on the tab protocol, since tabs are required to be in a private window. * Added missing activate, duplicate, and setZoomFactor methods on the tab protocol. * Source/WebKit/Modules/OSX_Private.modulemap: Added new headers. * Source/WebKit/Modules/iOS_Private.modulemap: Added new headers. * Source/WebKit/UIProcess/API/Cocoa/_WKWebExtensionContext.mm: (toImpl): Fix the cases for All and None. (-[_WKWebExtensionContext didActivateTab:]): Added. * Source/WebKit/UIProcess/API/Cocoa/_WKWebExtensionController.h: * Source/WebKit/UIProcess/API/Cocoa/_WKWebExtensionController.mm: (-[_WKWebExtensionController didActivateTab:]): Added. * Source/WebKit/UIProcess/API/Cocoa/_WKWebExtensionControllerDelegate.h: * Source/WebKit/UIProcess/API/Cocoa/_WKWebExtensionTab.h: * Source/WebKit/UIProcess/API/Cocoa/_WKWebExtensionTabCreationOptions.h: Added. * Source/WebKit/UIProcess/API/Cocoa/_WKWebExtensionTabCreationOptions.mm: Added. (-[_WKWebExtensionTabCreationOptions _init]): * Source/WebKit/UIProcess/API/Cocoa/_WKWebExtensionTabCreationOptionsInternal.h: Added. * Source/WebKit/UIProcess/API/Cocoa/_WKWebExtensionWindow.h: * Source/WebKit/UIProcess/API/Cocoa/_WKWebExtensionWindowCreationOptions.h: Added. * Source/WebKit/UIProcess/API/Cocoa/_WKWebExtensionWindowCreationOptions.mm: Added. (-[_WKWebExtensionWindowCreationOptions _init]): * Source/WebKit/UIProcess/API/Cocoa/_WKWebExtensionWindowCreationOptionsInternal.h: Added. * Source/WebKit/UIProcess/Extensions/Cocoa/WebExtensionContextCocoa.mm: (WebKit::WebExtensionContext::didActivateTab): Added. * Source/WebKit/UIProcess/Extensions/Cocoa/WebExtensionTabCocoa.mm: (WebKit::WebExtensionTab::WebExtensionTab): (WebKit::WebExtensionTab::window const): (WebKit::WebExtensionTab::index const): Added. (WebKit::WebExtensionTab::isPrivate const): Return the result from the containing window. (WebKit::WebExtensionTab::toggleReaderMode): (WebKit::WebExtensionTab::mute): (WebKit::WebExtensionTab::unmute): (WebKit::WebExtensionTab::detectWebpageLocale): (WebKit::WebExtensionTab::loadURL): (WebKit::WebExtensionTab::reload): (WebKit::WebExtensionTab::reloadFromOrigin): (WebKit::WebExtensionTab::goBack): (WebKit::WebExtensionTab::goForward): (WebKit::WebExtensionTab::activate): Added. (WebKit::WebExtensionTab::select): (WebKit::WebExtensionTab::duplicate): (WebKit::WebExtensionTab::close): * Source/WebKit/UIProcess/Extensions/Cocoa/WebExtensionWindowCocoa.mm: (WebKit::WebExtensionWindow::WebExtensionWindow): (WebKit::toAPI): Added. (WebKit::WebExtensionWindow::setState): Added. (WebKit::WebExtensionWindow::isPrivate const): Renamed from isEphemeral. (WebKit::WebExtensionWindow::setFrame): Added. (WebKit::WebExtensionWindow::close): Added. (WebKit::WebExtensionWindow::isEphemeral const): Deleted. * Source/WebKit/UIProcess/Extensions/WebExtensionTab.h: * Source/WebKit/UIProcess/Extensions/WebExtensionWindow.h: * Source/WebKit/WebKit.xcodeproj/project.pbxproj: Added new files. Canonical link: https://commits.webkit.org/267240@main
- Loading branch information
Showing
22 changed files
with
938 additions
and
108 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
Oops, something went wrong.