HandleCommand now takes session_id and returns success boolean. It is assumed a nullptr from the handler means failure

This commit is contained in:
Samuel Attard 2017-12-18 11:00:20 +11:00 committed by Aleksei Kuzmin
parent ed992ae6a1
commit 461e33104e
2 changed files with 8 additions and 3 deletions

View file

@ -103,10 +103,14 @@ DevToolsManagerDelegate::~DevToolsManagerDelegate() {
void DevToolsManagerDelegate::Inspect(content::DevToolsAgentHost* agent_host) { void DevToolsManagerDelegate::Inspect(content::DevToolsAgentHost* agent_host) {
} }
base::DictionaryValue* DevToolsManagerDelegate::HandleCommand( bool DevToolsManagerDelegate::HandleCommand(
content::DevToolsAgentHost* agent_host, content::DevToolsAgentHost* agent_host,
int session_id,
base::DictionaryValue* command) { base::DictionaryValue* command) {
return handler_->HandleCommand(agent_host, command); if (handler_->HandleCommand(agent_host, command)) {
return true;
}
return false;
} }
scoped_refptr<content::DevToolsAgentHost> scoped_refptr<content::DevToolsAgentHost>

View file

@ -24,8 +24,9 @@ class DevToolsManagerDelegate : public content::DevToolsManagerDelegate {
// DevToolsManagerDelegate implementation. // DevToolsManagerDelegate implementation.
void Inspect(content::DevToolsAgentHost* agent_host) override; void Inspect(content::DevToolsAgentHost* agent_host) override;
base::DictionaryValue* HandleCommand( bool HandleCommand(
content::DevToolsAgentHost* agent_host, content::DevToolsAgentHost* agent_host,
int session_id,
base::DictionaryValue* command) override; base::DictionaryValue* command) override;
scoped_refptr<content::DevToolsAgentHost> CreateNewTarget( scoped_refptr<content::DevToolsAgentHost> CreateNewTarget(
const GURL& url) override; const GURL& url) override;