summaryrefslogtreecommitdiff
path: root/chromium/base/win/default_apps_util.h
blob: 714862fe12a69a105151c673c6cca6b191ee44f1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
// Copyright 2022 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifndef BASE_WIN_DEFAULT_APPS_UTIL_H_
#define BASE_WIN_DEFAULT_APPS_UTIL_H_

#include "base/base_export.h"
#include "base/strings/string_piece.h"

namespace base::win {

// Returns true if the OS has a default apps settings dialog. This method
// returns false on Win7.
BASE_EXPORT bool CanLaunchDefaultAppsSettingsModernDialog();

// Launches the Windows 'settings' modern app with the 'default apps' view
// focused. If `protocol` is not empty, it also highlights the `protocol` in
// the dialog. Returns true if the default apps dialog was successfully opened,
// and the `protocol`, if not empty, was highlighted.
BASE_EXPORT bool LaunchDefaultAppsSettingsModernDialog(
    base::WStringPiece protocol);

}  // namespace base::win

#endif  // BASE_WIN_DEFAULT_APPS_UTIL_H_