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

#ifndef CHROME_COMMON_EXTENSIONS_API_WEB_NAVIGATION_H__
#define CHROME_COMMON_EXTENSIONS_API_WEB_NAVIGATION_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 web_navigation {

//
// Types
//

// Cause of the navigation. The same transition types as defined in the history
// API are used. These are the same transition types as defined in the <a
// href="history#transition_types">history API</a> except with
// <code>"start_page"</code> in place of <code>"auto_toplevel"</code> (for
// backwards compatibility).
enum class TransitionType {};


const char* ToString(TransitionType as_enum);
TransitionType ParseTransitionType(std::string_view as_string);
std::u16string GetTransitionTypeParseError(std::string_view as_string);

enum class TransitionQualifier {};


const char* ToString(TransitionQualifier as_enum);
TransitionQualifier ParseTransitionQualifier(std::string_view as_string);
std::u16string GetTransitionQualifierParseError(std::string_view as_string);


//
// Functions
//

namespace GetFrame {

struct Params {};

namespace Results {

// Information about the requested frame, null if the specified frame ID and/or
// tab ID are invalid.
struct Details {};


// Information about the requested frame, null if the specified frame ID and/or
// tab ID are invalid.
base::Value::List Create(const Details& details);
}  // namespace Results

}  // namespace GetFrame

namespace GetAllFrames {

struct Params {};

namespace Results {

struct DetailsType {};



// A list of frames in the given tab, null if the specified tab ID is invalid.
base::Value::List Create(const std::vector<DetailsType>& details);
}  // namespace Results

}  // namespace GetAllFrames

//
// Events
//

namespace OnBeforeNavigate {

extern const char kEventName[];  // "webNavigation.onBeforeNavigate"

struct Details {};


base::Value::List Create(const Details& details);
}  // namespace OnBeforeNavigate

namespace OnCommitted {

extern const char kEventName[];  // "webNavigation.onCommitted"

struct Details {};


base::Value::List Create(const Details& details);
}  // namespace OnCommitted

namespace OnDOMContentLoaded {

extern const char kEventName[];  // "webNavigation.onDOMContentLoaded"

struct Details {};


base::Value::List Create(const Details& details);
}  // namespace OnDOMContentLoaded

namespace OnCompleted {

extern const char kEventName[];  // "webNavigation.onCompleted"

struct Details {};


base::Value::List Create(const Details& details);
}  // namespace OnCompleted

namespace OnErrorOccurred {

extern const char kEventName[];  // "webNavigation.onErrorOccurred"

struct Details {};


base::Value::List Create(const Details& details);
}  // namespace OnErrorOccurred

namespace OnCreatedNavigationTarget {

extern const char kEventName[];  // "webNavigation.onCreatedNavigationTarget"

struct Details {};


base::Value::List Create(const Details& details);
}  // namespace OnCreatedNavigationTarget

namespace OnReferenceFragmentUpdated {

extern const char kEventName[];  // "webNavigation.onReferenceFragmentUpdated"

struct Details {};


base::Value::List Create(const Details& details);
}  // namespace OnReferenceFragmentUpdated

namespace OnTabReplaced {

extern const char kEventName[];  // "webNavigation.onTabReplaced"

struct Details {};


base::Value::List Create(const Details& details);
}  // namespace OnTabReplaced

namespace OnHistoryStateUpdated {

extern const char kEventName[];  // "webNavigation.onHistoryStateUpdated"

struct Details {};


base::Value::List Create(const Details& details);
}  // namespace OnHistoryStateUpdated

}  // namespace web_navigation
}  // namespace api
}  // namespace extensions

#endif  // CHROME_COMMON_EXTENSIONS_API_WEB_NAVIGATION_H__