#include "content/browser/devtools/browser_devtools_agent_host.h"
#include "base/clang_profiling_buildflags.h"
#include "base/functional/bind.h"
#include "base/json/json_reader.h"
#include "base/memory/ptr_util.h"
#include "base/no_destructor.h"
#include "base/task/single_thread_task_runner.h"
#include "base/uuid.h"
#include "build/config/compiler/compiler_buildflags.h"
#include "components/viz/common/buildflags.h"
#include "content/browser/devtools/devtools_session.h"
#include "content/browser/devtools/protocol/browser_handler.h"
#include "content/browser/devtools/protocol/fetch_handler.h"
#include "content/browser/devtools/protocol/io_handler.h"
#include "content/browser/devtools/protocol/memory_handler.h"
#include "content/browser/devtools/protocol/protocol.h"
#include "content/browser/devtools/protocol/security_handler.h"
#include "content/browser/devtools/protocol/storage_handler.h"
#include "content/browser/devtools/protocol/system_info_handler.h"
#include "content/browser/devtools/protocol/target_handler.h"
#include "content/browser/devtools/protocol/tethering_handler.h"
#include "content/browser/devtools/protocol/tracing_handler.h"
#include "content/browser/devtools/render_frame_devtools_agent_host.h"
#include "content/browser/devtools/service_worker_devtools_agent_host.h"
#include "content/browser/renderer_host/frame_tree_node.h"
#include "content/browser/web_contents/web_contents_impl.h"
#ifdef ENABLE_BLUETOOTH_EMULATION
#include "content/browser/devtools/protocol/bluetooth_emulation_handler.h"
#endif
#if BUILDFLAG(USE_VIZ_DEBUGGER)
#include "content/browser/devtools/protocol/visual_debugger_handler.h"
#endif
#if BUILDFLAG(CLANG_PROFILING_INSIDE_SANDBOX) && BUILDFLAG(CLANG_PGO)
#include "content/browser/devtools/protocol/native_profiling_handler.h"
#endif
namespace content {
scoped_refptr<DevToolsAgentHost> DevToolsAgentHost::CreateForBrowser(
scoped_refptr<base::SingleThreadTaskRunner> tethering_task_runner,
const CreateServerSocketCallback& socket_callback) { … }
scoped_refptr<DevToolsAgentHost> DevToolsAgentHost::CreateForDiscovery() { … }
namespace {
std::set<BrowserDevToolsAgentHost*>& BrowserDevToolsAgentHostInstances() { … }
}
class BrowserDevToolsAgentHost::BrowserAutoAttacher final
: public protocol::TargetAutoAttacher,
public ServiceWorkerDevToolsManager::Observer,
public DevToolsAgentHostObserver { … };
const std::set<BrowserDevToolsAgentHost*>&
BrowserDevToolsAgentHost::Instances() { … }
BrowserDevToolsAgentHost::BrowserDevToolsAgentHost(
scoped_refptr<base::SingleThreadTaskRunner> tethering_task_runner,
const CreateServerSocketCallback& socket_callback,
bool only_discovery)
: … { … }
BrowserDevToolsAgentHost::~BrowserDevToolsAgentHost() { … }
bool BrowserDevToolsAgentHost::AttachSession(DevToolsSession* session,
bool acquire_wake_lock) { … }
void BrowserDevToolsAgentHost::DetachSession(DevToolsSession* session) { … }
protocol::TargetAutoAttacher* BrowserDevToolsAgentHost::auto_attacher() { … }
std::string BrowserDevToolsAgentHost::GetType() { … }
std::string BrowserDevToolsAgentHost::GetTitle() { … }
GURL BrowserDevToolsAgentHost::GetURL() { … }
bool BrowserDevToolsAgentHost::Activate() { … }
bool BrowserDevToolsAgentHost::Close() { … }
void BrowserDevToolsAgentHost::Reload() { … }
}