#include "extensions/browser/guest_view/web_view/web_view_content_script_manager.h"
#include "base/functional/bind.h"
#include "base/memory/ptr_util.h"
#include "content/public/browser/browser_context.h"
#include "content/public/browser/browser_task_traits.h"
#include "content/public/browser/browser_thread.h"
#include "content/public/browser/navigation_details.h"
#include "content/public/browser/render_frame_host.h"
#include "content/public/browser/render_process_host.h"
#include "extensions/browser/extension_system.h"
#include "extensions/browser/guest_view/web_view/web_view_constants.h"
#include "extensions/browser/guest_view/web_view/web_view_renderer_state.h"
#include "extensions/browser/user_script_loader.h"
#include "extensions/browser/user_script_manager.h"
#include "extensions/common/mojom/host_id.mojom.h"
BrowserThread;
namespace extensions {
WebViewContentScriptManager::WebViewContentScriptManager(
content::BrowserContext* browser_context)
: … { … }
WebViewContentScriptManager::~WebViewContentScriptManager() { … }
WebViewContentScriptManager* WebViewContentScriptManager::Get(
content::BrowserContext* browser_context) { … }
void WebViewContentScriptManager::AddContentScripts(
int embedder_process_id,
content::RenderFrameHost* render_frame_host,
int view_instance_id,
const mojom::HostID& host_id,
UserScriptList scripts) { … }
void WebViewContentScriptManager::RemoveAllContentScriptsForWebView(
int embedder_process_id,
int view_instance_id) { … }
void WebViewContentScriptManager::RemoveContentScripts(
int embedder_process_id,
int view_instance_id,
const mojom::HostID& host_id,
const std::vector<std::string>& script_name_list) { … }
std::set<std::string> WebViewContentScriptManager::GetContentScriptIDSet(
int embedder_process_id,
int view_instance_id) { … }
void WebViewContentScriptManager::SignalOnScriptsUpdated(
base::OnceClosure callback) { … }
void WebViewContentScriptManager::OnScriptsUpdated(
UserScriptLoader* loader,
const std::optional<std::string>& error) { … }
void WebViewContentScriptManager::RunCallbacksIfReady() { … }
}