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

#ifndef CHROME_COMMON_EXTENSIONS_API_TAB_GROUPS_H__
#define CHROME_COMMON_EXTENSIONS_API_TAB_GROUPS_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 tab_groups {

//
// Properties
//

// An ID that represents the absence of a group.
extern const int TAB_GROUP_ID_NONE;

//
// Types
//

// The group's color.
enum class Color {};


const char* ToString(Color as_enum);
Color ParseColor(std::string_view as_string);
std::u16string GetColorParseError(std::string_view as_string);

struct TabGroup {};


//
// Functions
//

namespace Get {

struct Params {};

namespace Results {

base::Value::List Create(const TabGroup& group);
}  // namespace Results

}  // namespace Get

namespace Query {

struct Params {};

namespace Results {

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

}  // namespace Query

namespace Update {

struct Params {};

namespace Results {

// Details about the updated group.
base::Value::List Create(const TabGroup& group);
}  // namespace Results

}  // namespace Update

namespace Move {

struct Params {};

namespace Results {

// Details about the moved group.
base::Value::List Create(const TabGroup& group);
}  // namespace Results

}  // namespace Move

//
// Events
//

namespace OnCreated {

extern const char kEventName[];  // "tabGroups.onCreated"

// Details of the group that was created.
base::Value::List Create(const TabGroup& group);
}  // namespace OnCreated

namespace OnUpdated {

extern const char kEventName[];  // "tabGroups.onUpdated"

// Details of the group that was updated.
base::Value::List Create(const TabGroup& group);
}  // namespace OnUpdated

namespace OnMoved {

extern const char kEventName[];  // "tabGroups.onMoved"

// Details of the group that was moved.
base::Value::List Create(const TabGroup& group);
}  // namespace OnMoved

namespace OnRemoved {

extern const char kEventName[];  // "tabGroups.onRemoved"

// Details of the group that was removed.
base::Value::List Create(const TabGroup& group);
}  // namespace OnRemoved

}  // namespace tab_groups
}  // namespace api
}  // namespace extensions

#endif  // CHROME_COMMON_EXTENSIONS_API_TAB_GROUPS_H__