Split LinuxUi into (LinuxUi, LinuxUiTheme)
LinuxUi was previously used in 2 ways:
- for global settings (eg. caret blink interval)
- for theme settings which are specific to a profile
- eg. the window background color
- multiple profiles may use different themes at the same time
(eg. GTK and QT)
It was up to callers to make the correct choice of using the global
LinuxUi instance or the theme-specific one. This CL splits LinuxUi
into global and a theme-specific interface to prevent incorrectly using
the wrong interface. Some instances of this are caught and fixed in
this CL.
R=sky
Bug: 1317782
Change-Id: I717af684f42d229b03ea6972becb7bd013e7cdf2
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3885999
Auto-Submit: Thomas Anderson <[email protected]>
Commit-Queue: Thomas Anderson <[email protected]>
Reviewed-by: Scott Violet <[email protected]>
Cr-Commit-Position: refs/heads/main@{#1046956}
diff --git a/ui/linux/linux_ui_factory.h b/ui/linux/linux_ui_factory.h
index aa60909..a1757677 100644
--- a/ui/linux/linux_ui_factory.h
+++ b/ui/linux/linux_ui_factory.h
@@ -11,6 +11,7 @@
namespace ui {
class LinuxUi;
+class LinuxUiTheme;
enum class SystemTheme : int;
// TODO(https://crbug.com/1317782): Remove in M110.
@@ -23,7 +24,7 @@
LinuxUi* GetDefaultLinuxUi();
COMPONENT_EXPORT(LINUX_UI_FACTORY)
-LinuxUi* GetLinuxUi(SystemTheme system_theme);
+LinuxUiTheme* GetLinuxUiTheme(SystemTheme system_theme);
COMPONENT_EXPORT(LINUX_UI_FACTORY)
SystemTheme GetDefaultSystemTheme();