[webkit-changes] [WebKit/WebKit] 898777: Adjust _WKWebExtensionWindow and _WKWebExtensionTa...
Timothy Hatcher
noreply at github.com
Thu Aug 24 12:26:22 PDT 2023
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 8987771749cd19e4bfdff5daf2d57a1f276789f9
https://github.com/WebKit/WebKit/commit/8987771749cd19e4bfdff5daf2d57a1f276789f9
Author: Timothy Hatcher <timothy at apple.com>
Date: 2023-08-24 (Thu, 24 Aug 2023)
Changed paths:
M Source/WebKit/Modules/OSX_Private.modulemap
M Source/WebKit/Modules/iOS_Private.modulemap
M Source/WebKit/UIProcess/API/Cocoa/_WKWebExtensionContext.h
M Source/WebKit/UIProcess/API/Cocoa/_WKWebExtensionContext.mm
M Source/WebKit/UIProcess/API/Cocoa/_WKWebExtensionController.h
M Source/WebKit/UIProcess/API/Cocoa/_WKWebExtensionController.mm
M Source/WebKit/UIProcess/API/Cocoa/_WKWebExtensionControllerDelegate.h
M Source/WebKit/UIProcess/API/Cocoa/_WKWebExtensionTab.h
A Source/WebKit/UIProcess/API/Cocoa/_WKWebExtensionTabCreationOptions.h
A Source/WebKit/UIProcess/API/Cocoa/_WKWebExtensionTabCreationOptions.mm
A Source/WebKit/UIProcess/API/Cocoa/_WKWebExtensionTabCreationOptionsInternal.h
M Source/WebKit/UIProcess/API/Cocoa/_WKWebExtensionWindow.h
A Source/WebKit/UIProcess/API/Cocoa/_WKWebExtensionWindowCreationOptions.h
A Source/WebKit/UIProcess/API/Cocoa/_WKWebExtensionWindowCreationOptions.mm
A Source/WebKit/UIProcess/API/Cocoa/_WKWebExtensionWindowCreationOptionsInternal.h
M Source/WebKit/UIProcess/Extensions/Cocoa/WebExtensionContextCocoa.mm
M Source/WebKit/UIProcess/Extensions/Cocoa/WebExtensionTabCocoa.mm
M Source/WebKit/UIProcess/Extensions/Cocoa/WebExtensionWindowCocoa.mm
M Source/WebKit/UIProcess/Extensions/WebExtensionContext.h
M Source/WebKit/UIProcess/Extensions/WebExtensionTab.h
M Source/WebKit/UIProcess/Extensions/WebExtensionWindow.h
M Source/WebKit/WebKit.xcodeproj/project.pbxproj
Log Message:
-----------
Adjust _WKWebExtensionWindow and _WKWebExtensionTab APIs based on feedback.
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
More information about the webkit-changes
mailing list