1diff --git third_party/blink/public/platform/platform.h third_party/blink/public/platform/platform.h 2index f545c18c2e142..26757184a79d5 100644 3--- third_party/blink/public/platform/platform.h 4+++ third_party/blink/public/platform/platform.h 5@@ -865,6 +865,11 @@ class BLINK_PLATFORM_EXPORT Platform { 6 const WebURL& url, 7 blink::WebVector<blink::WebContentSecurityPolicyHeader>* csp) {} 8 9+ // DevTools ------------------------------------------------------------ 10+ 11+ virtual void DevToolsAgentAttached() {} 12+ virtual void DevToolsAgentDetached() {} 13+ 14 private: 15 static void InitializeMainThreadCommon(Platform* platform, 16 std::unique_ptr<Thread> main_thread); 17diff --git third_party/blink/renderer/core/inspector/devtools_session.cc third_party/blink/renderer/core/inspector/devtools_session.cc 18index 513bee6f4a3e3..df7c2512a343e 100644 19--- third_party/blink/renderer/core/inspector/devtools_session.cc 20+++ third_party/blink/renderer/core/inspector/devtools_session.cc 21@@ -8,6 +8,7 @@ 22 #include <utility> 23 #include <vector> 24 25+#include "third_party/blink/public/platform/platform.h" 26 #include "third_party/blink/renderer/bindings/core/v8/script_controller.h" 27 #include "third_party/blink/renderer/core/frame/local_frame.h" 28 #include "third_party/blink/renderer/core/inspector/devtools_agent.h" 29@@ -146,6 +147,7 @@ DevToolsSession::DevToolsSession( 30 for (wtf_size_t i = 0; i < agents_.size(); i++) 31 agents_[i]->Restore(); 32 } 33+ Platform::Current()->DevToolsAgentAttached(); 34 } 35 36 DevToolsSession::~DevToolsSession() { 37@@ -186,6 +188,7 @@ void DevToolsSession::Detach() { 38 agents_.clear(); 39 v8_session_.reset(); 40 agent_->client_->DebuggerTaskFinished(); 41+ Platform::Current()->DevToolsAgentDetached(); 42 } 43 44 void DevToolsSession::DispatchProtocolCommand( 45