#ifndef EXTENSIONS_BROWSER_API_EXECUTE_CODE_FUNCTION_IMPL_H_
#define EXTENSIONS_BROWSER_API_EXECUTE_CODE_FUNCTION_IMPL_H_
#include "extensions/browser/api/execute_code_function.h"
#include <optional>
#include <utility>
#include "base/functional/bind.h"
#include "base/not_fatal_until.h"
#include "base/ranges/algorithm.h"
#include "extensions/browser/extension_api_frame_id_map.h"
#include "extensions/browser/extensions_browser_client.h"
#include "extensions/browser/load_and_localize_file.h"
#include "extensions/common/error_utils.h"
#include "extensions/common/extension.h"
#include "extensions/common/extension_resource.h"
#include "extensions/common/mojom/css_origin.mojom-shared.h"
#include "extensions/common/mojom/run_location.mojom-shared.h"
#include "extensions/common/utils/content_script_utils.h"
#include "extensions/common/utils/extension_types_utils.h"
namespace {
const char kNoCodeOrFileToExecuteError[] = …;
const char kMoreThanOneValuesError[] = …;
const char kBadFileEncodingError[] = …;
const char kCSSOriginForNonCSSError[] = …;
}
namespace extensions {
InjectDetails;
ExecuteCodeFunction::ExecuteCodeFunction() { … }
ExecuteCodeFunction::~ExecuteCodeFunction() { … }
void ExecuteCodeFunction::DidLoadAndLocalizeFile(
const std::string& file,
std::vector<std::unique_ptr<std::string>> data,
std::optional<std::string> load_error) { … }
bool ExecuteCodeFunction::Execute(const std::string& code_string,
std::string* error) { … }
ExtensionFunction::ResponseAction ExecuteCodeFunction::Run() { … }
bool ExecuteCodeFunction::LoadFile(const std::string& file,
std::string* error) { … }
void ExecuteCodeFunction::OnExecuteCodeFinished(
std::vector<ScriptExecutor::FrameResult> results) { … }
}
#endif