Commit a39c9305 authored by Sigurd Schneider's avatar Sigurd Schneider Committed by Commit Bot

Allow retrieving DevToolsAgentHostImpl from id

This allows to expose certain methods only on the impl,
not on the public interface.

Bug: chromium:1069378
Change-Id: I3623aadb5f9d9ebb7f2dae4c78cb830ee74f55b5
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2426043Reviewed-by: default avatarPeter Marshall <petermarshall@chromium.org>
Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
Cr-Commit-Position: refs/heads/master@{#809752}
parent 76165ce5
......@@ -101,7 +101,7 @@ DevToolsAgentHostImpl::~DevToolsAgentHostImpl() {
}
// static
scoped_refptr<DevToolsAgentHost> DevToolsAgentHost::GetForId(
scoped_refptr<DevToolsAgentHostImpl> DevToolsAgentHostImpl::GetForId(
const std::string& id) {
if (!g_devtools_instances.IsCreated())
return nullptr;
......@@ -111,6 +111,12 @@ scoped_refptr<DevToolsAgentHost> DevToolsAgentHost::GetForId(
return it->second;
}
// static
scoped_refptr<DevToolsAgentHost> DevToolsAgentHost::GetForId(
const std::string& id) {
return DevToolsAgentHostImpl::GetForId(id);
}
// static
scoped_refptr<DevToolsAgentHost> DevToolsAgentHost::Forward(
const std::string& id,
......
......@@ -28,6 +28,9 @@ class BrowserContext;
// Describes interface for managing devtools agents from the browser process.
class CONTENT_EXPORT DevToolsAgentHostImpl : public DevToolsAgentHost {
public:
// Returns DevToolsAgentHost with a given |id| or nullptr of it doesn't exist.
static scoped_refptr<DevToolsAgentHostImpl> GetForId(const std::string& id);
// DevToolsAgentHost implementation.
bool AttachClient(DevToolsAgentHostClient* client) override;
bool AttachClientWithoutWakeLock(DevToolsAgentHostClient* client) override;
......
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