Files
NebulaBrowser/src/ui/paths.h
T
Andrew Zambazos 924529807f Add unpacked extension support
Adds an extension manager that loads unpacked extensions from the user data extensions directory, persists enabled state, and injects matching content scripts on page load. The settings Plugins page now shows installed extensions, supports reload/toggle actions, and includes an example Hello Nebula extension.
2026-07-12 20:21:32 +12:00

43 lines
1.5 KiB
C++

#pragma once
#include <filesystem>
#include <string>
#include <string_view>
namespace nebula::ui {
// Process-wide profile used to isolate desktop vs Big Picture CEF data.
// Call before GetUserDataDirectory() / CEF initialize. Empty/"desktop" = default.
void SetAppProfile(std::string_view profile);
const std::string& GetAppProfile();
std::filesystem::path GetExecutableDirectory();
std::filesystem::path GetUserDataDirectory();
std::filesystem::path GetCacheDirectory();
std::filesystem::path GetExtensionsDirectory();
std::filesystem::path GetExtensionsStatePath();
std::filesystem::path GetSessionStatePath();
std::filesystem::path GetFirstRunStatePath();
std::filesystem::path GetUiPagePath(const std::string& page_name);
std::string FilePathToUrl(std::filesystem::path path);
std::string GetChromeUrl();
std::string GetHomeUrl();
std::string GetSetupUrl();
std::string GetSettingsUrl();
std::string GetDownloadsUrl();
std::string GetBigPictureUrl();
std::string GetGpuDiagnosticsUrl();
std::string GetMenuPopupUrl();
std::string GetInsecureWarningUrl(const std::string& target_url);
std::string GetNotFoundUrl(const std::string& target_url);
std::string ResolveInternalUrl(const std::string& url);
std::string ToInternalUrl(const std::string& url);
bool IsInternalHomeUrl(const std::string& url);
bool IsNebulaInternalUrl(const std::string& url);
bool IsHttpUrl(const std::string& url);
bool IsChromiumNewTabUrl(const std::string& url);
bool IsEmptyOrChromiumNewTabUrl(const std::string& url);
} // namespace nebula::ui