Source code
Revision control
Copy as Markdown
Other Tools
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
/**
* This file exists so that LaunchModernSettingsDialogDefaultApps can be called
* without linking to libxul.
*/
#ifndef windowsdefaultbrowser_h_
#define windowsdefaultbrowser_h_
#include <utility>
#include <windows.h>
#include "mozilla/RefPtr.h"
#include "mozilla/UniquePtr.h"
struct IUIAutomationElement;
using UIElement = RefPtr<IUIAutomationElement>;
using UIWindowElement = std::pair<HWND, UIElement>;
bool GetAppRegName(mozilla::UniquePtr<wchar_t[]>& aAppRegName);
bool LaunchControlPanelDefaultPrograms();
bool LaunchModernSettingsDialogDefaultApps();
/**
* Find the set default browser button in Windows Settings.
*
* Open Windows Settings beforehand via LaunchModernSettingsDialogDefaultApps().
*
* @return The window and button element, or null values on failure.
*/
[[nodiscard]] UIWindowElement FindSetDefaultBrowserButton();
#endif // windowsdefaultbrowser_h_