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

#ifndef EXTENSIONS_COMMON_API_WEB_VIEW_INTERNAL_H__
#define EXTENSIONS_COMMON_API_WEB_VIEW_INTERNAL_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_view_internal {

//
// Properties
//

// The maximum number of times that $(ref:captureVisibleRegion) can be called
// per second. $(ref:captureVisibleRegion) is expensive and should not be called
// too often.
extern const int MAX_CAPTURE_VISIBLE_REGION_CALLS_PER_SECOND;

//
// Types
//

// A set of data types. Missing data types are interpreted as
// <code>false</code>.
struct DataTypeSet {};

// Options that determine exactly what data will be removed.
struct RemovalOptions {};

// Defines the how zooming is handled in the webview.
enum class ZoomMode {};


const char* ToString(ZoomMode as_enum);
ZoomMode ParseZoomMode(std::string_view as_string);
std::u16string GetZoomModeParseError(std::string_view as_string);

// Determines what to do with the active match after the find session has ended.
// 'clear' will clear the highlighting over the active match; 'keep' will keep
// the active match highlighted; 'activate' will keep the active match
// highlighted and simulate a user click on that match.
enum class StopFindingAction {};


const char* ToString(StopFindingAction as_enum);
StopFindingAction ParseStopFindingAction(std::string_view as_string);
std::u16string GetStopFindingActionParseError(std::string_view as_string);

enum class SetPermissionAction {};


const char* ToString(SetPermissionAction as_enum);
SetPermissionAction ParseSetPermissionAction(std::string_view as_string);
std::u16string GetSetPermissionActionParseError(std::string_view as_string);

// The type of injection item: code or a set of files.
struct InjectionItems {};

// Details of the content script to inject.
struct ContentScriptDetails {};


//
// Functions
//

namespace GetAudioState {

struct Params {};

namespace Results {

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

}  // namespace GetAudioState

namespace SetAudioMuted {

struct Params {};

}  // namespace SetAudioMuted

namespace IsAudioMuted {

struct Params {};

namespace Results {

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

}  // namespace IsAudioMuted

namespace ExecuteScript {

struct Params {};

namespace Results {

// The result of the script in every injected frame.
base::Value::List Create(const base::Value::List& result);
}  // namespace Results

}  // namespace ExecuteScript

namespace InsertCSS {

struct Params {};

namespace Results {

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

}  // namespace InsertCSS

namespace AddContentScripts {

struct Params {};

}  // namespace AddContentScripts

namespace RemoveContentScripts {

struct Params {};

}  // namespace RemoveContentScripts

namespace SetZoom {

struct Params {};

namespace Results {

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

}  // namespace SetZoom

namespace GetZoom {

struct Params {};

namespace Results {

// The current zoom factor.
base::Value::List Create(double zoom_factor);
}  // namespace Results

}  // namespace GetZoom

namespace SetZoomMode {

struct Params {};

namespace Results {

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

}  // namespace SetZoomMode

namespace GetZoomMode {

struct Params {};

namespace Results {

// The webview's current zoom mode.
base::Value::List Create(const ZoomMode& zoom_mode);
}  // namespace Results

}  // namespace GetZoomMode

namespace Find {

struct Params {};

namespace Results {

struct Results {};


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

}  // namespace Find

namespace StopFinding {

struct Params {};

}  // namespace StopFinding

namespace LoadDataWithBaseUrl {

struct Params {};

namespace Results {

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

}  // namespace LoadDataWithBaseUrl

namespace Go {

struct Params {};

namespace Results {

// Indicates whether the navigation was successful.
base::Value::List Create(bool success);
}  // namespace Results

}  // namespace Go

namespace OverrideUserAgent {

struct Params {};

}  // namespace OverrideUserAgent

namespace Reload {

struct Params {};

}  // namespace Reload

namespace SetAllowTransparency {

struct Params {};

}  // namespace SetAllowTransparency

namespace SetAllowScaling {

struct Params {};

}  // namespace SetAllowScaling

namespace SetName {

struct Params {};

}  // namespace SetName

namespace SetPermission {

struct Params {};

namespace Results {

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

}  // namespace SetPermission

namespace Navigate {

struct Params {};

}  // namespace Navigate

namespace Stop {

struct Params {};

}  // namespace Stop

namespace Terminate {

struct Params {};

}  // namespace Terminate

namespace CaptureVisibleRegion {

struct Params {};

namespace Results {

// A data URL which encodes an image of the visible area of the captured tab.
// May be assigned to the 'src' property of an HTML Image element for display.
base::Value::List Create(const std::string& data_url);
}  // namespace Results

}  // namespace CaptureVisibleRegion

namespace SetSpatialNavigationEnabled {

struct Params {};

}  // namespace SetSpatialNavigationEnabled

namespace IsSpatialNavigationEnabled {

struct Params {};

namespace Results {

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

}  // namespace IsSpatialNavigationEnabled

namespace ClearData {

struct Params {};

namespace Results {

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

}  // namespace ClearData

}  // namespace web_view_internal
}  // namespace api
}  // namespace extensions

#endif  // EXTENSIONS_COMMON_API_WEB_VIEW_INTERNAL_H__