Commit d3d86f52 authored by Anand K. Mistry's avatar Anand K. Mistry Committed by Commit Bot

[Extensions Functions] Migrate debugger API to ExtensionFunction

Bug: 634140
Change-Id: I38b8ad3ec7c01c2dedbb65281d7d4541bd553688
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2078371
Commit-Queue: Anand Mistry <amistry@chromium.org>
Reviewed-by: default avatarIstiaque Ahmed <lazyboy@chromium.org>
Cr-Commit-Position: refs/heads/master@{#746576}
parent 6b639f6c
......@@ -11,9 +11,9 @@
#include <string>
#include <vector>
#include "chrome/browser/extensions/chrome_extension_function.h"
#include "chrome/common/extensions/api/debugger.h"
#include "content/public/browser/devtools_agent_host.h"
#include "extensions/browser/extension_function.h"
using extensions::api::debugger::Debuggee;
......@@ -26,15 +26,15 @@ class DictionaryValue;
namespace extensions {
class ExtensionDevToolsClientHost;
class DebuggerFunction : public ChromeAsyncExtensionFunction {
class DebuggerFunction : public ExtensionFunction {
protected:
DebuggerFunction();
~DebuggerFunction() override;
void FormatErrorMessage(const std::string& format);
std::string FormatErrorMessage(const std::string& format);
bool InitAgentHost();
bool InitClientHost();
bool InitAgentHost(std::string* error);
bool InitClientHost(std::string* error);
ExtensionDevToolsClientHost* FindClientHost();
Debuggee debuggee_;
......@@ -53,7 +53,7 @@ class DebuggerAttachFunction : public DebuggerFunction {
~DebuggerAttachFunction() override;
// ExtensionFunction:
bool RunAsync() override;
ResponseAction Run() override;
};
// Implements the debugger.detach() extension function.
......@@ -67,7 +67,7 @@ class DebuggerDetachFunction : public DebuggerFunction {
~DebuggerDetachFunction() override;
// ExtensionFunction:
bool RunAsync() override;
ResponseAction Run() override;
};
// Implements the debugger.sendCommand() extension function.
......@@ -83,7 +83,7 @@ class DebuggerSendCommandFunction : public DebuggerFunction {
~DebuggerSendCommandFunction() override;
// ExtensionFunction:
bool RunAsync() override;
ResponseAction Run() override;
};
// Implements the debugger.getTargets() extension function.
......@@ -97,10 +97,7 @@ class DebuggerGetTargetsFunction : public DebuggerFunction {
~DebuggerGetTargetsFunction() override;
// ExtensionFunction:
bool RunAsync() override;
private:
void SendTargetList(const content::DevToolsAgentHost::List& target_list);
ResponseAction Run() override;
};
} // namespace extensions
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment