From f464b8c4c58165797517d6250d2ba860a9725aa2 Mon Sep 17 00:00:00 2001 From: deepak1556 Date: Thu, 25 Oct 2018 22:48:21 +0530 Subject: [PATCH] Respond for handling protocol commands async https://chromium-review.googlesource.com/c/chromium/src/+/1139575 --- atom/browser/ui/devtools_manager_delegate.cc | 8 +++++--- atom/browser/ui/devtools_manager_delegate.h | 6 ++++-- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/atom/browser/ui/devtools_manager_delegate.cc b/atom/browser/ui/devtools_manager_delegate.cc index 2361dfa83c13..d0bd634a1f30 100644 --- a/atom/browser/ui/devtools_manager_delegate.cc +++ b/atom/browser/ui/devtools_manager_delegate.cc @@ -93,11 +93,13 @@ DevToolsManagerDelegate::~DevToolsManagerDelegate() {} void DevToolsManagerDelegate::Inspect(content::DevToolsAgentHost* agent_host) {} -bool DevToolsManagerDelegate::HandleCommand( +void DevToolsManagerDelegate::HandleCommand( content::DevToolsAgentHost* agent_host, content::DevToolsAgentHostClient* client, - base::DictionaryValue* command) { - return false; + std::unique_ptr command, + const std::string& message, + NotHandledCallback callback) { + std::move(callback).Run(std::move(command), message); } scoped_refptr diff --git a/atom/browser/ui/devtools_manager_delegate.h b/atom/browser/ui/devtools_manager_delegate.h index 7170785933c7..504211f4d5f4 100644 --- a/atom/browser/ui/devtools_manager_delegate.h +++ b/atom/browser/ui/devtools_manager_delegate.h @@ -22,9 +22,11 @@ class DevToolsManagerDelegate : public content::DevToolsManagerDelegate { // DevToolsManagerDelegate implementation. void Inspect(content::DevToolsAgentHost* agent_host) override; - bool HandleCommand(content::DevToolsAgentHost* agent_host, + void HandleCommand(content::DevToolsAgentHost* agent_host, content::DevToolsAgentHostClient* client, - base::DictionaryValue* command) override; + std::unique_ptr command, + const std::string& message, + NotHandledCallback callback) override; scoped_refptr CreateNewTarget( const GURL& url) override; std::string GetDiscoveryPageHTML() override;