https://bugs.webkit.org/show_bug.cgi?id=190147
Patch by Alex Christensen <achristensen@webkit.org> on 2018-10-02
Reviewed by Andy Estes.
* Shared/Cocoa/APIObject.mm:
(API::Object::newObject):
* UIProcess/API/Cocoa/WKConnection.h:
* UIProcess/API/Cocoa/WKConnection.mm:
(didReceiveMessage):
(didClose):
* UIProcess/API/Cocoa/WKConnectionInternal.h:
* UIProcess/API/Cocoa/WKProcessGroup.h:
* WebProcess/InjectedBundle/API/mac/WKWebProcessPlugIn.h:
* WebProcess/InjectedBundle/API/mac/WKWebProcessPlugIn.mm:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@236775
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
+2018-10-02 Alex Christensen <achristensen@webkit.org>
+
+ Deprecate WKConnection
+ https://bugs.webkit.org/show_bug.cgi?id=190147
+
+ Reviewed by Andy Estes.
+
+ * Shared/Cocoa/APIObject.mm:
+ (API::Object::newObject):
+ * UIProcess/API/Cocoa/WKConnection.h:
+ * UIProcess/API/Cocoa/WKConnection.mm:
+ (didReceiveMessage):
+ (didClose):
+ * UIProcess/API/Cocoa/WKConnectionInternal.h:
+ * UIProcess/API/Cocoa/WKProcessGroup.h:
+ * WebProcess/InjectedBundle/API/mac/WKWebProcessPlugIn.h:
+ * WebProcess/InjectedBundle/API/mac/WKWebProcessPlugIn.mm:
+
2018-10-01 Dean Jackson <dino@apple.com>
[macOS] Switching to discrete GPU should be done in the UI process
case Type::Connection:
// While not actually a WKObject instance, WKConnection uses allocateWKObject to allocate extra space
// instead of using ObjectStorage because the wrapped C++ object is a subclass of WebConnection.
+ ALLOW_DEPRECATED_DECLARATIONS_BEGIN
wrapper = allocateWKObject([WKConnection self], size);
+ ALLOW_DEPRECATED_DECLARATIONS_END
break;
case Type::Preferences:
@end
-WK_CLASS_AVAILABLE(macosx(10.10), ios(8.0))
+WK_CLASS_DEPRECATED_WITH_REPLACEMENT("_WKRemoteObjectRegistry", macos(10.10, WK_MAC_TBA), ios(8.0, WK_IOS_TBA))
@interface WKConnection : NSObject
- (void)sendMessageWithName:(NSString *)messageName body:(id)messageBody;
static void didReceiveMessage(WKConnectionRef, WKStringRef messageName, WKTypeRef messageBody, const void* clientInfo)
{
+ ALLOW_DEPRECATED_DECLARATIONS_BEGIN
auto connection = (__bridge WKConnection *)clientInfo;
+ ALLOW_DEPRECATED_DECLARATIONS_END
auto delegate = connection->_delegate.get();
if ([delegate respondsToSelector:@selector(connection:didReceiveMessageWithName:body:)]) {
static void didClose(WKConnectionRef, const void* clientInfo)
{
+ ALLOW_DEPRECATED_DECLARATIONS_BEGIN
auto connection = (__bridge WKConnection *)clientInfo;
+ ALLOW_DEPRECATED_DECLARATIONS_END
auto delegate = connection->_delegate.get();
if ([delegate respondsToSelector:@selector(connectionDidClose:)])
namespace WebKit {
template<> struct WrapperTraits<WebConnection> {
+ ALLOW_DEPRECATED_DECLARATIONS_BEGIN
using WrapperClass = WKConnection;
+ ALLOW_DEPRECATED_DECLARATIONS_END
};
}
@required
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
- (void)processGroup:(WKProcessGroup *)processGroup didCreateConnectionToWebProcessPlugIn:(WKConnection *)connection;
+#pragma clang diagnostic pop
@end
@interface WKWebProcessPlugInController : NSObject
- (void)extendClassesForParameterCoder:(NSArray *)classes WK_API_AVAILABLE(macosx(10.14), ios(12.0));
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
@property (readonly) WKConnection *connection;
+#pragma clang diagnostic pop
@property (readonly) id parameters;
setUpBundleClient(self, *_bundle);
}
+ALLOW_DEPRECATED_DECLARATIONS_BEGIN
- (WKConnection *)connection
{
return wrapper(*_bundle->webConnectionToUIProcess());
}
+ALLOW_DEPRECATED_DECLARATIONS_END
- (id)parameters
{