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

#ifndef CHROME_COMMON_EXTENSIONS_API_OMNIBOX_H__
#define CHROME_COMMON_EXTENSIONS_API_OMNIBOX_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 omnibox {

//
// Types
//

// The style type.
enum class DescriptionStyleType {};


const char* ToString(DescriptionStyleType as_enum);
DescriptionStyleType ParseDescriptionStyleType(std::string_view as_string);
std::u16string GetDescriptionStyleTypeParseError(std::string_view as_string);

// The window disposition for the omnibox query. This is the recommended context
// to display results. For example, if the omnibox command is to navigate to a
// certain URL, a disposition of 'newForegroundTab' means the navigation should
// take place in a new selected tab.
enum class OnInputEnteredDisposition {};


const char* ToString(OnInputEnteredDisposition as_enum);
OnInputEnteredDisposition ParseOnInputEnteredDisposition(std::string_view as_string);
std::u16string GetOnInputEnteredDispositionParseError(std::string_view as_string);

// The style ranges for the description, as provided by the extension.
struct MatchClassification {};

// A suggest result.
struct SuggestResult {};

// A suggest result.
struct DefaultSuggestResult {};


//
// Manifest Keys
//

struct ManifestKeys {};

//
// Functions
//

namespace SendSuggestions {

struct Params {};

}  // namespace SendSuggestions

namespace SetDefaultSuggestion {

struct Params {};

namespace Results {

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

}  // namespace SetDefaultSuggestion

//
// Events
//

namespace OnInputStarted {

extern const char kEventName[];  // "omnibox.onInputStarted"

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

namespace OnInputChanged {

extern const char kEventName[];  // "omnibox.onInputChanged"

// A callback passed to the onInputChanged event used for sending suggestions
// back to the browser.
base::Value::List Create(const std::string& text, base::Value::Dict suggest);
}  // namespace OnInputChanged

namespace OnInputEntered {

extern const char kEventName[];  // "omnibox.onInputEntered"

base::Value::List Create(const std::string& text, const OnInputEnteredDisposition& disposition);
}  // namespace OnInputEntered

namespace OnInputCancelled {

extern const char kEventName[];  // "omnibox.onInputCancelled"

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

namespace OnDeleteSuggestion {

extern const char kEventName[];  // "omnibox.onDeleteSuggestion"

// Text of the deleted suggestion.
base::Value::List Create(const std::string& text);
}  // namespace OnDeleteSuggestion

}  // namespace omnibox
}  // namespace api
}  // namespace extensions

#endif  // CHROME_COMMON_EXTENSIONS_API_OMNIBOX_H__