summaryrefslogtreecommitdiff
path: root/chromium/ui/linux/linux_ui_getter.h
blob: 6bde465c7faae3631c70fa3c3a3049f150a948b2 (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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
// 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 UI_LINUX_LINUX_UI_GETTER_H_
#define UI_LINUX_LINUX_UI_GETTER_H_

#include "base/component_export.h"

class Profile;

namespace aura {
class Window;
}

namespace ui {

class LinuxUiTheme;

// Use the getters in LinuxUiTheme instead of using this class directly.
class COMPONENT_EXPORT(LINUX_UI) LinuxUiGetter {
 public:
  LinuxUiGetter& operator=(const LinuxUiGetter&) = delete;
  LinuxUiGetter(const LinuxUiGetter&) = delete;

  LinuxUiGetter();
  virtual ~LinuxUiGetter();

  virtual LinuxUiTheme* GetForWindow(aura::Window* window) = 0;
  virtual LinuxUiTheme* GetForProfile(Profile* profile) = 0;

  static LinuxUiGetter* instance() { return instance_; }
  static void set_instance(LinuxUiGetter* instance) { instance_ = instance; }

 private:
  static LinuxUiGetter* instance_;
};

}  // namespace ui

#endif  // UI_LINUX_LINUX_UI_GETTER_H_