Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(6960)

Unified Diff: chrome/browser/ui/libgtkui/native_theme_gtk3.h

Issue 2588993002: Gtk3: Refactor NativeThemeGtk3 to use foreign drawing only (Closed)
Patch Set: Add color cache Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/ui/libgtkui/gtk_util.cc ('k') | chrome/browser/ui/libgtkui/native_theme_gtk3.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/libgtkui/native_theme_gtk3.h
diff --git a/chrome/browser/ui/libgtkui/native_theme_gtk3.h b/chrome/browser/ui/libgtkui/native_theme_gtk3.h
index 72920a54f8bc7ada726632d9379306d268d741ef..577375ce1bb4a5f24fda835400c9573e00a2e765 100644
--- a/chrome/browser/ui/libgtkui/native_theme_gtk3.h
+++ b/chrome/browser/ui/libgtkui/native_theme_gtk3.h
@@ -6,10 +6,9 @@
#define CHROME_BROWSER_UI_LIBGTKUI_NATIVE_THEME_GTK3_H_
#include "base/macros.h"
+#include "base/optional.h"
#include "ui/native_theme/native_theme_base.h"
-typedef struct _GtkWidget GtkWidget;
-
namespace libgtkui {
// A version of NativeTheme that uses GTK3-rendered widgets.
@@ -17,6 +16,9 @@ class NativeThemeGtk3 : public ui::NativeThemeBase {
public:
static NativeThemeGtk3* instance();
+ // Called when gtk theme changes.
+ void ResetColorCache();
+
// Overridden from ui::NativeThemeBase:
SkColor GetSystemColor(ColorId color_id) const override;
void PaintMenuPopupBackground(
@@ -33,19 +35,7 @@ class NativeThemeGtk3 : public ui::NativeThemeBase {
NativeThemeGtk3();
~NativeThemeGtk3() override;
- SkColor LookupGtkThemeColor(ColorId color_id) const;
-
- // Returns various widgets for theming use.
- // TODO(thomasanderson): Remove all of these.
- GtkWidget* GetWindow() const;
- GtkWidget* GetEntry() const;
- GtkWidget* GetLabel() const;
- GtkWidget* GetButton() const;
- GtkWidget* GetBlueButton() const;
- GtkWidget* GetTree() const;
- GtkWidget* GetTooltip() const;
- GtkWidget* GetMenu() const;
- GtkWidget* GetMenuItem() const;
+ mutable base::Optional<SkColor> color_cache_[kColorId_NumColors];
DISALLOW_COPY_AND_ASSIGN(NativeThemeGtk3);
};
« no previous file with comments | « chrome/browser/ui/libgtkui/gtk_util.cc ('k') | chrome/browser/ui/libgtkui/native_theme_gtk3.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698