// Copyright 2022 The Chromium Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #ifndef CHROME_TEST_BASE_DEVTOOLS_AGENT_COVERAGE_OBSERVER_H_ #define CHROME_TEST_BASE_DEVTOOLS_AGENT_COVERAGE_OBSERVER_H_ #include <map> #include <memory> #include <utility> #include "base/memory/scoped_refptr.h" #include "chrome/test/base/devtools_listener.h" #include "content/public/browser/devtools_agent_host_observer.h" // Callback to filter out the `DevToolsAgentHost*` that get attached to. // Extensions with background / foreground pages share the same v8 isolate // (see crbug.com/v8/10820) so don't get coverage for one of those to avoid a // DCHECK. ShouldInspectDevToolsAgentHostCallback; // Observes new DevToolsAgentHosts and ensures code coverage is enabled and // can be collected. class DevToolsAgentCoverageObserver : public content::DevToolsAgentHostObserver { … }; #endif // CHROME_TEST_BASE_DEVTOOLS_AGENT_COVERAGE_OBSERVER_H_