From 32825d9bf272b098944e6ce9e16ea03708408f13 Mon Sep 17 00:00:00 2001 From: Joffrey Bion Date: Sat, 20 Aug 2022 22:33:46 +0200 Subject: [PATCH] Remove deprecated ChromeDPTarget.attach() method Resolves: https://github.com/joffrey-bion/chrome-devtools-kotlin/issues/192 --- api/chrome-devtools-kotlin.api | 2 -- .../hildan/chrome/devtools/protocol/ChromeDPClient.kt | 11 +---------- 2 files changed, 1 insertion(+), 12 deletions(-) diff --git a/api/chrome-devtools-kotlin.api b/api/chrome-devtools-kotlin.api index 49ac942f..ec578c72 100644 --- a/api/chrome-devtools-kotlin.api +++ b/api/chrome-devtools-kotlin.api @@ -41529,8 +41529,6 @@ public final class org/hildan/chrome/devtools/protocol/ChromeDPTarget { public static final field Companion Lorg/hildan/chrome/devtools/protocol/ChromeDPTarget$Companion; public synthetic fun (ILjava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Lkotlinx/serialization/internal/SerializationConstructorMarker;)V public fun (Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V - public final fun attach (Lorg/hildan/krossbow/websocket/WebSocketClient;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; - public static synthetic fun attach$default (Lorg/hildan/chrome/devtools/protocol/ChromeDPTarget;Lorg/hildan/krossbow/websocket/WebSocketClient;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object; public final fun component1 ()Ljava/lang/String; public final fun component2 ()Ljava/lang/String; public final fun component3 ()Ljava/lang/String; diff --git a/src/main/kotlin/org/hildan/chrome/devtools/protocol/ChromeDPClient.kt b/src/main/kotlin/org/hildan/chrome/devtools/protocol/ChromeDPClient.kt index bc0e85a7..ec5df5c1 100644 --- a/src/main/kotlin/org/hildan/chrome/devtools/protocol/ChromeDPClient.kt +++ b/src/main/kotlin/org/hildan/chrome/devtools/protocol/ChromeDPClient.kt @@ -177,16 +177,7 @@ data class ChromeDPTarget( val description: String, val devtoolsFrontendUrl: String, val webSocketDebuggerUrl: String, -) { - /** - * Attaches to this target via a new web socket connection to this target's debugger URL. - * This establishes a new protocol session to this target. - */ - @Deprecated("this method provides no way of closing the created websocket connection, prefer using " + - "ChromeDPClient.webSocket and using the richer websocket API to interact with targets (ChromeBrowserSession.target)") - suspend fun attach(webSocketClient: WebSocketClient = DEFAULT_WEBSOCKET_CLIENT): ChromePageSession = - webSocketClient.connectToChrome(webSocketDebuggerUrl).attachToPage(id) -} +) /** * Connects to the Chrome debugger at the given [webSocketDebuggerUrl].