chromium/out/Default/gen/chrome/common/extensions/api/webstore_private.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
//   chrome/common/extensions/api/webstore_private.json
// by tools/json_schema_compiler.
// DO NOT EDIT.

#ifndef CHROME_COMMON_EXTENSIONS_API_WEBSTORE_PRIVATE_H__
#define CHROME_COMMON_EXTENSIONS_API_WEBSTORE_PRIVATE_H__

#include <stdint.h>

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

#include "base/values.h"
#include <string_view>


namespace extensions {
namespace api {
namespace webstore_private {

//
// Types
//

// Whether the API call succeeded, or the reason for failure.
enum class Result {};


const char* ToString(Result as_enum);
Result ParseResult(std::string_view as_string);
std::u16string GetResultParseError(std::string_view as_string);

enum class WebGlStatus {};


const char* ToString(WebGlStatus as_enum);
WebGlStatus ParseWebGlStatus(std::string_view as_string);
std::u16string GetWebGlStatusParseError(std::string_view as_string);

enum class ExtensionInstallStatus {};


const char* ToString(ExtensionInstallStatus as_enum);
ExtensionInstallStatus ParseExtensionInstallStatus(std::string_view as_string);
std::u16string GetExtensionInstallStatusParseError(std::string_view as_string);

enum class MV2DeprecationStatus {};


const char* ToString(MV2DeprecationStatus as_enum);
MV2DeprecationStatus ParseMV2DeprecationStatus(std::string_view as_string);
std::u16string GetMV2DeprecationStatusParseError(std::string_view as_string);


//
// Functions
//

namespace BeginInstallWithManifest3 {

struct Params {};

namespace Results {

// A string result code, which will be empty upon success. The possible values
// in the case of errors include 'unknown_error', 'user_cancelled',
// 'manifest_error', 'icon_error', 'invalid_id', 'permission_denied',
// 'invalid_icon_url' and 'already_installed'.
base::Value::List Create(const Result& result);
}  // namespace Results

}  // namespace BeginInstallWithManifest3

namespace CompleteInstall {

struct Params {};

namespace Results {

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

}  // namespace CompleteInstall

namespace EnableAppLauncher {

namespace Results {

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

}  // namespace EnableAppLauncher

namespace GetBrowserLogin {

namespace Results {

struct Info {};


base::Value::List Create(const Info& info);
}  // namespace Results

}  // namespace GetBrowserLogin

namespace GetStoreLogin {

namespace Results {

base::Value::List Create(const std::string& login);
}  // namespace Results

}  // namespace GetStoreLogin

namespace SetStoreLogin {

struct Params {};

namespace Results {

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

}  // namespace SetStoreLogin

namespace GetWebGLStatus {

namespace Results {

base::Value::List Create(const WebGlStatus& webgl_status);
}  // namespace Results

}  // namespace GetWebGLStatus

namespace GetIsLauncherEnabled {

namespace Results {

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

}  // namespace GetIsLauncherEnabled

namespace IsInIncognitoMode {

namespace Results {

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

}  // namespace IsInIncognitoMode

namespace IsPendingCustodianApproval {

struct Params {};

namespace Results {

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

}  // namespace IsPendingCustodianApproval

namespace GetReferrerChain {

namespace Results {

base::Value::List Create(const std::string& referrer_chain);
}  // namespace Results

}  // namespace GetReferrerChain

namespace GetExtensionStatus {

struct Params {};

namespace Results {

base::Value::List Create(const ExtensionInstallStatus& status);
}  // namespace Results

}  // namespace GetExtensionStatus

namespace GetFullChromeVersion {

namespace Results {

struct Info {};


base::Value::List Create(const Info& info);
}  // namespace Results

}  // namespace GetFullChromeVersion

namespace GetMV2DeprecationStatus {

namespace Results {

base::Value::List Create(const MV2DeprecationStatus& status);
}  // namespace Results

}  // namespace GetMV2DeprecationStatus

}  // namespace webstore_private
}  // namespace api
}  // namespace extensions

#endif  // CHROME_COMMON_EXTENSIONS_API_WEBSTORE_PRIVATE_H__