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

#ifndef CHROME_COMMON_EXTENSIONS_API_SESSIONS_H__
#define CHROME_COMMON_EXTENSIONS_API_SESSIONS_H__

#include <stdint.h>

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

#include "base/values.h"
#include "chrome/common/extensions/api/tabs.h"
#include "chrome/common/extensions/api/windows.h"


namespace extensions {
namespace api {
namespace sessions {

//
// Properties
//

// The maximum number of $(ref:sessions.Session) that will be included in a
// requested list.
extern const int MAX_SESSION_RESULTS;

//
// Types
//

struct Filter {};

struct Session {};

struct Device {};


//
// Functions
//

namespace GetRecentlyClosed {

struct Params {};

namespace Results {

// The list of closed entries in reverse order that they were closed (the most
// recently closed tab or window will be at index <code>0</code>). The entries
// may contain either tabs or windows.
base::Value::List Create(const std::vector<Session>& sessions);
}  // namespace Results

}  // namespace GetRecentlyClosed

namespace GetDevices {

struct Params {};

namespace Results {

// The list of $(ref:sessions.Device) objects for each synced session, sorted in
// order from device with most recently modified session to device with least
// recently modified session. $(ref:tabs.Tab) objects are sorted by recency in
// the $(ref:windows.Window) of the $(ref:sessions.Session) objects.
base::Value::List Create(const std::vector<Device>& devices);
}  // namespace Results

}  // namespace GetDevices

namespace Restore {

struct Params {};

namespace Results {

// A $(ref:sessions.Session) containing the restored $(ref:windows.Window) or
// $(ref:tabs.Tab) object.
base::Value::List Create(const Session& restored_session);
}  // namespace Results

}  // namespace Restore

//
// Events
//

namespace OnChanged {

extern const char kEventName[];  // "sessions.onChanged"

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

}  // namespace sessions
}  // namespace api
}  // namespace extensions

#endif  // CHROME_COMMON_EXTENSIONS_API_SESSIONS_H__