// Copyright 2021 The Chromium Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #ifndef CONTENT_PUBLIC_TEST_SCOPED_PAGE_FOCUS_OVERRIDE_H_ #define CONTENT_PUBLIC_TEST_SCOPED_PAGE_FOCUS_OVERRIDE_H_ #include "base/containers/span.h" #include "base/functional/callback_forward.h" #include "base/memory/ref_counted.h" #include "content/public/browser/devtools_agent_host.h" #include "content/public/browser/devtools_agent_host_client.h" namespace content { class WebContents; // This calls into devtools to enable focus emulation for the given WebContents. // As long as this class is alive any calls to Document::hasFocus() will return // true which emulates focus on that document. class ScopedPageFocusOverride : public DevToolsAgentHostClient { … }; } // namespace content #endif // CONTENT_PUBLIC_TEST_SCOPED_PAGE_FOCUS_OVERRIDE_H_