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

#ifndef EXTENSIONS_COMMON_API_APP_RUNTIME_H__
#define EXTENSIONS_COMMON_API_APP_RUNTIME_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 app_runtime {

//
// Types
//

struct LaunchItem {};

// Enumeration of app launch sources. This should be kept in sync with
// AppLaunchSource in components/services/app_service/public/mojom/types.mojom,
// and GetLaunchSourceEnum() in
// extensions/browser/api/app_runtime/app_runtime_api.cc. Note the enumeration
// is used in UMA histogram so entries should not be re-ordered or removed.
enum class LaunchSource {};


const char* ToString(LaunchSource as_enum);
LaunchSource ParseLaunchSource(std::string_view as_string);
std::u16string GetLaunchSourceParseError(std::string_view as_string);

// An app can be launched with a specific action in mind, for example, to create
// a new note. The type of action the app was launched with is available inside
// of the |actionData| field from the LaunchData instance.
enum class ActionType {};


const char* ToString(ActionType as_enum);
ActionType ParseActionType(std::string_view as_string);
std::u16string GetActionTypeParseError(std::string_view as_string);

struct ActionData {};

struct LaunchData {};

struct EmbedRequest {};


//
// Events
//

namespace OnEmbedRequested {

extern const char kEventName[];  // "app.runtime.onEmbedRequested"

base::Value::List Create(const EmbedRequest& request);
}  // namespace OnEmbedRequested

namespace OnLaunched {

extern const char kEventName[];  // "app.runtime.onLaunched"

base::Value::List Create(const LaunchData& launch_data);
}  // namespace OnLaunched

namespace OnRestarted {

extern const char kEventName[];  // "app.runtime.onRestarted"

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

}  // namespace app_runtime
}  // namespace api
}  // namespace extensions

#endif  // EXTENSIONS_COMMON_API_APP_RUNTIME_H__