chromium/out/Default/gen/extensions/common/api/user_scripts.h

// Copyright 2024 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

// GENERATED FROM THE API DEFINITION IN
//   extensions/common/api/user_scripts.idl
// by tools/json_schema_compiler.
// DO NOT EDIT.

#ifndef EXTENSIONS_COMMON_API_USER_SCRIPTS_H__
#define EXTENSIONS_COMMON_API_USER_SCRIPTS_H__

#include <stdint.h>

#include <map>
#include <memory>
#include <optional>
#include <string>
#include <vector>

#include "base/values.h"
#include <string_view>
#include "extensions/common/api/extension_types.h"


namespace extensions {
namespace api {
namespace user_scripts {

//
// Types
//

// The JavaScript world for a user script to execute within.
enum class ExecutionWorld {};


const char* ToString(ExecutionWorld as_enum);
ExecutionWorld ParseExecutionWorld(std::string_view as_string);
std::u16string GetExecutionWorldParseError(std::string_view as_string);

struct ScriptSource {};

struct RegisteredUserScript {};

struct UserScriptFilter {};

struct WorldProperties {};


//
// Functions
//

namespace Register {

struct Params {};

namespace Results {

base::Value::List Create();
}  // namespace Results

}  // namespace Register

namespace GetScripts {

struct Params {};

namespace Results {

base::Value::List Create(const std::vector<RegisteredUserScript>& scripts);
}  // namespace Results

}  // namespace GetScripts

namespace Unregister {

struct Params {};

namespace Results {

base::Value::List Create();
}  // namespace Results

}  // namespace Unregister

namespace Update {

struct Params {};

namespace Results {

base::Value::List Create();
}  // namespace Results

}  // namespace Update

namespace ConfigureWorld {

struct Params {};

namespace Results {

base::Value::List Create();
}  // namespace Results

}  // namespace ConfigureWorld

namespace GetWorldConfigurations {

namespace Results {

base::Value::List Create(const std::vector<WorldProperties>& worlds);
}  // namespace Results

}  // namespace GetWorldConfigurations

namespace ResetWorldConfiguration {

struct Params {};

namespace Results {

base::Value::List Create();
}  // namespace Results

}  // namespace ResetWorldConfiguration

}  // namespace user_scripts
}  // namespace api
}  // namespace extensions

#endif  // EXTENSIONS_COMMON_API_USER_SCRIPTS_H__