#include "extensions/common/manifest_handlers/options_page_info.h"
#include <memory>
#include "base/files/file_util.h"
#include "base/memory/ptr_util.h"
#include "base/strings/utf_string_conversions.h"
#include "extensions/common/api/extensions_manifest_types.h"
#include "extensions/common/error_utils.h"
#include "extensions/common/feature_switch.h"
#include "extensions/common/file_util.h"
#include "extensions/common/manifest_constants.h"
#include "extensions/strings/grit/extensions_strings.h"
#include "ui/base/l10n/l10n_util.h"
namespace extensions {
keys;
errors;
OptionsUI;
namespace {
OptionsPageInfo* GetOptionsPageInfo(const Extension* extension) { … }
bool ParseOptionsUrl(Extension* extension,
const std::string& url_string,
const std::string& manifest_field_name,
std::u16string* error,
GURL* result) { … }
}
OptionsPageInfo::OptionsPageInfo(const GURL& options_page,
bool chrome_styles,
bool open_in_tab)
: … { … }
OptionsPageInfo::~OptionsPageInfo() { … }
const GURL& OptionsPageInfo::GetOptionsPage(const Extension* extension) { … }
bool OptionsPageInfo::HasOptionsPage(const Extension* extension) { … }
bool OptionsPageInfo::ShouldUseChromeStyle(const Extension* extension) { … }
bool OptionsPageInfo::ShouldOpenInTab(const Extension* extension) { … }
std::unique_ptr<OptionsPageInfo> OptionsPageInfo::Create(
Extension* extension,
const base::Value::Dict* options_ui_dict,
const std::string& options_page_string,
std::vector<InstallWarning>* install_warnings,
std::u16string* error) { … }
OptionsPageHandler::OptionsPageHandler() { … }
OptionsPageHandler::~OptionsPageHandler() { … }
bool OptionsPageHandler::Parse(Extension* extension, std::u16string* error) { … }
bool OptionsPageHandler::Validate(const Extension* extension,
std::string* error,
std::vector<InstallWarning>* warnings) const { … }
base::span<const char* const> OptionsPageHandler::Keys() const { … }
}