blob: 2f4820f2c6240a0853814045718aabf61e3379aa [file] [log] [blame]
Avi Drissman3e1a26c2022-09-15 20:26:031// Copyright 2022 The Chromium Authors
Tom Anderson80d3ad42022-05-03 12:09:272// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
Tom Anderson4ee83742022-07-14 20:58:415#ifndef UI_LINUX_LINUX_UI_FACTORY_H_
6#define UI_LINUX_LINUX_UI_FACTORY_H_
Tom Anderson80d3ad42022-05-03 12:09:277
Tom Anderson074a5d412022-08-30 18:54:538#include "base/component_export.h"
Tom Andersond6ecb872022-09-02 19:13:039#include "base/features.h"
Tom Anderson80d3ad42022-05-03 12:09:2710
Tom Anderson992d9872022-07-14 21:24:5011namespace ui {
12
13class LinuxUi;
Tom Andersoncd61f3b22022-09-14 16:27:4914class LinuxUiTheme;
Tom Anderson074a5d412022-08-30 18:54:5315enum class SystemTheme : int;
Tom Anderson80d3ad42022-05-03 12:09:2716
Tom Anderson10fc0242023-05-19 23:10:1617// TODO(https://crbug.com/1317782): Remove in M110.
18COMPONENT_EXPORT(LINUX_UI_FACTORY) BASE_DECLARE_FEATURE(kAllowQt);
19
Tom Anderson074a5d412022-08-30 18:54:5320// Returns a LinuxUi for the default toolkit. May create a LinuxUi instance if
21// one does not exist. May return nullptr if no toolkits are available.
22COMPONENT_EXPORT(LINUX_UI_FACTORY)
23LinuxUi* GetDefaultLinuxUi();
24
Tom Anderson975c84e12022-09-14 22:17:5825// Returns a LinuxUiTheme for the default toolkit. May create a LinuxUiTheme
26// instance if one does not exist. May return nullptr if no toolkits are
27// available. Should only be used by tests or LinuxUi internals. Otherwise, use
28// the accessors in LinuxUiTheme instead.
29COMPONENT_EXPORT(LINUX_UI_FACTORY)
30LinuxUiTheme* GetDefaultLinuxUiTheme();
31
Tom Anderson074a5d412022-08-30 18:54:5332COMPONENT_EXPORT(LINUX_UI_FACTORY)
Tom Andersoncd61f3b22022-09-14 16:27:4933LinuxUiTheme* GetLinuxUiTheme(SystemTheme system_theme);
Tom Anderson074a5d412022-08-30 18:54:5334
Tom Anderson49431822023-07-21 22:35:4035// Returns all `LinuxUiTheme`s that have been created.
36COMPONENT_EXPORT(LINUX_UI_FACTORY)
37const std::vector<LinuxUiTheme*>& GetLinuxUiThemes();
38
Tom Anderson074a5d412022-08-30 18:54:5339COMPONENT_EXPORT(LINUX_UI_FACTORY)
40SystemTheme GetDefaultSystemTheme();
Tom Anderson992d9872022-07-14 21:24:5041
42} // namespace ui
Tom Anderson80d3ad42022-05-03 12:09:2743
Tom Anderson4ee83742022-07-14 20:58:4144#endif // UI_LINUX_LINUX_UI_FACTORY_H_